]> granicus.if.org Git - sudo/commitdiff
In the PAM code, when a user hits return at the first password prompt, exit without...
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 5 Jul 1999 20:35:30 +0000 (20:35 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 5 Jul 1999 20:35:30 +0000 (20:35 +0000)
auth.c

diff --git a/auth.c b/auth.c
index 9f52f0abd304eb56fa95de62d6ef45bdc4a829cf..0fcde1cea787952ea4efbb3b3fdd463d4a85273a 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -621,8 +621,14 @@ pam_attempt_auth()
             set_perms(PERM_USER, 0);
             return;
         }
-       if (null_pw)
-           break;
+
+       /* Exit silently if they hit return at the first password prompt */
+       if (null_pw) {
+           if (counter == TRIES_FOR_PASSWORD)
+               exit(1);
+           else
+               break;
+       }
 
        --counter;              /* otherwise, try again  */
         pass_warn(stderr);