]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: master-login-auth - Provide more helpful error message for EACCESS connec...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 27 Jan 2019 21:14:54 +0000 (22:14 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 3 Feb 2019 11:22:43 +0000 (12:22 +0100)
src/lib-master/master-login-auth.c

index f5a27f883e905063c524eee9934380f3334d003d..f9938f14386f4b38286c82a10fb35a9e70a596fd 100644 (file)
@@ -3,6 +3,7 @@
 #include "lib.h"
 #include "net.h"
 #include "ioloop.h"
+#include "eacces-error.h"
 #include "hostpid.h"
 #include "istream.h"
 #include "ostream.h"
@@ -465,8 +466,14 @@ master_login_auth_connect(struct master_login_auth *auth)
        i_assert(!auth->connected);
 
        if (connection_client_connect(&auth->conn) < 0) {
-               i_error("net_connect_unix(%s) failed: %m",
-                       auth->auth_socket_path);
+               if (errno == EACCES) {
+                       i_error("%s",
+                               eacces_error_get("connect",
+                                                auth->auth_socket_path));
+               } else {
+                       i_error("connect(%s) failed: %m",
+                               auth->auth_socket_path);;
+               }
                return -1;
        }
        io_loop_time_refresh();