]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail storage service: Added MAIL_STORAGE_SERVICE_NO_LOG_INIT flag.
authorTimo Sirainen <tss@iki.fi>
Fri, 6 Nov 2009 01:15:40 +0000 (20:15 -0500)
committerTimo Sirainen <tss@iki.fi>
Fri, 6 Nov 2009 01:15:40 +0000 (20:15 -0500)
--HG--
branch : HEAD

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

index dfe489c7baaf53928022874d957931dcc11f4155..40d25be6f34bba69bc0514c1dc7a69797a17fc38 100644 (file)
@@ -490,8 +490,10 @@ mail_storage_service_init(struct master_service *service,
 
        /* do all the global initialization. delay initializing plugins until
           we drop privileges the first time. */
-       master_service_init_log(service, t_strconcat(service->name, ": ", NULL));
-
+       if ((flags & MAIL_STORAGE_SERVICE_NO_LOG_INIT) == 0) {
+               master_service_init_log(service,
+                                       t_strconcat(service->name, ": ", NULL));
+       }
        dict_drivers_register_builtin();
        return ctx;
 }
@@ -736,7 +738,8 @@ int mail_storage_service_next(struct mail_storage_service_ctx *ctx,
                return -1;
        }
 
-       mail_storage_service_init_log(ctx->service, user);
+       if ((ctx->flags & MAIL_STORAGE_SERVICE_NO_LOG_INIT) == 0)
+               mail_storage_service_init_log(ctx->service, user);
 
        if ((ctx->flags & MAIL_STORAGE_SERVICE_FLAG_NO_RESTRICT_ACCESS) == 0) {
                service_drop_privileges(user_set, user->system_groups_user,
index dbe5da0080711098c60260b45285a6cc0ad881cc..de12b8fde134bf71f2cbedbde32c03780885d594 100644 (file)
@@ -18,7 +18,9 @@ enum mail_storage_service_flags {
        /* Don't chdir() to user's home */
        MAIL_STORAGE_SERVICE_FLAG_NO_CHDIR              = 0x10,
        /* Drop privileges only temporarily (keep running as setuid-root) */
-       MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP        = 0x20
+       MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP        = 0x20,
+       /* Don't initialize logging or change log prefixes */
+       MAIL_STORAGE_SERVICE_NO_LOG_INIT                = 0x40
 };
 
 struct mail_storage_service_input {