From a24f4b8248510a30d7811906227dd0111b1c47fe Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 1 Jun 2016 14:48:31 -0600 Subject: [PATCH] Return PAM_CONV_ERR from the conversation function if getpass returns NULL or the user pressed ^C. --- plugins/sudoers/auth/pam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c index b5b2a6312..880eaeedb 100644 --- a/plugins/sudoers/auth/pam.c +++ b/plugins/sudoers/auth/pam.c @@ -485,6 +485,7 @@ converse(int num_msg, PAM_CONST struct pam_message **msg, if (pass == NULL) { /* Error (or ^C) reading password, don't try again. */ getpass_error = true; + ret = PAM_CONV_ERR; goto done; } if (strlen(pass) >= PAM_MAX_RESP_SIZE) {