summaryrefslogtreecommitdiff
path: root/debian/patches-applied/thread-safe_save_old_password.patch
blob: c5d578b6fecadf574ad5f6bbc570fe137284b031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Patch to keep save_old_password() thread-safe when called by the PAM
module, since nothing blocks other threads from calling getpwnam in
parallel

Authors: Steve Langasek <vorlon@debian.org>

Upstream status: to be submitted

Index: pam.deb/modules/pam_unix/passverify.c
===================================================================
--- pam.deb.orig/modules/pam_unix/passverify.c
+++ pam.deb/modules/pam_unix/passverify.c
@@ -653,7 +653,7 @@
     fclose(opwfile);
 
     if (!found) {
-	pwd = getpwnam(forwho);
+	pwd = pam_modutil_getpwnam(pamh, forwho);
 	if (pwd == NULL) {
 	    err = 1;
 	} else {