]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: More fixes to figuring out what type the auth socket is.
authorTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 18:42:59 +0000 (14:42 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 18:42:59 +0000 (14:42 -0400)
--HG--
branch : HEAD

src/auth/main.c

index 52e14f8e43dbf9e4a7252eed2a168aa598e956bf..1860a0b0eeaac96e5b0597bcdf0406f051e38e5e 100644 (file)
@@ -143,12 +143,15 @@ static void client_connected(const struct master_service_connection *conn)
                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) {