From: Timo Sirainen Date: Mon, 23 Nov 2009 19:50:20 +0000 (-0500) Subject: mail storage service: If chdir() fails with EACCES, give a better error message. X-Git-Tag: 2.0.beta1~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ee3fdb5e94ae6f34cb873ca3c9858342621e55f;p=thirdparty%2Fdovecot%2Fcore.git mail storage service: If chdir() fails with EACCES, give a better error message. --HG-- branch : HEAD --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index af3d61fd9b..5f818d61d0 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -338,7 +338,10 @@ mail_storage_service_init_post(struct mail_storage_service_ctx *ctx, /* If possible chdir to home directory, so that core file could be written in case we crash. */ if (chdir(home) < 0) { - if (errno != ENOENT) + if (errno == EACCES) { + i_error("%s", eacces_error_get("chdir", + t_strconcat(home, "/", NULL))); + } if (errno != ENOENT) i_error("chdir(%s) failed: %m", home); else if (mail_set->mail_debug) i_debug("Home dir not found: %s", home);