If there is nothing to read from the askpass program, set errno to
EINTR. This makes the cancel button behave like the user entered ^C at the password prompt when PAM is used.
This commit is contained in:
@@ -254,6 +254,9 @@ sudo_askpass(const char *askpass, const char *prompt)
|
||||
(void) close(pfd[0]);
|
||||
(void) sigaction(SIGPIPE, &saved_sa_pipe, NULL);
|
||||
|
||||
if (pass == NULL)
|
||||
errno = EINTR; /* make cancel button simulate ^C */
|
||||
|
||||
debug_return_str_masked(pass);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user