dovecot-2.0: service settings: Base relative chroots under base_...
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 5 01:11:24 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/66bb019c664c
changeset: 9211:66bb019c664c
user: Timo Sirainen <tss at iki.fi>
date: Mon May 04 18:11:19 2009 -0400
description:
service settings: Base relative chroots under base_dir.
diffstat:
1 file changed, 13 insertions(+)
src/master/master-settings.c | 13 +++++++++++++
diffs (23 lines):
diff -r 189a92535cc7 -r 66bb019c664c src/master/master-settings.c
--- a/src/master/master-settings.c Mon May 04 18:10:03 2009 -0400
+++ b/src/master/master-settings.c Mon May 04 18:11:19 2009 -0400
@@ -243,6 +243,19 @@ master_settings_verify(void *_set, pool_
p_strconcat(pool, set->libexec_dir, "/",
services[i]->executable, NULL);
}
+ if (*services[i]->chroot != '/' &&
+ *services[i]->chroot != '\0') {
+ services[i]->chroot =
+ p_strconcat(pool, set->base_dir, "/",
+ services[i]->chroot, NULL);
+ }
+ if (services[i]->drop_priv_before_exec &&
+ *services[i]->chroot != '\0') {
+ *error_r = t_strdup_printf("service(%s): "
+ "drop_priv_before_exec=yes can't be "
+ "used with chroot", services[i]->executable);
+ return FALSE;
+ }
fix_file_listener_paths(&services[i]->unix_listeners,
pool, set->base_dir);
fix_file_listener_paths(&services[i]->fifo_listeners,
More information about the dovecot-cvs
mailing list