summaryrefslogtreecommitdiff
path: root/debian/patches-applied/021_nis_cleanup
blob: f05c7103393c3326d35cd0bd9c28c6494d6ad8fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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: pam/modules/pam_unix/pam_unix_passwd.c
===================================================================
--- pam.orig/modules/pam_unix/pam_unix_passwd.c
+++ pam/modules/pam_unix/pam_unix_passwd.c
@@ -708,9 +708,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;