From ea5ce39c929fcc97106128ac5cd68d1e192bc54c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 25 Jun 2015 09:12:15 -0600 Subject: [PATCH] When checking whether the PAM prompt matches "Password:", also check for the untranslated version. The PAM module might not be using the localized string even though it exists. From Joel Pelaez Jorge. Fixes Bug #701 --- plugins/sudoers/auth/pam.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c index 5df068f85..9dee74ea9 100644 --- a/plugins/sudoers/auth/pam.c +++ b/plugins/sudoers/auth/pam.c @@ -299,8 +299,9 @@ sudo_pam_end_session(struct passwd *pw, sudo_auth *auth) #ifdef PAM_TEXT_DOMAIN # define PAM_PROMPT_IS_PASSWORD(_p) \ - (strcmp((_p), dgt(PAM_TEXT_DOMAIN, "Password: ")) == 0 || \ - strcmp((_p), dgt(PAM_TEXT_DOMAIN, "Password:")) == 0) + (strcmp((_p), dgt(PAM_TEXT_DOMAIN, "Password:")) == 0 || \ + strcmp((_p), dgt(PAM_TEXT_DOMAIN, "Password: ")) == 0 || \ + PROMPT_IS_PASSWORD(_p)) #else # define PAM_PROMPT_IS_PASSWORD(_p) PROMPT_IS_PASSWORD(_p) #endif /* PAM_TEXT_DOMAIN */ -- 2.50.1