summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-21 12:42:23 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-21 11:18:19 +0100
commitda5c328b4b4a793053a8b1c942ceda56da01625c (patch)
tree1feae422e99778270f9ce8b58284b4ef97055f4f /lib/util
parent71d0fd88d2d39bd2ad0040630c17bdbbf7ab39b8 (diff)
downloadsamba-da5c328b4b4a793053a8b1c942ceda56da01625c.tar.gz
samba-da5c328b4b4a793053a8b1c942ceda56da01625c.tar.bz2
samba-da5c328b4b4a793053a8b1c942ceda56da01625c.zip
s4-dns: disable segfault handling in dlz_bind9
we don't want bind9 calling the Samba segv handler
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/fault.c14
-rw-r--r--lib/util/util.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/util/fault.c b/lib/util/fault.c
index bbb3190198..256e55a85b 100644
--- a/lib/util/fault.c
+++ b/lib/util/fault.c
@@ -187,9 +187,10 @@ setup our fault handlers
**/
_PUBLIC_ void fault_setup(const char *pname)
{
- if (progname == NULL) {
- progname = pname;
+ if (progname != NULL) {
+ return;
}
+ progname = pname;
#ifdef SIGSEGV
CatchSignal(SIGSEGV, sig_fault);
#endif
@@ -205,6 +206,15 @@ _PUBLIC_ void fault_setup(const char *pname)
}
/**
+ disable setting up fault handlers
+**/
+_PUBLIC_ void fault_setup_disable(void)
+{
+ progname = "fault disabled";
+}
+
+
+/**
register a fault handler.
Should only be called once in the execution of smbd.
*/
diff --git a/lib/util/util.h b/lib/util/util.h
index 0073aa9051..86bb3daace 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -87,6 +87,7 @@ _PUBLIC_ _NORETURN_ void smb_panic(const char *why);
setup our fault handlers
**/
_PUBLIC_ void fault_setup(const char *pname);
+_PUBLIC_ void fault_setup_disable(void);
#endif
/**