[dovecot-cvs] dovecot/src/auth passdb-sql.c,1.17,1.18

cras at dovecot.org cras at dovecot.org
Thu Apr 21 19:15:47 EEST 2005


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

Modified Files:
	passdb-sql.c 
Log Message:
Allow password field to be NULL. Needed with proxies.



Index: passdb-sql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-sql.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- passdb-sql.c	8 Apr 2005 10:25:50 -0000	1.17
+++ passdb-sql.c	21 Apr 2005 16:15:44 -0000	1.18
@@ -73,7 +73,11 @@
 	} else {
 		sql_query_save_results(result, sql_request);
 
-		if (auth_request->passdb_password == NULL) {
+		/* Note that we really want to check if the password field is
+		   found. Just checking if password is set isn't enough,
+		   because with proxies we might want to return NULL as
+		   password. */
+		if (sql_result_find_field(result, "password") < 0) {
 			auth_request_log_error(auth_request, "sql",
 				"Password query must return a field named "
 				"'password'");



More information about the dovecot-cvs mailing list