summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-13 11:56:40 +0200
committerMichael Adam <obnox@samba.org>2008-06-27 16:57:12 +0200
commit15ac8b6bc1abd754940b7f6fe3a5ae7e77fceb4f (patch)
tree7728d3debd793fe2fb0907878fe9f3ac05d098d1 /source3/lib
parent9ff1ffcbee46257c3b2b13b84c2a539322493190 (diff)
downloadsamba-15ac8b6bc1abd754940b7f6fe3a5ae7e77fceb4f.tar.gz
samba-15ac8b6bc1abd754940b7f6fe3a5ae7e77fceb4f.tar.bz2
samba-15ac8b6bc1abd754940b7f6fe3a5ae7e77fceb4f.zip
Do not segfault if corepath is not set up properly
(This used to be commit 41d1b9541ccb802f01f12038b3b81853b3b7c32d)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/fault.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index 1964955f1b..d4c1142937 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -188,6 +188,11 @@ void dump_core_setup(const char *progname)
become_root();
}
+ if (corepath == NULL) {
+ DEBUG(0, ("Can not dump core: corepath not set up\n"));
+ exit(1);
+ }
+
if (*corepath != '\0') {
/* The chdir might fail if we dump core before we finish
* processing the config file.