summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/fault.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index 02e054b680..dd87ae1100 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -319,14 +319,6 @@ void dump_core_setup(const char *progname)
#endif
#endif
-#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
- /* On Linux we lose the ability to dump core when we change our user
- * ID. We know how to dump core safely, so let's make sure we have our
- * dumpable flag set.
- */
- prctl(PR_SET_DUMPABLE, 1);
-#endif
-
/* FIXME: if we have a core-plus-pid facility, configurably set
* this up here.
*/
@@ -382,6 +374,14 @@ void dump_core_setup(const char *progname)
umask(~(0700));
dbgflush();
+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
+ /* On Linux we lose the ability to dump core when we change our user
+ * ID. We know how to dump core safely, so let's make sure we have our
+ * dumpable flag set.
+ */
+ prctl(PR_SET_DUMPABLE, 1);
+#endif
+
/* Ensure we don't have a signal handler for abort. */
#ifdef SIGABRT
CatchSignal(SIGABRT, SIG_DFL);