summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-01-28 21:55:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:13 -0500
commit8ac31b503433ae6150da9523e58c338aff27e561 (patch)
tree902e07b16bba109c1e3f4c741e4ea11a229a828d /source3/lib/util.c
parentde728fa81ae549b496f2ff26ebb082092aae2204 (diff)
downloadsamba-8ac31b503433ae6150da9523e58c338aff27e561.tar.gz
samba-8ac31b503433ae6150da9523e58c338aff27e561.tar.bz2
samba-8ac31b503433ae6150da9523e58c338aff27e561.zip
r5066: A couple of small fixes from James Peach @ SGI.
Jeremy. (This used to be commit 9d131e94195df79e07c8fad20e12ba1b67441a81)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 455f87aaab..d910dff547 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1534,6 +1534,11 @@ void smb_panic2(const char *why, BOOL decrement_pid_count )
ZERO_ARRAY(names);
ZERO_ARRAY(namebuf);
+ /* We need to be root so we can open our /proc entry to walk
+ * our stack. It also helps when we want to dump core.
+ */
+ become_root();
+
for (i = 0; i < BACKTRACE_STACK_SIZE; i++) {
names[i] = namebuf + (i * NAMESIZE);
}