From: Timo Sirainen Date: Thu, 2 Apr 2009 18:00:31 +0000 (-0400) Subject: Try to make sure auth process can dump core, and if it can't try to find why. X-Git-Tag: 1.2.rc1~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c423a9cc14c5872f012be9640cb6e0d66a36717;p=thirdparty%2Fdovecot%2Fcore.git Try to make sure auth process can dump core, and if it can't try to find why. --HG-- branch : HEAD --- diff --git a/src/auth/main.c b/src/auth/main.c index af40acbe36..d91d4732fc 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -234,6 +234,7 @@ static void drop_privileges(void) /* Password lookups etc. may require roots, allow it. */ restrict_access_by_env(FALSE); + restrict_access_allow_coredumps(TRUE); } static void main_init(bool nodaemon) diff --git a/src/master/child-process.c b/src/master/child-process.c index 383effa3b2..138edfd628 100644 --- a/src/master/child-process.c +++ b/src/master/child-process.c @@ -169,6 +169,19 @@ log_coredump(string_t *str, enum process_type process_type, int status) #endif str_append(str, " (core not dumped - is home dir set?)"); return; + case PROCESS_TYPE_AUTH: + case PROCESS_TYPE_AUTH_WORKER: + if (settings_root->auths->uid == 0) + break; +#ifdef HAVE_PR_SET_DUMPABLE + str_printfa(str, " (core not dumped - " + "no permissions for auth user %s in %s?)", + settings_root->auths->user, + settings_root->defaults->base_dir); +#else + str_append(str, " (core not dumped - auth user is not root)"); +#endif + return; default: break; }