From: Timo Sirainen Date: Fri, 20 Feb 2009 22:36:26 +0000 (-0500) Subject: If chdir() fails with EACCES in mail process creation, log a user-friendly error. X-Git-Tag: 1.2.beta2~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41fe702c284067106eca784a128e403d771595b3;p=thirdparty%2Fdovecot%2Fcore.git If chdir() fails with EACCES in mail process creation, log a user-friendly error. --HG-- branch : HEAD --- diff --git a/src/master/mail-process.c b/src/master/mail-process.c index e58944706e..b040f90511 100644 --- a/src/master/mail-process.c +++ b/src/master/mail-process.c @@ -4,6 +4,7 @@ #include "array.h" #include "hash.h" #include "fd-close-on-exec.h" +#include "eacces-error.h" #include "env-util.h" #include "base64.h" #include "str.h" @@ -814,8 +815,13 @@ create_mail_process(enum process_type process_type, struct settings *set, !(ENOTFOUND(chdir_errno) || chdir_errno == EINTR))) { errno = chdir_errno; - i_fatal("chdir(%s) failed with uid %s: %m", - full_home_dir, dec2str(uid)); + if (errno != EACCES) { + i_fatal("chdir(%s) failed with uid %s: %m", + full_home_dir, dec2str(uid)); + } else { + i_fatal("%s", eacces_error_get("chdir", + full_home_dir)); + } } } if (ret < 0) {