]> granicus.if.org Git - sudo/commitdiff
Return PAM_CONV_ERR from the conversation function if getpass returns
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 1 Jun 2016 20:48:31 +0000 (14:48 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 1 Jun 2016 20:48:31 +0000 (14:48 -0600)
NULL or the user pressed ^C.

plugins/sudoers/auth/pam.c

index b5b2a6312a94ce35ac196cebb2dd1c089ca88169..880eaeedb882bb9e510a6aebf7d2d2d2fcb33496 100644 (file)
@@ -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) {