Skip to content

Commit

Permalink
lib-master: master-login-auth - Provide more helpful error message fo…
Browse files Browse the repository at this point in the history
…r EACCESS connect error.
  • Loading branch information
stephanbosch committed Feb 3, 2019
1 parent b76ebd3 commit f3fcce3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/lib-master/master-login-auth.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit f3fcce3

Please sign in to comment.