dovecot-2.0: auth: Allow PASS lookups also in userdb sockets, no...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 8 21:34:26 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/987d244a7a3e
changeset: 9901:987d244a7a3e
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 08 14:32:53 2009 -0400
description:
auth: Allow PASS lookups also in userdb sockets, not just master sockets.

diffstat:

1 file changed, 4 insertions(+), 3 deletions(-)
src/auth/auth-master-connection.c |    7 ++++---

diffs (28 lines):

diff -r 22d27318bb18 -r 987d244a7a3e src/auth/auth-master-connection.c
--- 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 @@ auth_master_input_line(struct auth_maste
 		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 @@ auth_master_input_line(struct auth_maste
 		}
 	}
 
-	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;
 }


More information about the dovecot-cvs mailing list