dovecot-2.0-sslstream: mail storage service: If chdir() fails wi...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:56:40 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/05b50522442f
changeset: 10390:05b50522442f
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 23 14:50:20 2009 -0500
description:
mail storage service: If chdir() fails with EACCES, give a better error message.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/lib-storage/mail-storage-service.c |    5 ++++-

diffs (15 lines):

diff -r c9f5b2734710 -r 05b50522442f src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c	Mon Nov 23 13:16:38 2009 -0500
+++ b/src/lib-storage/mail-storage-service.c	Mon Nov 23 14:50:20 2009 -0500
@@ -338,7 +338,10 @@ mail_storage_service_init_post(struct ma
 		/* 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);


More information about the dovecot-cvs mailing list