diff options
author | James Peach <jpeach@samba.org> | 2005-09-08 01:05:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:03:33 -0500 |
commit | 7c97a1bcc34892d7bf697b9421ba8caf4061d9b5 (patch) | |
tree | 35c3aad276c83010484ca844e41b16cdfc0aed6a /source/smbd | |
parent | c7f7bcdb0f03068c983e89ba2f47655e77491434 (diff) | |
download | samba-7c97a1bcc34892d7bf697b9421ba8caf4061d9b5.tar.gz samba-7c97a1bcc34892d7bf697b9421ba8caf4061d9b5.tar.xz samba-7c97a1bcc34892d7bf697b9421ba8caf4061d9b5.zip |
r10068: Use prctl(PR_SET_DUMPABLE) to make sure we can always leave a good
looking corpse on Linux.
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/server.c | 12 |
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 */ |