]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict client: If connect to server socket fails with EACCES, give better error message.
authorTimo Sirainen <tss@iki.fi>
Tue, 21 Sep 2010 13:59:59 +0000 (14:59 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 21 Sep 2010 13:59:59 +0000 (14:59 +0100)
src/lib-dict/dict-client.c

index 6e5e33797f907ebf8623c56d6ef8f5b70586dfa0..c72b2a9c08a5311b1c1591587d029e8176eab73a 100644 (file)
@@ -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;
        }