Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9406:2d4d9b0cdcc1 HEAD
auth-master lookup: Give better error message on connect() EACCES errors.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 05 Oct 2009 10:46:47 -0400 |
parents | 9a8c565adbe1 |
children | a3e16df805e3 |
files | src/lib-auth/auth-master.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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;