]> granicus.if.org Git - sudo/commitdiff
For non-standalone auth methods, stop reading the password if the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 6 Aug 2010 21:09:03 +0000 (17:09 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 6 Aug 2010 21:09:03 +0000 (17:09 -0400)
user enters ^C at the prompt.

--HG--
branch : 1.7

auth/sudo_auth.c

index a269d0c81ab0bd03f3e60381fb6215a8284224d1..42455ee31640ae8343e9d3f32594b1d29b3548a1 100644 (file)
@@ -185,8 +185,9 @@ verify_user(pw, prompt)
                goto cleanup;
        }
 #ifndef AUTH_STANDALONE
-       if (p)
-           zero_bytes(p, strlen(p));
+       if (p == NULL)
+           break;
+       zero_bytes(p, strlen(p));
 #endif
        if (!ISSET(tgetpass_flags, TGP_ASKPASS))
            pass_warn(stderr);