Mercurial > dropbear
diff svr-authpam.c @ 478:d4f32c3443ac dbclient-netcat-alike
propagate from branch 'au.asn.ucc.matt.dropbear' (head f21045c791002d81fc6b8dde6537ea481e513eb2)
to branch 'au.asn.ucc.matt.dropbear.dbclient-netcat-alike' (head d1f69334581dc4c35f9ca16aa5355074c9dd315d)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 14 Sep 2008 06:47:51 +0000 |
parents | 4317be8b7cf9 |
children | d3ea8b9672f0 |
line wrap: on
line diff
--- a/svr-authpam.c Tue Mar 21 16:16:41 2006 +0000 +++ b/svr-authpam.c Sun Sep 14 06:47:51 2008 +0000 @@ -31,14 +31,14 @@ #include "dbutil.h" #include "auth.h" +#ifdef ENABLE_SVR_PAM_AUTH + #if defined(HAVE_SECURITY_PAM_APPL_H) #include <security/pam_appl.h> #elif defined (HAVE_PAM_PAM_APPL_H) #include <pam/pam_appl.h> #endif -#ifdef ENABLE_SVR_PAM_AUTH - struct UserDataS { char* user; char* passwd; @@ -195,7 +195,7 @@ /* 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 @@ 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 @@ 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 @@ /* 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();