]> granicus.if.org Git - sudo/commitdiff
When checking whether the PAM prompt matches "Password:", also check
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 25 Jun 2015 15:12:15 +0000 (09:12 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 25 Jun 2015 15:12:15 +0000 (09:12 -0600)
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

index 5df068f85904cc1efc31ffc4ee69ef6194b075b2..9dee74ea9666f8211b2adb5e1ae83aea017fcece 100644 (file)
@@ -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 */