dovecot-2.0: auth: More fixes to figuring out what type the auth...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 28 22:25:41 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/c9a111a50579
changeset: 9820:c9a111a50579
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 28 14:42:59 2009 -0400
description:
auth: More fixes to figuring out what type the auth socket is.

diffstat:

1 file changed, 9 insertions(+), 6 deletions(-)
src/auth/main.c |   15 +++++++++------

diffs (25 lines):

diff -r 3d69f2392d5e -r c9a111a50579 src/auth/main.c
--- a/src/auth/main.c	Fri Aug 28 14:13:02 2009 -0400
+++ b/src/auth/main.c	Fri Aug 28 14:42:59 2009 -0400
@@ -143,12 +143,15 @@ static void client_connected(const struc
 		suffix = strrchr(sa.sun_path, '-');
 		if (suffix == NULL)
 			*type = AUTH_SOCKET_CLIENT;
-		else if (strcmp(suffix, "master") == 0)
-			*type = AUTH_SOCKET_MASTER;
-		else if (strcmp(suffix, "userdb") == 0)
-			*type = AUTH_SOCKET_USERDB;
-		else
-			*type = AUTH_SOCKET_CLIENT;
+		else {
+			suffix++;
+			if (strcmp(suffix, "master") == 0)
+				*type = AUTH_SOCKET_MASTER;
+			else if (strcmp(suffix, "userdb") == 0)
+				*type = AUTH_SOCKET_USERDB;
+			else
+				*type = AUTH_SOCKET_CLIENT;
+		}
 	}
 
 	switch (*type) {


More information about the dovecot-cvs mailing list