dovecot-2.0: Renamed auth-master socket to auth-userdb socket.

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 17 19:55:36 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/fc0022950bad
changeset: 9802:fc0022950bad
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 17 12:52:22 2009 -0400
description:
Renamed auth-master socket to auth-userdb socket.

diffstat:

4 files changed, 13 insertions(+), 34 deletions(-)
dovecot-example.conf                    |   23 +----------------------
dovecot-master-example.conf             |   16 ++++++++--------
src/auth/main.c                         |    6 +++---
src/lib-storage/mail-storage-settings.c |    2 +-

diffs (102 lines):

diff -r 825fd2b3f48e -r fc0022950bad dovecot-example.conf
--- a/dovecot-example.conf	Mon Aug 17 10:45:29 2009 -0400
+++ b/dovecot-example.conf	Mon Aug 17 12:52:22 2009 -0400
@@ -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 -r 825fd2b3f48e -r fc0022950bad dovecot-master-example.conf
--- a/dovecot-master-example.conf	Mon Aug 17 10:45:29 2009 -0400
+++ b/dovecot-master-example.conf	Mon Aug 17 12:52:22 2009 -0400
@@ -37,15 +37,15 @@ service auth {
     mode = 0666
   }
 
-  # postfix smtp-auth
+  # Postfix smtp-auth
+  #unix_listener {
+  #  path = /var/spool/postfix/private/auth
+  #  mode = 0666
+  #}
+
+  # Dovecot LDA
   unix_listener {
-    path = /var/spool/postfix/private/auth
-    mode = 0666
-  }
-
-  # dovecot LDA
-  unix_listener {
-    path = auth-master
+    path = auth-userdb
     mode = 0600
   }
 }
diff -r 825fd2b3f48e -r fc0022950bad src/auth/main.c
--- a/src/auth/main.c	Mon Aug 17 10:45:29 2009 -0400
+++ b/src/auth/main.c	Mon Aug 17 12:52:22 2009 -0400
@@ -129,7 +129,7 @@ static void client_connected(const struc
 		   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 struc
 				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 -r 825fd2b3f48e -r fc0022950bad src/lib-storage/mail-storage-settings.c
--- a/src/lib-storage/mail-storage-settings.c	Mon Aug 17 10:45:29 2009 -0400
+++ b/src/lib-storage/mail-storage-settings.c	Mon Aug 17 12:52:22 2009 -0400
@@ -161,7 +161,7 @@ static struct setting_define mail_user_s
 
 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) "",


More information about the dovecot-cvs mailing list