diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/server.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 4217d821f4..a10968749d 100644 --- a/source3/smbd/server.c +++ b/source3/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 */ |