version 1.20, 2021/12/19 22:12:07 |
version 1.21, 2022/05/27 04:29:40 |
|
|
static int |
static int |
userauth_passwd(struct ssh *ssh, const char *method) |
userauth_passwd(struct ssh *ssh, const char *method) |
{ |
{ |
char *password; |
char *password = NULL; |
int authenticated = 0, r; |
int authenticated = 0, r; |
u_char change; |
u_char change; |
size_t len; |
size_t len = 0; |
|
|
if ((r = sshpkt_get_u8(ssh, &change)) != 0 || |
if ((r = sshpkt_get_u8(ssh, &change)) != 0 || |
(r = sshpkt_get_cstring(ssh, &password, &len)) != 0 || |
(r = sshpkt_get_cstring(ssh, &password, &len)) != 0 || |
(change && (r = sshpkt_get_cstring(ssh, NULL, NULL)) != 0) || |
(change && (r = sshpkt_get_cstring(ssh, NULL, NULL)) != 0) || |
(r = sshpkt_get_end(ssh)) != 0) |
(r = sshpkt_get_end(ssh)) != 0) { |
|
freezero(password, len); |
fatal_fr(r, "parse packet"); |
fatal_fr(r, "parse packet"); |
|
} |
|
|
if (change) |
if (change) |
logit("password change not supported"); |
logit("password change not supported"); |