]> 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 16:57:35 +0000 (11:57 -0500)
committerTimo Sirainen <tss@iki.fi>
Tue, 3 Feb 2009 16:57:35 +0000 (11:57 -0500)
--HG--
branch : HEAD

src/master/mail-process.c

index 117b9de67189ce2536af9fc1fd9a30479d15c457..4e02f00724f58b45d20c5cc7c3254ee2fac01e66 100644 (file)
@@ -768,7 +768,7 @@ create_mail_process(enum process_type process_type, struct 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);
 
@@ -777,7 +777,7 @@ create_mail_process(enum process_type process_type, struct 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 {