dovecot-2.0: lib-master: If binary isn't standalone, enable core...

dovecot at dovecot.org dovecot at dovecot.org
Fri Mar 19 17:24:24 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/edd11ffa467c
changeset: 10951:edd11ffa467c
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Mar 19 16:44:38 2010 +0200
description:
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.

diffstat:

 src/lib-master/master-service.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 566360ae12fc -r edd11ffa467c src/lib-master/master-service.c
--- 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 */


More information about the dovecot-cvs mailing list