summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2008-07-26 10:29:33 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:01:53 -0800
commit63bb791f89e05b1c80a4175ccd819914f32f7c04 (patch)
tree311211910529684e50ae8532d161d0814d00a0cb /debian
parent5f3aec4da1bf24c97d8ab4552b14dbcad4c21f68 (diff)
026_pam_unix_passwd_unknown_user: drop a redundant, and broken, check for
the NSS source of our user; this was preventing password changes for NIS users, which otherwise should have worked. Closes: #203222.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches-applied/026_pam_unix_passwd_unknown_user35
2 files changed, 16 insertions, 22 deletions
diff --git a/debian/changelog b/debian/changelog
index 6ca3b874..7b2f17ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,9 @@ pam (0.99.10.0-1) UNRELEASED; urgency=low
* Create /etc/environment on initial install of libpam-modules (or on
upgrade from an old version), to quell warnings in the logs about it
being missing. Closes: #442049.
+ * 026_pam_unix_passwd_unknown_user: drop a redundant, and broken, check for
+ the NSS source of our user; this was preventing password changes for NIS
+ users, which otherwise should have worked. Closes: #203222.
-- Steve Langasek <vorlon@debian.org> Tue, 22 Jul 2008 10:55:45 -0700
diff --git a/debian/patches-applied/026_pam_unix_passwd_unknown_user b/debian/patches-applied/026_pam_unix_passwd_unknown_user
index bf4a4786..e943999a 100644
--- a/debian/patches-applied/026_pam_unix_passwd_unknown_user
+++ b/debian/patches-applied/026_pam_unix_passwd_unknown_user
@@ -1,19 +1,19 @@
Patch from Martin Schwenke <martin@meltin.net>
-Index: Linux-PAM/modules/pam_unix/pam_unix_passwd.c
+Index: pam.deb/modules/pam_unix/passverify.c
===================================================================
---- Linux-PAM/modules/pam_unix/pam_unix_passwd.c.orig
-+++ Linux-PAM/modules/pam_unix/pam_unix_passwd.c
-@@ -516,7 +516,7 @@
+--- pam.deb.orig/modules/pam_unix/passverify.c
++++ pam.deb/modules/pam_unix/passverify.c
+@@ -714,7 +714,7 @@
struct passwd *tmpent = NULL;
struct stat st;
FILE *pwfile, *opwfile;
- int err = 1;
+ int err = 1, found = 0;
int oldmask;
-
- oldmask = umask(077);
-@@ -584,6 +584,7 @@
+ #ifdef WITH_SELINUX
+ security_context_t prev_context=NULL;
+@@ -785,6 +785,7 @@
tmpent->pw_passwd = assigned_passwd.charp;
err = 0;
@@ -21,7 +21,7 @@ Index: Linux-PAM/modules/pam_unix/pam_unix_passwd.c
}
if (putpwent(tmpent, pwfile)) {
D(("error writing entry to password file: %m"));
-@@ -620,7 +621,7 @@
+@@ -826,7 +827,7 @@
return PAM_SUCCESS;
} else {
unlink(PW_TMPFILE);
@@ -30,16 +30,16 @@ Index: Linux-PAM/modules/pam_unix/pam_unix_passwd.c
}
}
-@@ -629,7 +630,7 @@
+@@ -841,7 +842,7 @@
struct spwd *spwdent = NULL, *stmpent = NULL;
struct stat st;
FILE *pwfile, *opwfile;
- int err = 1;
+ int err = 1, found = 0;
int oldmask;
-
- spwdent = getspnam(forwho);
-@@ -697,6 +698,7 @@
+ #ifdef WITH_SELINUX
+ security_context_t prev_context=NULL;
+@@ -912,6 +913,7 @@
stmpent->sp_pwdp = towhat;
stmpent->sp_lstchg = time(NULL) / (60 * 60 * 24);
err = 0;
@@ -47,7 +47,7 @@ Index: Linux-PAM/modules/pam_unix/pam_unix_passwd.c
D(("Set password %s for %s", stmpent->sp_pwdp, forwho));
}
-@@ -738,7 +740,7 @@
+@@ -958,7 +960,7 @@
return PAM_SUCCESS;
} else {
unlink(SH_TMPFILE);
@@ -56,12 +56,3 @@ Index: Linux-PAM/modules/pam_unix/pam_unix_passwd.c
}
}
-@@ -885,7 +887,7 @@
- int retval = PAM_SUCCESS;
-
- /* UNIX passwords area */
-- pwd = getpwnam(user); /* Get password file entry... */
-+ _unix_getpwnam(pamh, user, 1, 0, &pwd); /* Get password *file* entry... */
- if (pwd == NULL)
- return PAM_AUTHINFO_UNAVAIL; /* We don't need to do the rest... */
-