[Dovecot] Chrooting the Mail processes
Timo Sirainen
tss at iki.fi
Mon Aug 25 06:04:52 EEST 2003
On Monday, Aug 25, 2003, at 02:14 Europe/Helsinki, Timo Sirainen wrote:
>> static int validate_chroot(const char *dir)
>
> I don't see why not? The point of that function is to return TRUE if
> given directory is found from valid_chroot_dirs list.
Well, it crashed before calling it :)
--- mail-process.c 24 Aug 2003 13:14:47 -0000 1.32
+++ mail-process.c 25 Aug 2003 03:02:49 -0000 1.33
@@ -156,7 +156,7 @@
home_dir = data + reply->home_idx;
chroot_dir = data + reply->chroot_idx;
- if (*chroot_dir == '\0')
+ if (*chroot_dir == '\0' && set->mail_chroot != NULL)
chroot_dir = set->mail_chroot;
if (*chroot_dir != '\0' && !validate_chroot(set, chroot_dir)) {
More information about the dovecot
mailing list