]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Create auth-login socket by default where internal user can connect to.
authorTimo Sirainen <tss@iki.fi>
Wed, 19 May 2010 13:03:26 +0000 (15:03 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 19 May 2010 13:03:26 +0000 (15:03 +0200)
--HG--
branch : HEAD

src/auth/auth-settings.c
src/auth/main.c

index 67192b916a989552f315b6130735b2e1a07999dc..5fd66b24c200d9326bc55abdb8db3ecf34bd042a 100644 (file)
@@ -17,6 +17,7 @@ static bool auth_userdb_settings_check(void *_set, pool_t pool, const char **err
 /* <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 @@ static struct file_listener_settings *auth_unix_listeners[] = {
        &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, }
index 57228e80c96989ddf18fa77ef5519cca8252767e..4acf2cf4af9852dfe1bb317e17d871feb3d7d96f 100644 (file)
@@ -213,20 +213,19 @@ static void client_connected(const struct master_service_connection *conn)
                        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);