From: Todd C. Miller Date: Fri, 6 Aug 2010 21:09:03 +0000 (-0400) Subject: For non-standalone auth methods, stop reading the password if the X-Git-Tag: SUDO_1_7_5~198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b400c0e88018fc1206f47526ed73d191c37ba33;p=sudo For non-standalone auth methods, stop reading the password if the user enters ^C at the prompt. --HG-- branch : 1.7 --- diff --git a/auth/sudo_auth.c b/auth/sudo_auth.c index a269d0c81..42455ee31 100644 --- a/auth/sudo_auth.c +++ b/auth/sudo_auth.c @@ -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);