From: Timo Sirainen Date: Fri, 28 Aug 2009 18:42:59 +0000 (-0400) Subject: auth: More fixes to figuring out what type the auth socket is. X-Git-Tag: 2.0.alpha1~232 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7f47c86df52b81bfe46d3d380c8eb4031199737;p=thirdparty%2Fdovecot%2Fcore.git auth: More fixes to figuring out what type the auth socket is. --HG-- branch : HEAD --- diff --git a/src/auth/main.c b/src/auth/main.c index 52e14f8e43..1860a0b0ee 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -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) {