From f2b795e9cf3ddb0f6bf0929bd0e423d39d6d239a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 4 Oct 2011 10:47:46 +0200 Subject: lib/util: make sure panic action can attach a debugger on ubuntu (>=10.10) By default user processes can't attach a debugger to a process. So explicitly allow that for all child processes, before calling the panic action script. metze --- lib/util/fault.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/util/fault.c b/lib/util/fault.c index ed7684aaf3..7fe081d285 100644 --- a/lib/util/fault.c +++ b/lib/util/fault.c @@ -116,6 +116,13 @@ static void smb_panic_default(const char *why) { int result; +#if defined(HAVE_PRCTL) && defined(PR_SET_PTRACER) + /* + * Make sure all children can attach a debugger. + */ + prctl(PR_SET_PTRACER, getpid(), 0, 0, 0); +#endif + if (panic_action && *panic_action) { char pidstr[20]; char cmdstring[200]; -- cgit