changeset 9901:987d244a7a3e HEAD

auth: Allow PASS lookups also in userdb sockets, not just master sockets.
author Timo Sirainen <tss@iki.fi>
date Tue, 08 Sep 2009 14:32:53 -0400
parents 22d27318bb18
children 45e87a15cf48
files src/auth/auth-master-connection.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/auth-master-connection.c	Tue Sep 08 13:28:40 2009 -0400
+++ b/src/auth/auth-master-connection.c	Tue Sep 08 14:32:53 2009 -0400
@@ -374,12 +374,12 @@
 		return master_input_user(conn, line + 5);
 	if (strncmp(line, "LIST\t", 5) == 0)
 		return master_input_list(conn, line + 5);
+	if (strncmp(line, "PASS\t", 5) == 0)
+		return master_input_pass(conn, line + 5);
 
 	if (!conn->userdb_only) {
 		if (strncmp(line, "REQUEST\t", 8) == 0)
 			return master_input_request(conn, line + 8);
-		if (strncmp(line, "PASS\t", 5) == 0)
-			return master_input_pass(conn, line + 5);
 		if (strncmp(line, "CPID\t", 5) == 0) {
 			i_error("Authentication client trying to connect to "
 				"master socket");
@@ -387,7 +387,8 @@
 		}
 	}
 
-	i_error("BUG: Unknown command in master socket: %s",
+	i_error("BUG: Unknown command in %s socket: %s",
+		conn->userdb_only ? "userdb" : "master",
 		str_sanitize(line, 80));
 	return FALSE;
 }