mirror of
https://github.com/clearml/dropbear
synced 2025-06-16 19:28:49 +00:00
Be a bit safer with reentrant pw_name
--HG-- extra : convert_revision : 6fa26817a93baeff5beb430be4e7e8127e1fd491
This commit is contained in:
parent
c3169d49d3
commit
418f3b4042
@ -50,7 +50,7 @@ void svr_auth_password() {
|
|||||||
passwdcrypt = ses.authstate.pw->pw_passwd;
|
passwdcrypt = ses.authstate.pw->pw_passwd;
|
||||||
#ifdef HAVE_SHADOW_H
|
#ifdef HAVE_SHADOW_H
|
||||||
/* get the shadow password if possible */
|
/* 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) {
|
if (spasswd != NULL && spasswd->sp_pwdp != NULL) {
|
||||||
passwdcrypt = spasswd->sp_pwdp;
|
passwdcrypt = spasswd->sp_pwdp;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user