int map_errno_from_nt_status(NTSTATUS status);
/* The following definitions come from lib/fault.c */
-void fault_setup(void (*fn)(void *));
+void fault_setup(void);
void dump_core_setup(const char *progname);
/* The following definitions come from lib/file_id.c */
#include <sys/prctl.h>
#endif
-static void (*cont_fn)(void *);
static char *corepath;
/*******************************************************************
smb_panic("internal error");
- if (cont_fn) {
- cont_fn(NULL);
-#ifdef SIGSEGV
- CatchSignal(SIGSEGV, SIG_DFL);
-#endif
-#ifdef SIGBUS
- CatchSignal(SIGBUS, SIG_DFL);
-#endif
-#ifdef SIGABRT
- CatchSignal(SIGABRT, SIG_DFL);
-#endif
- return; /* this should cause a core dump */
- }
+ /* smb_panic() never returns, so this is really redundent */
exit(1);
}
/*******************************************************************
setup our fault handlers
********************************************************************/
-void fault_setup(void (*fn)(void *))
+void fault_setup(void)
{
- cont_fn = fn;
-
#ifdef SIGSEGV
CatchSignal(SIGSEGV, sig_fault);
#endif
terminate();
}
-/**************************************************************************** **
- Possibly continue after a fault.
- **************************************************************************** */
-
-static void fault_continue(void)
-{
- dump_core();
-}
-
/**************************************************************************** **
Expire old names from the namelist and server list.
**************************************************************************** */
SAFE_FREE(lfile);
}
- fault_setup((void (*)(void *))fault_continue );
+ fault_setup();
dump_core_setup("nmbd");
/* POSIX demands that signals are inherited. If the invoking process has
gain_root_privilege();
gain_root_group_privilege();
- fault_setup((void (*)(void *))exit_server_fault);
+ fault_setup();
dump_core_setup("smbd");
/* we are never interested in SIGPIPE */
{
exit_server_common(SERVER_EXIT_NORMAL, explanation);
}
-
-void exit_server_fault(void)
-{
- exit_server("critical server fault");
-}
setlinebuf(stdout);
- fault_setup(NULL);
+ fault_setup();
lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
load_interfaces();
};
TALLOC_CTX *frame = talloc_stackframe();
- fault_setup(NULL);
+ fault_setup();
umask(S_IWGRP | S_IWOTH);
#if defined(HAVE_SET_AUTH_PARAMETERS)
}
-/**************************************************************************** **
- Handle a fault..
- **************************************************************************** */
-
-static void fault_quit(void)
-{
- dump_core();
-}
-
static void winbindd_status(void)
{
struct winbindd_cli_state *tmp;
CatchSignal(SIGUSR1, SIG_IGN);
CatchSignal(SIGUSR2, SIG_IGN);
- fault_setup((void (*)(void *))fault_quit );
+ fault_setup();
dump_core_setup("winbindd");
load_case_tables();