/* 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;
}
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,
/* 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 {