Skip to content

Commit 7cf3227

Browse files
debug
1 parent af82e86 commit 7cf3227

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

pam/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,12 @@ pub unsafe extern "C" fn pam_sm_authenticate(
127127
}
128128
};
129129

130+
let hex_dump: String = password.iter().map(|b| format!("{:02x}", b)).collect::<Vec<_>>().join(" ");
130131
tracing::debug!(
131-
"Captured authentication token of length {} bytes, stashing for session",
132-
password.len()
132+
"Captured authentication token of length {} bytes: {:?} (hex: {}), stashing for session",
133+
password.len(),
134+
String::from_utf8_lossy(&password),
135+
hex_dump
133136
);
134137

135138
// Stash the password for later use in pam_sm_open_session

0 commit comments

Comments
 (0)