dovecot-2.0: auth: Don't crash at startup if auth socket name do...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 24 23:44:12 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/07e966c5e5d3
changeset: 9810:07e966c5e5d3
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 24 16:44:03 2009 -0400
description:
auth: Don't crash at startup if auth socket name doesn't contain "-".

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/auth/main.c |    4 +++-

diffs (14 lines):

diff -r fa76c740ee41 -r 07e966c5e5d3 src/auth/main.c
--- a/src/auth/main.c	Mon Aug 24 14:09:49 2009 -0400
+++ b/src/auth/main.c	Mon Aug 24 16:44:03 2009 -0400
@@ -141,7 +141,9 @@ static void client_connected(const struc
 		}
 
 		suffix = strrchr(sa.sun_path, '-');
-		if (strcmp(suffix, "master") == 0)
+		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;


More information about the dovecot-cvs mailing list