From: Timo Sirainen Date: Wed, 6 Oct 2010 14:54:14 +0000 (+0100) Subject: quota: Give better error message for connect() EACCES failure to quota-warning socket. X-Git-Tag: 2.0.6~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=596ec384269cad3b0f0661df89b9cf33cbd171b7;p=thirdparty%2Fdovecot%2Fcore.git quota: Give better error message for connect() EACCES failure to quota-warning socket. --- diff --git a/src/plugins/quota/quota.c b/src/plugins/quota/quota.c index b29e067d5e..fbf85bc7ed 100644 --- a/src/plugins/quota/quota.c +++ b/src/plugins/quota/quota.c @@ -6,6 +6,7 @@ #include "str.h" #include "network.h" #include "write-full.h" +#include "eacces-error.h" #include "mailbox-list-private.h" #include "quota-private.h" #include "quota-fs.h" @@ -995,7 +996,14 @@ static void quota_warning_execute(struct quota_root *root, const char *cmd) socket_path, NULL); } if ((fd = net_connect_unix_with_retries(socket_path, 1000)) < 0) { - i_error("quota: connect(%s) failed: %m", socket_path); + if (errno == EACCES) { + i_error("quota: %s", + eacces_error_get("net_connect_unix", + socket_path)); + } else { + i_error("quota: net_connect_unix(%s) failed: %m", + socket_path); + } return; }