No longer treat an empty password at the prompt as special. To
quit out of sudo you now need to hit ^C at the password prompt.
This commit is contained in:
@@ -104,7 +104,6 @@ bsdauth_verify(pw, prompt, auth)
|
||||
int authok = 0;
|
||||
sigaction_t sa, osa;
|
||||
auth_session_t *as = (auth_session_t *) auth->data;
|
||||
extern int nil_pw;
|
||||
|
||||
/* save old signal handler */
|
||||
sigemptyset(&sa.sa_mask);
|
||||
@@ -142,9 +141,6 @@ bsdauth_verify(pw, prompt, auth)
|
||||
}
|
||||
}
|
||||
|
||||
if (!pass || *pass == '\0') /* ^C or empty password */
|
||||
nil_pw = 1;
|
||||
|
||||
if (pass) {
|
||||
authok = auth_userresponse(as, pass, 1);
|
||||
zero_bytes(pass, strlen(pass));
|
||||
@@ -156,6 +152,9 @@ bsdauth_verify(pw, prompt, auth)
|
||||
if (authok)
|
||||
return(AUTH_SUCCESS);
|
||||
|
||||
if (!pass)
|
||||
return(AUTH_INTR);
|
||||
|
||||
if ((s = auth_getvalue(as, "errormsg")) != NULL)
|
||||
log_error(NO_EXIT|NO_MAIL, "%s", s);
|
||||
return(AUTH_FAILURE);
|
||||
|
Reference in New Issue
Block a user