Mercurial > dovecot > core-2.2
changeset 10951:edd11ffa467c HEAD
lib-master: If binary isn't standalone, enable core dumping at startup.
Dropping privileges again should disable dumping, and later it's decided by
the binary itself it wants to be dumpable.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 19 Mar 2010 16:44:38 +0200 |
parents | 566360ae12fc |
children | 30e2d65eb67a |
files | src/lib-master/master-service.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-master/master-service.c Fri Mar 19 15:35:11 2010 +0200 +++ b/src/lib-master/master-service.c Fri Mar 19 16:44:38 2010 +0200 @@ -107,6 +107,14 @@ fd_debug_verify_leaks(MASTER_LISTEN_FD_FIRST + count, 1024); } #endif + if ((flags & MASTER_SERVICE_FLAG_STANDALONE) == 0) { + /* make sure we can dump core, at least until + privileges are dropped. (i'm not really sure why this + is needed, because doing the same just before exec + doesn't help, and exec shouldn't affect this with + non-setuid/gid binaries..) */ + restrict_access_allow_coredumps(TRUE); + } /* NOTE: we start rooted, so keep the code minimal until restrict_access_by_env() is called */