dovecot-2.0: auth: Create auth-login socket by default where int...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 19 16:03:52 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/f15b3aac5443
changeset: 11330:f15b3aac5443
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 19 15:03:26 2010 +0200
description:
auth: Create auth-login socket by default where internal user can connect to.

diffstat:

 src/auth/auth-settings.c |   4 +++-
 src/auth/main.c          |  25 ++++++++++++-------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diffs (57 lines):

diff -r 3ee6b83c1689 -r f15b3aac5443 src/auth/auth-settings.c
--- a/src/auth/auth-settings.c	Wed May 19 14:59:11 2010 +0200
+++ b/src/auth/auth-settings.c	Wed May 19 15:03:26 2010 +0200
@@ -17,6 +17,7 @@
 /* <settings checks> */
 static struct file_listener_settings auth_unix_listeners_array[] = {
 	{ "login/login", 0666, "", "" },
+	{ "auth-login", 0600, "$default_internal_user", "" },
 	{ "auth-client", 0600, "", "" },
 	{ "auth-userdb", 0600, "", "" },
 	{ "auth-master", 0600, "", "" }
@@ -25,7 +26,8 @@
 	&auth_unix_listeners_array[0],
 	&auth_unix_listeners_array[1],
 	&auth_unix_listeners_array[2],
-	&auth_unix_listeners_array[3]
+	&auth_unix_listeners_array[3],
+	&auth_unix_listeners_array[4]
 };
 static buffer_t auth_unix_listeners_buf = {
 	auth_unix_listeners, sizeof(auth_unix_listeners), { 0, }
diff -r 3ee6b83c1689 -r f15b3aac5443 src/auth/main.c
--- a/src/auth/main.c	Wed May 19 14:59:11 2010 +0200
+++ b/src/auth/main.c	Wed May 19 15:03:26 2010 +0200
@@ -213,20 +213,19 @@
 			name++;
 
 		suffix = strrchr(name, '-');
-		if (suffix == NULL) {
-			if (strcmp(name, "login") == 0)
-				*type = AUTH_SOCKET_LOGIN_CLIENT;
-			else
-				*type = AUTH_SOCKET_CLIENT;
-		} else {
+		if (suffix == NULL)
+			suffix = name;
+		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;
-		}
+
+		if (strcmp(suffix, "login") == 0)
+			*type = AUTH_SOCKET_LOGIN_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;
 	}
 
 	auth = auth_find_service(NULL);


More information about the dovecot-cvs mailing list