From f3fcce3695711d88bd8dbcb65ca112596ee16a9b Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Sun, 27 Jan 2019 22:14:54 +0100 Subject: [PATCH] lib-master: master-login-auth - Provide more helpful error message for EACCESS connect error. --- src/lib-master/master-login-auth.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib-master/master-login-auth.c b/src/lib-master/master-login-auth.c index f5a27f883e..f9938f1438 100644 --- a/src/lib-master/master-login-auth.c +++ b/src/lib-master/master-login-auth.c @@ -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();