From c389bd2d6b53e3b913352677ac48288b5b90c6b4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 23 Apr 2000 07:43:32 +0000 Subject: trick to get full stack trace when using the free version of insure (This used to be commit bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2) --- source3/smbd/server.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source3/smbd') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index a7baa9e327..387aeb5df1 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -779,3 +779,27 @@ static void usage(char *pname) exit_server("normal exit"); return(0); } + + +#ifdef __INSURE__ +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6) +{ + static int (*fn)(); + int ret; + char *cmd = lp_panic_action(); + + if (!fn) { + static void *h; + h = dlopen("/usr/local/parasoft/insure++lite/lib.linux2/libinsure.so", RTLD_LAZY); + fn = dlsym(h, "_Insure_trap_error"); + } + + ret = fn(a1, a2, a3, a4, a5, a6); + + if (cmd && *cmd) { + system(cmd); + } + + return ret; +} +#endif -- cgit