]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail-storage-service: Added MAIL_STORAGE_SERVICE_FLAG_ENABLE_CORE_DUMPS flag.
authorTimo Sirainen <tss@iki.fi>
Wed, 18 Nov 2009 23:07:48 +0000 (18:07 -0500)
committerTimo Sirainen <tss@iki.fi>
Wed, 18 Nov 2009 23:07:48 +0000 (18:07 -0500)
--HG--
branch : HEAD

src/lib-storage/mail-storage-service.c
src/lib-storage/mail-storage-service.h

index 4df24723aa9cc41f7ae67c6d9670eab83dee594d..35471479b74e5342c110f5b1b038f53166d38723 100644 (file)
@@ -744,7 +744,8 @@ int mail_storage_service_next(struct mail_storage_service_ctx *ctx,
                        home, chroot,
                        (ctx->flags & MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT) != 0,
                        temp_priv_drop);
-               if (!temp_priv_drop)
+               if (!temp_priv_drop ||
+                   (ctx->flags & MAIL_STORAGE_SERVICE_FLAG_ENABLE_CORE_DUMPS) != 0)
                        restrict_access_allow_coredumps(TRUE);
        }
        if (!ctx->modules_initialized) {
index cf7eac9d44d6168a6de759996d1f81bfe279ef14..1afaa62eddb871576af33dde4b849f2e37b70ace 100644 (file)
@@ -19,8 +19,10 @@ enum mail_storage_service_flags {
        MAIL_STORAGE_SERVICE_FLAG_NO_CHDIR              = 0x10,
        /* Drop privileges only temporarily (keep running as setuid-root) */
        MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP        = 0x20,
+       /* Enable core dumps even when dropping privileges temporarily */
+       MAIL_STORAGE_SERVICE_FLAG_ENABLE_CORE_DUMPS     = 0x40,
        /* Don't initialize logging or change log prefixes */
-       MAIL_STORAGE_SERVICE_NO_LOG_INIT                = 0x40
+       MAIL_STORAGE_SERVICE_NO_LOG_INIT                = 0x80
 };
 
 struct mail_storage_service_input {