[dovecot-cvs] dovecot/src/master mail-process.c,1.76,1.77

cras at dovecot.org cras at dovecot.org
Sat Oct 1 12:48:14 EEST 2005


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv28239/master

Modified Files:
	mail-process.c 
Log Message:
If user's home directory is a non-directory (eg. /dev/null) fallback to /tmp
without error message.



Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- mail-process.c	11 Sep 2005 10:52:00 -0000	1.76
+++ mail-process.c	1 Oct 2005 09:48:11 -0000	1.77
@@ -456,8 +456,10 @@
 
 		/* If user's home directory doesn't exist and we're not
 		   trying to chroot anywhere, fallback to /tmp as the mails
-		   could be stored elsewhere. */
-		if (ret < 0 && (errno != ENOENT || *chroot_dir != '\0')) {
+		   could be stored elsewhere. The ENOTDIR check is mostly for
+		   /dev/null home directory. */
+		if (ret < 0 && ((errno != ENOENT && errno != ENOTDIR) ||
+				*chroot_dir != '\0')) {
 			i_fatal("chdir(%s) failed with uid %s: %m",
 				full_home_dir, dec2str(uid));
 		}



More information about the dovecot-cvs mailing list