[dovecot-cvs] dovecot/src/auth passdb-ldap.c, 1.44.2.2, 1.44.2.3 passdb-sql.c, 1.27.2.1, 1.27.2.2

tss at dovecot.org tss at dovecot.org
Thu Nov 2 21:20:15 UTC 2006


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

Modified Files:
      Tag: branch_1_0
	passdb-ldap.c passdb-sql.c 
Log Message:
Non-plaintext authentication didn't work with sql as passdb. Cleaned up the
same code for LDAP also.



Index: passdb-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-ldap.c,v
retrieving revision 1.44.2.2
retrieving revision 1.44.2.3
diff -u -d -r1.44.2.2 -r1.44.2.3
--- passdb-ldap.c	10 Aug 2006 19:44:18 -0000	1.44.2.2
+++ passdb-ldap.c	2 Nov 2006 21:19:43 -0000	1.44.2.3
@@ -180,7 +180,9 @@
 		auth_request_log_error(auth_request, "ldap",
 				       "Multiple password replies");
 	} else {
-		password = p_strdup(auth_request->pool, auth_request->passdb_password);
+		/* passdb_password may change on the way,
+		   so we'll need to strdup. */
+		password = t_strdup(auth_request->passdb_password);
 		if (password == NULL)
 			auth_request->no_password = TRUE;
 		passdb_result = PASSDB_RESULT_OK;

Index: passdb-sql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-sql.c,v
retrieving revision 1.27.2.1
retrieving revision 1.27.2.2
diff -u -d -r1.27.2.1 -r1.27.2.2
--- passdb-sql.c	31 May 2006 11:03:50 -0000	1.27.2.1
+++ passdb-sql.c	2 Nov 2006 21:19:43 -0000	1.27.2.2
@@ -85,7 +85,9 @@
 			auth_request_log_error(auth_request, "sql",
 				"Password query returned multiple matches");
 		} else {
-			password = auth_request->passdb_password;
+			/* passdb_password may change on the way,
+			   so we'll need to strdup. */
+			password = t_strdup(auth_request->passdb_password);
 			if (password == NULL)
 				auth_request->no_password = TRUE;
 			passdb_result = PASSDB_RESULT_OK;



More information about the dovecot-cvs mailing list