dovecot-2.0: auth: Give better EACCES error if we can't connect ...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 31 22:04:28 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/1d895c7a753d
changeset: 12051:1d895c7a753d
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 31 20:04:24 2010 +0100
description:
auth: Give better EACCES error if we can't connect to auth-worker.
diffstat:
src/auth/auth-worker-server.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 8db227a70bec -r 1d895c7a753d src/auth/auth-worker-server.c
--- a/src/auth/auth-worker-server.c Tue Aug 31 20:04:10 2010 +0100
+++ b/src/auth/auth-worker-server.c Tue Aug 31 20:04:24 2010 +0100
@@ -9,6 +9,7 @@
#include "ostream.h"
#include "hex-binary.h"
#include "str.h"
+#include "eacces-error.h"
#include "auth-request.h"
#include "auth-worker-client.h"
#include "auth-worker-server.h"
@@ -153,8 +154,13 @@
fd = net_connect_unix_with_retries(worker_socket_path, 5000);
if (fd == -1) {
- i_fatal("net_connect_unix(%s) failed: %m",
- worker_socket_path);
+ if (errno == EACCES) {
+ i_fatal("%s", eacces_error_get("net_connect_unix",
+ worker_socket_path));
+ } else {
+ i_fatal("net_connect_unix(%s) failed: %m",
+ worker_socket_path);
+ }
}
conn = i_new(struct auth_worker_connection, 1);
More information about the dovecot-cvs
mailing list