lib/util: Call log_stack_trace() in smb_panic_default()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 10 Apr 2018 04:37:45 +0000 (16:37 +1200)
committerJeremy Allison <jra@samba.org>
Wed, 11 Apr 2018 02:03:07 +0000 (04:03 +0200)
This matches the AD DC with the behaviour in smbd.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 11 04:03:07 CEST 2018 on sn-devel-144

lib/util/fault.c

index e539aff9e7b4762092b01358628550abf66e0f70..1b56361aa62bf15d98e753744440b5927c9970d3 100644 (file)
@@ -126,6 +126,7 @@ static void smb_panic_default(const char *why)
 {
        DBG_ERR("PANIC (pid %llu): %s\n",
                    (unsigned long long)getpid(), why);
+       log_stack_trace();
 
 #if defined(HAVE_PRCTL) && defined(PR_SET_PTRACER)
        /*
@@ -172,8 +173,6 @@ _PUBLIC_ void smb_panic(const char *why)
        smb_panic_default(why);
 }
 
-
-
 /*******************************************************************
  Print a backtrace of the stack to the debug log. This function
  DELIBERATELY LEAKS MEMORY. The expectation is that you should