[dovecot-cvs] dovecot/src/deliver auth-client.c,1.1.2.4,1.1.2.5

tss at dovecot.org tss at dovecot.org
Sun Oct 15 16:55:32 UTC 2006


Update of /var/lib/cvs/dovecot/src/deliver
In directory talvi:/tmp/cvs-serv22298

Modified Files:
      Tag: branch_1_0
	auth-client.c 
Log Message:
Use mail_chroot setting.



Index: auth-client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/auth-client.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- auth-client.c	13 Oct 2006 14:30:09 -0000	1.1.2.4
+++ auth-client.c	15 Oct 2006 15:54:59 -0000	1.1.2.5
@@ -49,6 +49,7 @@
 	uid_t uid = 0;
 	gid_t gid = 0;
 	int home_found = FALSE;
+	const char *chroot = getenv("MAIL_CHROOT");
 	bool debug = getenv("DEBUG") != NULL;
 
 	for (tmp = t_strsplit(args, "\t"); *tmp != NULL; tmp++) {
@@ -81,8 +82,7 @@
 						    *tmp + 4, NULL));
 			}
 		} else if (strncmp(*tmp, "chroot=", 7) == 0) {
-			env_put(t_strconcat("RESTRICT_CHROOT=",
-					    *tmp + 7, NULL));
+			chroot = *tmp + 7;
 		} else if (strncmp(*tmp, "home=", 5) == 0) {
 			home_found = TRUE;
 			env_put(t_strconcat("HOME=", *tmp + 5, NULL));
@@ -105,6 +105,9 @@
 		return;
 	}
 
+	if (chroot != NULL)
+		env_put(t_strconcat("RESTRICT_CHROOT=", chroot, NULL));
+
 	restrict_access_by_env(TRUE);
 	return_value = EX_OK;
 }



More information about the dovecot-cvs mailing list