diff options
author | Steve Langasek <vorlon@debian.org> | 2010-02-01 00:53:46 -0800 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 21:26:02 -0800 |
commit | 2aaa3adecff5ac8132d4abcec8ae96e0a776ba85 (patch) | |
tree | f3a89e238898cdd70ca1dfe451f75cb7b42756f1 | |
parent | 16c056d4c09e4158661c6476849ec1286f902437 (diff) | |
download | pam-2aaa3adecff5ac8132d4abcec8ae96e0a776ba85.tar.gz pam-2aaa3adecff5ac8132d4abcec8ae96e0a776ba85.tar.bz2 pam-2aaa3adecff5ac8132d4abcec8ae96e0a776ba85.zip |
debian/patches/026_pam_unix_passwd_unknown_user: don't return
PAM_USER_UNKNOWN on password change of a user that has no shadow entry,
upstream now implements auto-creating the shadow entry in this case.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches-applied/026_pam_unix_passwd_unknown_user | 36 |
2 files changed, 8 insertions, 31 deletions
diff --git a/debian/changelog b/debian/changelog index fb8fc32e..05893feb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ pam (1.1.1-1) UNRELEASED; urgency=low Closes: #567385, LP: #513955. * Drop patches pam.d-manpage-section, namespace_with_awk_not_gawk, and pam_securetty_tty_check_before_user_check, which are included upstream. + * debian/patches/026_pam_unix_passwd_unknown_user: don't return + PAM_USER_UNKNOWN on password change of a user that has no shadow entry, + upstream now implements auto-creating the shadow entry in this case. * Updated debconf translations: - French, thanks to Jean-Baka Domelevo Entfellner <domelevo@gmail.com> (closes: #547039) diff --git a/debian/patches-applied/026_pam_unix_passwd_unknown_user b/debian/patches-applied/026_pam_unix_passwd_unknown_user index 0c9a88c1..564bab66 100644 --- a/debian/patches-applied/026_pam_unix_passwd_unknown_user +++ b/debian/patches-applied/026_pam_unix_passwd_unknown_user @@ -1,10 +1,10 @@ Patch from Martin Schwenke <martin@meltin.net> -Index: debian-pkg-pam/modules/pam_unix/passverify.c +Index: pam.deb/modules/pam_unix/passverify.c =================================================================== ---- debian-pkg-pam.orig/modules/pam_unix/passverify.c 2009-04-17 12:46:54.000000000 -0700 -+++ debian-pkg-pam/modules/pam_unix/passverify.c 2009-04-17 12:46:58.000000000 -0700 -@@ -720,7 +720,7 @@ +--- pam.deb.orig/modules/pam_unix/passverify.c ++++ pam.deb/modules/pam_unix/passverify.c +@@ -719,7 +719,7 @@ struct passwd *tmpent = NULL; struct stat st; FILE *pwfile, *opwfile; @@ -13,7 +13,7 @@ Index: debian-pkg-pam/modules/pam_unix/passverify.c int oldmask; #ifdef WITH_SELINUX security_context_t prev_context=NULL; -@@ -791,6 +791,7 @@ +@@ -790,6 +790,7 @@ tmpent->pw_passwd = assigned_passwd.charp; err = 0; @@ -30,29 +30,3 @@ Index: debian-pkg-pam/modules/pam_unix/passverify.c } } -@@ -847,7 +848,7 @@ - struct spwd *spwdent = NULL, *stmpent = NULL; - struct stat st; - FILE *pwfile, *opwfile; -- int err = 1; -+ int err = 1, found = 0; - int oldmask; - #ifdef WITH_SELINUX - security_context_t prev_context=NULL; -@@ -918,6 +919,7 @@ - stmpent->sp_pwdp = towhat; - stmpent->sp_lstchg = time(NULL) / (60 * 60 * 24); - err = 0; -+ found = 1; - D(("Set password %s for %s", stmpent->sp_pwdp, forwho)); - } - -@@ -964,7 +966,7 @@ - return PAM_SUCCESS; - } else { - unlink(SH_TMPFILE); -- return PAM_AUTHTOK_ERR; -+ return found ? PAM_AUTHTOK_ERR : PAM_USER_UNKNOWN; - } - } - |