Mercurial > dovecot > core-2.2
changeset 10363:dffe7da9ca2e HEAD
mail-storage-service: Added MAIL_STORAGE_SERVICE_FLAG_ENABLE_CORE_DUMPS flag.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 18 Nov 2009 18:07:48 -0500 |
parents | 28cdf09c062b |
children | 4183f16e6f60 |
files | src/lib-storage/mail-storage-service.c src/lib-storage/mail-storage-service.h |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-storage-service.c Wed Nov 18 15:19:54 2009 -0500 +++ b/src/lib-storage/mail-storage-service.c Wed Nov 18 18:07:48 2009 -0500 @@ -744,7 +744,8 @@ 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) {
--- a/src/lib-storage/mail-storage-service.h Wed Nov 18 15:19:54 2009 -0500 +++ b/src/lib-storage/mail-storage-service.h Wed Nov 18 18:07:48 2009 -0500 @@ -19,8 +19,10 @@ 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 {