dovecot-2.2: lmtp: chdir() to base_dir shouldn't fail - log an e...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 11 09:31:07 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/413962f2b7e7
changeset: 18628:413962f2b7e7
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 11 12:27:39 2015 +0300
description:
lmtp: chdir() to base_dir shouldn't fail - log an error if it does

diffstat:

 src/lmtp/commands.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 69630e6048fd -r 413962f2b7e7 src/lmtp/commands.c
--- a/src/lmtp/commands.c	Sun May 10 12:28:09 2015 +0300
+++ b/src/lmtp/commands.c	Mon May 11 12:27:39 2015 +0300
@@ -1037,7 +1037,9 @@
 		/* enable core dumping again. we need to chdir also to
 		   root-owned directory to get core dumps. */
 		restrict_access_allow_coredumps(TRUE);
-		(void)chdir(base_dir);
+		if (chdir(base_dir) < 0)
+			i_error("chdir(%s) failed: %m", base_dir);
+		}
 	}
 }
 


More information about the dovecot-cvs mailing list