From 87e603100685f9eb7faf995d2600edd0a578dd0c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 21 Sep 2010 14:59:59 +0100 Subject: [PATCH] dict client: If connect to server socket fails with EACCES, give better error message. --- src/lib-dict/dict-client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib-dict/dict-client.c b/src/lib-dict/dict-client.c index 6e5e33797f..c72b2a9c08 100644 --- a/src/lib-dict/dict-client.c +++ b/src/lib-dict/dict-client.c @@ -6,6 +6,7 @@ #include "network.h" #include "istream.h" #include "ostream.h" +#include "eacces-error.h" #include "dict-private.h" #include "dict-client.h" @@ -408,7 +409,13 @@ static int client_dict_connect(struct client_dict *dict) dict->fd = net_connect_unix(dict->path); if (dict->fd == -1) { dict->last_failed_connect = ioloop_time; - i_error("net_connect_unix(%s) failed: %m", dict->path); + if (errno == EACCES) { + i_fatal("%s", eacces_error_get("net_connect_unix", + dict->path)); + } else { + i_fatal("net_connect_unix(%s) failed: %m", + dict->path); + } return -1; } -- 2.47.3