dovecot-2.2: doveadm-server: If socket is 0600 mode there's neve...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 20 03:26:24 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/ed641f7da63b
changeset: 14265:ed641f7da63b
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 04 10:35:25 2012 +0200
description:
doveadm-server: If socket is 0600 mode there's never no need to authenticate.
Even if the socket's owner doesn't match the process's effective UID. This
could be e.g. because socket owner is root, while doveadm-server runs as
vmail.

diffstat:

 src/doveadm/client-connection.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 21d5e258d69c -r ed641f7da63b src/doveadm/client-connection.c
--- a/src/doveadm/client-connection.c	Sun Mar 04 10:26:32 2012 +0200
+++ b/src/doveadm/client-connection.c	Sun Mar 04 10:35:25 2012 +0200
@@ -364,7 +364,7 @@
 	   fstat() always returns mode as 0777 */
 	if (net_getunixname(listen_fd, &listen_path) == 0 &&
 	    stat(listen_path, &st) == 0 && S_ISSOCK(st.st_mode) &&
-	    (st.st_mode & 0777) == 0600 && st.st_uid == geteuid()) {
+	    (st.st_mode & 0777) == 0600) {
 		/* no need for client to authenticate */
 		conn->authenticated = TRUE;
 		o_stream_send(conn->output, "+\n", 2);


More information about the dovecot-cvs mailing list