From 3b400c0e88018fc1206f47526ed73d191c37ba33 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 6 Aug 2010 17:09:03 -0400 Subject: [PATCH] For non-standalone auth methods, stop reading the password if the user enters ^C at the prompt. --HG-- branch : 1.7 --- auth/sudo_auth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.40.0