diff options
-rw-r--r-- | lib/util/fault.c | 14 | ||||
-rw-r--r-- | lib/util/util.h | 1 | ||||
-rw-r--r-- | source4/dns_server/dlz_bind9.c | 2 |
3 files changed, 15 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 /** diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c index dc4c4bcd1e..931f2f30b6 100644 --- a/source4/dns_server/dlz_bind9.c +++ b/source4/dns_server/dlz_bind9.c @@ -413,6 +413,8 @@ static isc_result_t parse_options(struct dlz_bind9_data *state, struct poptOption **popt_options; int ret; + fault_setup_disable(); + popt_options = ldb_module_popt_options(state->samdb); (*popt_options) = long_options; |