aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar steering72532026-05-18 08:19:03 -0600
committerGravatar steering72532026-05-18 08:19:03 -0600
commit5e617d8d66d794a508b208b3ab036dba3987c5aa (patch)
treec898e079730d9658c3f191a36dba969805199404
parentcheck rand_bytes for error (diff)
make sure the hexify doesnt break
-rw-r--r--pam_autopeer/pam_autopeer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pam_autopeer/pam_autopeer.c b/pam_autopeer/pam_autopeer.c
index b8b5457..2f9aedb 100644
--- a/pam_autopeer/pam_autopeer.c
+++ b/pam_autopeer/pam_autopeer.c
@@ -51,7 +51,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **ar
return PAM_SYSTEM_ERR;
}
char s_nonce[21];
- sprintf(s_nonce, "%x%x%x%x%x%x%x%x%x%x", nonce[0], nonce[1], nonce[2], nonce[3], nonce[4], nonce[5], nonce[6], nonce[7], nonce[8], nonce[9]);
+ sprintf(s_nonce, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", nonce[0], nonce[1], nonce[2], nonce[3], nonce[4], nonce[5], nonce[6], nonce[7], nonce[8], nonce[9]);
char *key, *sig;
pam_prompt(pamh, PAM_TEXT_INFO, NULL, "No SSH key was successful; entering PGP auth mode.");