diff options
author | Steve Langasek <vorlon@debian.org> | 2019-01-02 12:24:44 -0800 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-02 12:27:24 -0800 |
commit | a6f4ab0bebc76acf85cc0244bd21c1036009c28c (patch) | |
tree | df0d6a57d2b91ab9038e8d7b0d62f28c2daa66db /debian/patches-applied/021_nis_cleanup | |
parent | 10b6243f4664747e815372070142d6c5853176da (diff) | |
download | pam-a6f4ab0bebc76acf85cc0244bd21c1036009c28c.tar.gz pam-a6f4ab0bebc76acf85cc0244bd21c1036009c28c.tar.bz2 pam-a6f4ab0bebc76acf85cc0244bd21c1036009c28c.zip |
fix-up commit for grafting svn history onto git history
Diffstat (limited to 'debian/patches-applied/021_nis_cleanup')
-rw-r--r-- | debian/patches-applied/021_nis_cleanup | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches-applied/021_nis_cleanup b/debian/patches-applied/021_nis_cleanup new file mode 100644 index 00000000..f3345052 --- /dev/null +++ b/debian/patches-applied/021_nis_cleanup @@ -0,0 +1,44 @@ +Patch from Philippe Troin <phil@fifi.org> + +Originally this included a bunch of changes to locking, but the more +recent code pulled from Linux_pam CVS seems to fix that issue. + +Index: Linux-PAM/modules/pam_unix/pam_unix_passwd.c +=================================================================== +--- Linux-PAM/modules/pam_unix/pam_unix_passwd.c.orig ++++ Linux-PAM/modules/pam_unix/pam_unix_passwd.c +@@ -1107,7 +1107,7 @@ + + 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)) { + /* instruct user what is happening */ + if (asprintf(&Announce, _("Changing password for %s."), + user) < 0) { +@@ -1120,7 +1120,9 @@ + set(UNIX__OLD_PASSWD, lctrl); + retval = _unix_read_password(pamh, lctrl + ,Announce +- ,_("(current) UNIX password: ") ++ ,(on(UNIX__IAMROOT, ctrl) ++ ? _("NIS server root password: ") ++ : _("(current) UNIX password: ")) + ,NULL + ,_UNIX_OLD_AUTHTOK + ,&pass_old); +@@ -1131,9 +1133,12 @@ + "password - (old) token not obtained"); + return retval; + } +- /* verify that this is the password for this user */ ++ /* verify that this is the password for this user ++ * if we're not using NIS */ + +- retval = _unix_verify_password(pamh, user, pass_old, ctrl); ++ if (off(UNIX_NIS, ctrl)) { ++ retval = _unix_verify_password(pamh, user, pass_old, ctrl); ++ } + } else { + D(("process run by root so do nothing this time around")); + pass_old = NULL; |