version 1.2.8.2, 2004/03/04 18:18:15 |
version 1.3, 2003/04/08 20:21:28 |
|
|
static int |
static int |
userauth_passwd(Authctxt *authctxt) |
userauth_passwd(Authctxt *authctxt) |
{ |
{ |
char *password, *newpass; |
char *password; |
int authenticated = 0; |
int authenticated = 0; |
int change; |
int change; |
u_int len, newlen; |
u_int len; |
|
|
change = packet_get_char(); |
change = packet_get_char(); |
password = packet_get_string(&len); |
|
if (change) { |
|
/* discard new password from packet */ |
|
newpass = packet_get_string(&newlen); |
|
memset(newpass, 0, newlen); |
|
xfree(newpass); |
|
} |
|
packet_check_eom(); |
|
|
|
if (change) |
if (change) |
logit("password change not supported"); |
logit("password change not supported"); |
else if (PRIVSEP(auth_password(authctxt, password)) == 1) |
password = packet_get_string(&len); |
|
packet_check_eom(); |
|
if (authctxt->valid && |
|
PRIVSEP(auth_password(authctxt, password)) == 1) |
authenticated = 1; |
authenticated = 1; |
memset(password, 0, len); |
memset(password, 0, len); |
xfree(password); |
xfree(password); |