]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Try to make sure auth process can dump core, and if it can't try to find why.
authorTimo Sirainen <tss@iki.fi>
Thu, 2 Apr 2009 18:00:31 +0000 (14:00 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 2 Apr 2009 18:00:31 +0000 (14:00 -0400)
--HG--
branch : HEAD

src/auth/main.c
src/master/child-process.c

index af40acbe36d9029499ae1a738edc74a5de4e5adc..d91d4732fc29035973b17027cc237b2a093b2c54 100644 (file)
@@ -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)
index 383effa3b278bd017ebac036b3173c0e732fe39a..138edfd628fa39149a5dd1c905ffbdd483f5afe3 100644 (file)
@@ -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;
        }