dovecot-1.2: auth-master lookup: Give better error message on co...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 5 17:46:59 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/2d4d9b0cdcc1
changeset: 9406:2d4d9b0cdcc1
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 9a8c565adbe1 -r 2d4d9b0cdcc1 src/lib-auth/auth-master.c
--- a/src/lib-auth/auth-master.c Thu Oct 01 16:40:32 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"
@@ -227,8 +228,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