changeset 18628:413962f2b7e7

lmtp: chdir() to base_dir shouldn't fail - log an error if it does
author Timo Sirainen <tss@iki.fi>
date Mon, 11 May 2015 12:27:39 +0300
parents 69630e6048fd
children 9c4d1e1e252f
files src/lmtp/commands.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
+		}
 	}
 }