[dovecot-cvs] dovecot/src/auth userdb-passwd.c,1.14,1.15

cras at dovecot.org cras at dovecot.org
Sat Apr 16 22:41:39 EEST 2005


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv30241

Modified Files:
	userdb-passwd.c 
Log Message:
Try to detect buggy NSS implementations.



Index: userdb-passwd.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-passwd.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- userdb-passwd.c	28 Feb 2005 22:19:21 -0000	1.14
+++ userdb-passwd.c	16 Apr 2005 19:41:37 -0000	1.15
@@ -23,6 +23,14 @@
 		return;
 	}
 
+	if (strcasecmp(pw->pw_name, auth_request->user) != 0) {
+		/* try to catch broken NSS implementations (nss_ldap) */
+		i_fatal("BROKEN NSS IMPLEMENTATION: "
+			"getpwnam() lookup returned different user than was "
+			"requested (%s != %s).",
+			pw->pw_name, auth_request->user);
+	}
+
 	result = t_strdup_printf("%s\tsystem_user=%s\tuid=%s\tgid=%s\t"
 				 "home=%s", pw->pw_name, pw->pw_name,
 				 dec2str(pw->pw_uid), dec2str(pw->pw_gid),



More information about the dovecot-cvs mailing list