зеркало из https://github.com/Azure/sonic-openssh.git
Remove SSHv1 code path.
Server-side support for Protocol 1 has been removed so remove !compat20 PAM code path.
This commit is contained in:
Родитель
7af27bf538
Коммит
608ec1f62f
21
auth-pam.c
21
auth-pam.c
|
@ -106,7 +106,6 @@ extern char *__progname;
|
||||||
|
|
||||||
extern ServerOptions options;
|
extern ServerOptions options;
|
||||||
extern Buffer loginmsg;
|
extern Buffer loginmsg;
|
||||||
extern int compat20;
|
|
||||||
extern u_int utmp_len;
|
extern u_int utmp_len;
|
||||||
|
|
||||||
/* so we don't silently change behaviour */
|
/* so we don't silently change behaviour */
|
||||||
|
@ -468,18 +467,16 @@ sshpam_thread(void *ctxtp)
|
||||||
if (sshpam_err != PAM_SUCCESS)
|
if (sshpam_err != PAM_SUCCESS)
|
||||||
goto auth_fail;
|
goto auth_fail;
|
||||||
|
|
||||||
if (compat20) {
|
if (!do_pam_account()) {
|
||||||
if (!do_pam_account()) {
|
sshpam_err = PAM_ACCT_EXPIRED;
|
||||||
sshpam_err = PAM_ACCT_EXPIRED;
|
goto auth_fail;
|
||||||
|
}
|
||||||
|
if (sshpam_authctxt->force_pwchange) {
|
||||||
|
sshpam_err = pam_chauthtok(sshpam_handle,
|
||||||
|
PAM_CHANGE_EXPIRED_AUTHTOK);
|
||||||
|
if (sshpam_err != PAM_SUCCESS)
|
||||||
goto auth_fail;
|
goto auth_fail;
|
||||||
}
|
sshpam_password_change_required(0);
|
||||||
if (sshpam_authctxt->force_pwchange) {
|
|
||||||
sshpam_err = pam_chauthtok(sshpam_handle,
|
|
||||||
PAM_CHANGE_EXPIRED_AUTHTOK);
|
|
||||||
if (sshpam_err != PAM_SUCCESS)
|
|
||||||
goto auth_fail;
|
|
||||||
sshpam_password_change_required(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer_put_cstring(&buffer, "OK");
|
buffer_put_cstring(&buffer, "OK");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче