[dovecot-cvs] dovecot/src/master mail-process.c,1.117,1.118

tss at dovecot.org tss at dovecot.org
Wed Mar 21 22:31:20 EET 2007


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

Modified Files:
	mail-process.c 
Log Message:
NFS check + chroots broke home directory for the first login.



Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- mail-process.c	15 Mar 2007 15:53:05 -0000	1.117
+++ mail-process.c	21 Mar 2007 20:31:15 -0000	1.118
@@ -587,9 +587,10 @@
 	if (dump_capability)
 		env_put("DUMP_CAPABILITY=1");
 
-	if (*home_dir == '\0')
+	if (*home_dir == '\0') {
+		full_home_dir = "";
 		ret = -1;
-	else {
+	} else {
 		full_home_dir = *chroot_dir == '\0' ? home_dir :
 			t_strconcat(chroot_dir, "/", home_dir, NULL);
 		/* NOTE: if home directory is NFS-mounted, we might not
@@ -648,11 +649,8 @@
 		}
 	}
 
-	if (nfs_check) {
-		if (*chroot_dir != '\0')
-			home_dir = t_strconcat(chroot_dir, "/", home_dir, NULL);
-		nfs_warn_if_found(getenv("MAIL"), chroot_dir, home_dir);
-	}
+	if (nfs_check)
+		nfs_warn_if_found(getenv("MAIL"), chroot_dir, full_home_dir);
 
 	env_put("LOGGED_IN=1");
 	env_put(t_strconcat("HOME=", home_dir, NULL));



More information about the dovecot-cvs mailing list