Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7696:f3508f678485 HEAD
mail_chroot no longer needs to be in valid_chroot_dirs.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 16 Feb 2008 16:27:08 +0200 |
parents | 5b4e578372f7 |
children | a00dc6f78106 |
files | dovecot-example.conf src/master/mail-process.c |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/dovecot-example.conf Sat Feb 16 16:24:21 2008 +0200 +++ b/dovecot-example.conf Sat Feb 16 16:27:08 2008 +0200 @@ -366,7 +366,8 @@ # ':' separated list of directories under which chrooting is allowed for mail # processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too). -# This setting doesn't affect login_chroot or auth chroot variables. +# This setting doesn't affect login_chroot, mail_chroot or auth chroot +# settings. # WARNING: Never add directories here which local users can modify, that # may lead to root exploit. Usually this should be done only if you don't # allow shell access for users. <doc/wiki/Chrooting.txt>
--- a/src/master/mail-process.c Sat Feb 16 16:24:21 2008 +0200 +++ b/src/master/mail-process.c Sat Feb 16 16:27:08 2008 +0200 @@ -614,9 +614,6 @@ return MASTER_LOGIN_STATUS_INTERNAL_ERROR; } - if (*chroot_dir == '\0' && *set->mail_chroot != '\0') - chroot_dir = set->mail_chroot; - if (*chroot_dir != '\0') { if (!validate_chroot(set, chroot_dir)) { i_error("Invalid chroot directory '%s' (user %s) " @@ -630,6 +627,10 @@ chroot_dir, user); return MASTER_LOGIN_STATUS_INTERNAL_ERROR; } + } else if (*set->mail_chroot != '\0') { + /* mail_chroot setting's value doesn't need to be in + valid_chroot_dirs. */ + chroot_dir = set->mail_chroot; } if (!dump_capability) {