Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8760:2e563febbc67 HEAD
If chdir() fails with EACCES in mail process creation, log a user-friendly error.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 20 Feb 2009 17:36:26 -0500 |
parents | 6ec819adfde3 |
children | 5e6d0ca437a2 |
files | src/master/mail-process.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/mail-process.c Fri Feb 20 17:35:49 2009 -0500 +++ b/src/master/mail-process.c Fri Feb 20 17:36:26 2009 -0500 @@ -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 @@ !(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) {