From 73979f1a24ada5a988803615d74e802963b92d51 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 20 Jan 2002 19:21:33 +0000 Subject: [PATCH] Avoid giving PAM a NULL password response, use the empty string instead. This avoids a log warning when the user hits ^C at the password prompt when PAM is in use. --- auth/pam.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/pam.c b/auth/pam.c index c375c83e4..2960463c7 100644 --- a/auth/pam.c +++ b/auth/pam.c @@ -221,7 +221,9 @@ sudo_conv(num_msg, msg, response, appdata_ptr) /* Read the password. */ pr->resp = estrdup((char *) tgetpass(p, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags)); - if (pr->resp == NULL || *pr->resp == '\0') + if (pr->resp == NULL) + pr->resp = ""; + if (*pr->resp == '\0') nil_pw = 1; /* empty password */ break; case PAM_TEXT_INFO: -- 2.50.1