Be a bit safer with reentrant pw_name

--HG--
extra : convert_revision : 6fa26817a93baeff5beb430be4e7e8127e1fd491
This commit is contained in:
Matt Johnston 2004-08-08 16:41:26 +00:00
parent c3169d49d3
commit 418f3b4042

View File

@ -50,7 +50,7 @@ void svr_auth_password() {
passwdcrypt = ses.authstate.pw->pw_passwd;
#ifdef HAVE_SHADOW_H
/* get the shadow password if possible */
spasswd = getspnam(ses.authstate.pw->pw_name);
spasswd = getspnam(ses.authstate.printableuser);
if (spasswd != NULL && spasswd->sp_pwdp != NULL) {
passwdcrypt = spasswd->sp_pwdp;
}