From: Timo Sirainen Date: Mon, 17 Aug 2009 16:52:22 +0000 (-0400) Subject: Renamed auth-master socket to auth-userdb socket. X-Git-Tag: 2.0.alpha1~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d32ae27503cd011a116363b4e9a49db02333eb1;p=thirdparty%2Fdovecot%2Fcore.git Renamed auth-master socket to auth-userdb socket. --HG-- branch : HEAD --- diff --git a/dovecot-example.conf b/dovecot-example.conf index 0135dea9b3..b42efc8fe6 100644 --- a/dovecot-example.conf +++ b/dovecot-example.conf @@ -833,7 +833,7 @@ protocol lda { # UNIX socket path to master authentication server to find users. # This is used by imap (for shared users) and lda. -#auth_socket_path = /var/run/dovecot/auth-master +#auth_socket_path = /var/run/dovecot/auth-userdb auth default { # Space separated list of wanted authentication mechanisms: @@ -1064,27 +1064,6 @@ auth default { # X509_NAME_get_text_by_NID() which returns the subject's DN's # CommonName. #ssl_username_from_cert = no - - # It's possible to export the authentication interface to other programs: - #socket listen { - #master { - # Master socket provides access to userdb information. It's typically - # used to give Dovecot's local delivery agent access to userdb so it - # can find mailbox locations. - #path = /var/run/dovecot/auth-master - #mode = 0600 - # Default user/group is the one who started dovecot-auth (root) - #user = - #group = - #} - #client { - # The client socket is generally safe to export to everyone. Typical use - # is to export it to your SMTP server so it can do SMTP AUTH lookups - # using it. - #path = /var/run/dovecot/auth-client - #mode = 0660 - #} - #} } # If you wish to use another authentication server than dovecot-auth, you can diff --git a/dovecot-master-example.conf b/dovecot-master-example.conf index 9e45c52c8d..167a848b96 100644 --- a/dovecot-master-example.conf +++ b/dovecot-master-example.conf @@ -37,15 +37,15 @@ service auth { mode = 0666 } - # postfix smtp-auth - unix_listener { - path = /var/spool/postfix/private/auth - mode = 0666 - } + # Postfix smtp-auth + #unix_listener { + # path = /var/spool/postfix/private/auth + # mode = 0666 + #} - # dovecot LDA + # Dovecot LDA unix_listener { - path = auth-master + path = auth-userdb mode = 0600 } } diff --git a/src/auth/main.c b/src/auth/main.c index 21273c218d..b1079cd38a 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -129,7 +129,7 @@ static void client_connected(const struct master_service_connection *conn) checking the socket path name. */ struct sockaddr_un sa; socklen_t addrlen = sizeof(sa); - size_t len; + const char *suffix; if (getsockname(conn->listen_fd, (void *)&sa, &addrlen) < 0) i_fatal("getsockname(%d) failed: %m", conn->listen_fd); @@ -138,8 +138,8 @@ static void client_connected(const struct master_service_connection *conn) conn->listen_fd); } - len = strlen(sa.sun_path); - if (len > 7 && strcmp(sa.sun_path + len - 7, "-master") == 0) + suffix = strrchr(sa.sun_path, '-'); + if (strcmp(suffix, "master") == 0) *type = AUTH_SOCKET_MASTER; else *type = AUTH_SOCKET_CLIENT; diff --git a/src/lib-storage/mail-storage-settings.c b/src/lib-storage/mail-storage-settings.c index e5081bdc33..2ef4e34daf 100644 --- a/src/lib-storage/mail-storage-settings.c +++ b/src/lib-storage/mail-storage-settings.c @@ -161,7 +161,7 @@ static struct setting_define mail_user_setting_defines[] = { static struct mail_user_settings mail_user_default_settings = { MEMBER(base_dir) PKG_RUNDIR, - MEMBER(auth_socket_path) "auth-master", + MEMBER(auth_socket_path) "auth-userdb", MEMBER(mail_uid) "", MEMBER(mail_gid) "",