diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2013-11-11 14:14:31 +0100 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2013-11-11 14:14:31 +0100 |
commit | 5865f521f37846634f981582eaedad81abb08104 (patch) | |
tree | b08bda5ded8929418ae8ba26e8d6585bdc9fec0b /modules/pam_unix/pam_unix_passwd.c | |
parent | 9cfee1810d7756fdae56b5757b6bf8e8bec92495 (diff) | |
download | pam-5865f521f37846634f981582eaedad81abb08104.tar.gz pam-5865f521f37846634f981582eaedad81abb08104.tar.bz2 pam-5865f521f37846634f981582eaedad81abb08104.zip |
Always ask for old password if changing NIS account
* modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): ask
for old password if NIS account.
Diffstat (limited to 'modules/pam_unix/pam_unix_passwd.c')
-rw-r--r-- | modules/pam_unix/pam_unix_passwd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 9aae3b03..0cfc0f4d 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -614,7 +614,8 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv) if (_unix_blankpasswd(pamh, ctrl, user)) { return PAM_SUCCESS; - } else if (off(UNIX__IAMROOT, ctrl)) { + } else if (off(UNIX__IAMROOT, ctrl) || + (on(UNIX_NIS, ctrl) && _unix_comesfromsource(pamh, user, 0, 1))) { /* instruct user what is happening */ if (asprintf(&Announce, _("Changing password for %s."), user) < 0) { |