diff options
author | Matt Johnston <matt@ucc.asn.au> | 2008-01-13 03:55:59 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2008-01-13 03:55:59 +0000 |
commit | bb0548b3b00ca1b0b06e4d0ccf6cb794337eb192 (patch) | |
tree | 9692d7d32f6e274634af9345f79c1d436b38aed8 /svr-authpam.c | |
parent | 25554bc331cc684c3521b3c3ed4c0659c454d5df (diff) |
Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep
--HG--
extra : convert_revision : 295b11312e327fe6c4f33512674ea4a1a9790344
Diffstat (limited to 'svr-authpam.c')
-rw-r--r-- | svr-authpam.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svr-authpam.c b/svr-authpam.c index ee7d6ba..8d6a6e7 100644 --- a/svr-authpam.c +++ b/svr-authpam.c @@ -195,7 +195,7 @@ void svr_auth_pam() { /* used to pass data to the PAM conversation function - don't bother with * strdup() etc since these are touched only by our own conversation * function (above) which takes care of it */ - userData.user = ses.authstate.printableuser; + userData.user = ses.authstate.pw_name; userData.passwd = password; /* Init pam */ @@ -221,7 +221,7 @@ void svr_auth_pam() { rc, pam_strerror(pamHandlep, rc)); dropbear_log(LOG_WARNING, "bad PAM password attempt for '%s' from %s", - ses.authstate.printableuser, + ses.authstate.pw_name, svr_ses.addrstring); send_msg_userauth_failure(0, 1); goto cleanup; @@ -232,7 +232,7 @@ void svr_auth_pam() { rc, pam_strerror(pamHandlep, rc)); dropbear_log(LOG_WARNING, "bad PAM password attempt for '%s' from %s", - ses.authstate.printableuser, + ses.authstate.pw_name, svr_ses.addrstring); send_msg_userauth_failure(0, 1); goto cleanup; @@ -240,7 +240,7 @@ void svr_auth_pam() { /* successful authentication */ dropbear_log(LOG_NOTICE, "PAM password auth succeeded for '%s' from %s", - ses.authstate.printableuser, + ses.authstate.pw_name, svr_ses.addrstring); send_msg_userauth_success(); |