[dovecot-cvs] dovecot/src/master mail-process.c, 1.96.2.18, 1.96.2.19

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


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

Modified Files:
      Tag: branch_1_0
	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.96.2.18
retrieving revision 1.96.2.19
diff -u -d -r1.96.2.18 -r1.96.2.19
--- mail-process.c	15 Mar 2007 15:52:56 -0000	1.96.2.18
+++ mail-process.c	21 Mar 2007 20:31:11 -0000	1.96.2.19
@@ -589,9 +589,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
@@ -650,11 +651,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