]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail storage service: If chdir() fails with EACCES, give a better error message.
authorTimo Sirainen <tss@iki.fi>
Mon, 23 Nov 2009 19:50:20 +0000 (14:50 -0500)
committerTimo Sirainen <tss@iki.fi>
Mon, 23 Nov 2009 19:50:20 +0000 (14:50 -0500)
--HG--
branch : HEAD

src/lib-storage/mail-storage-service.c

index af3d61fd9b9de4c94f71d8fe82123ac5a6a55dc5..5f818d61d026629196ecdd45ff7cb84c629c2731 100644 (file)
@@ -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);