dovecot-2.0: auth-master lookup: Give better error message on co...

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 5 17:47:21 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/8a1eef211ad6
changeset: 9964:8a1eef211ad6
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 05 10:46:47 2009 -0400
description:
auth-master lookup: Give better error message on connect() EACCES errors.

diffstat:

1 file changed, 9 insertions(+), 2 deletions(-)
src/lib-auth/auth-master.c |   11 +++++++++--

diffs (28 lines):

diff -r 6a3667ea47d7 -r 8a1eef211ad6 src/lib-auth/auth-master.c
--- a/src/lib-auth/auth-master.c	Thu Oct 01 17:55:13 2009 -0400
+++ b/src/lib-auth/auth-master.c	Mon Oct 05 10:46:47 2009 -0400
@@ -4,6 +4,7 @@
 #include "lib-signals.h"
 #include "array.h"
 #include "ioloop.h"
+#include "eacces-error.h"
 #include "network.h"
 #include "istream.h"
 #include "ostream.h"
@@ -281,8 +282,14 @@ static int auth_master_connect(struct au
 		usleep(((rand() % 10) + 1) * 10000);
 	}
 	if (fd == -1) {
-		i_error("userdb lookup: connect(%s) failed: %m",
-			conn->auth_socket_path);
+		if (errno == EACCES) {
+			i_error("userdb lookup: %s",
+				eacces_error_get("connect",
+						 conn->auth_socket_path));
+		} else {
+			i_error("userdb lookup: connect(%s) failed: %m",
+				conn->auth_socket_path);
+		}
 		return -1;
 	}
 	conn->fd = fd;


More information about the dovecot-cvs mailing list