dovecot-2.1: director: Drop privileges only after adding hosts.

dovecot at dovecot.org dovecot at dovecot.org
Tue Jan 17 16:18:15 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/1d54d2963392
changeset: 13937:1d54d2963392
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jan 17 16:18:05 2012 +0200
description:
director: Drop privileges only after adding hosts.
This allows reading files from /etc/ before chrooting.

diffstat:

 src/director/main.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r 352d3f2f8bb7 -r 1d54d2963392 src/director/main.c
--- a/src/director/main.c	Tue Jan 17 16:07:13 2012 +0200
+++ b/src/director/main.c	Tue Jan 17 16:18:05 2012 +0200
@@ -136,9 +136,6 @@
 	struct ip_addr listen_ip;
 	unsigned int listen_port;
 
-	restrict_access_by_env(NULL, FALSE);
-	restrict_access_allow_coredumps(TRUE);
-
 	set = master_service_settings_get_others(master_service)[0];
 
 	listen_port = find_inet_listener_port(&listen_ip, set);
@@ -155,6 +152,9 @@
 				     set->director_mail_servers) < 0)
 		i_fatal("Invalid value for director_mail_servers setting");
 	director->orig_config_hosts = mail_hosts_dup(director->mail_hosts);
+
+	restrict_access_by_env(NULL, FALSE);
+	restrict_access_allow_coredumps(TRUE);
 }
 
 static void main_deinit(void)


More information about the dovecot-cvs mailing list