]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
If mail_chroot is set, don't fail at startup in dump-capability.
authorTimo Sirainen <tss@iki.fi>
Tue, 3 Feb 2009 17:00:23 +0000 (12:00 -0500)
committerTimo Sirainen <tss@iki.fi>
Tue, 3 Feb 2009 17:00:23 +0000 (12:00 -0500)
--HG--
branch : HEAD

src/master/mail-process.c

index 208e84b886b09aee90bc52f9a32196d2e89f95ea..248621b6be16992b37ae521b126265ba5389e63b 100644 (file)
@@ -537,7 +537,7 @@ create_mail_process(enum process_type process_type, struct master_settings *set,
        /* setup environment - set the most important environment first
           (paranoia about filling up environment without noticing) */
        restrict_access_set_env(system_user, uid, gid, set->mail_priv_gid_t,
-                               chroot_dir,
+                               dump_capability ? "" : chroot_dir,
                                set->first_valid_gid, set->last_valid_gid,
                                set->mail_access_groups);
 
@@ -546,7 +546,7 @@ create_mail_process(enum process_type process_type, struct master_settings *set,
        if (dump_capability)
                env_put("DUMP_CAPABILITY=1");
 
-       if (*home_dir == '\0' && *chroot_dir == '\0') {
+       if ((*home_dir == '\0' && *chroot_dir == '\0') || dump_capability) {
                full_home_dir = "";
                ret = -1;
        } else {