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
This commit is contained in:
Todd C. Miller
2015-06-25 09:12:15 -06:00
parent d84757951f
commit ea5ce39c92

View 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 */