summaryrefslogtreecommitdiff
path: root/source/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r--source/smbd/server.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 4217d821f4c..a10968749d9 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -22,6 +22,10 @@
#include "includes.h"
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
static int am_parent = 1;
/* the last message the was processed */
@@ -915,6 +919,14 @@ void build_options(BOOL screen);
* everything after this point is run after the fork()
*/
+#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
+
/* Initialise the password backed before the global_sam_sid
to ensure that we fetch from ldap before we make a domain sid up */