diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-04-23 07:43:32 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-04-23 07:43:32 +0000 |
commit | bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2 (patch) | |
tree | a531a7bf35f39b01a06d4d25d24018f52718f40d | |
parent | 53077295b76487a6eafc6b14b69a91074a02aa35 (diff) | |
download | samba-bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2.tar.gz samba-bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2.tar.xz samba-bb9b3e03deebe23cf3fe10c2cb9b67a730e086a2.zip |
trick to get full stack trace when using the free version of insure
-rw-r--r-- | source/smbd/server.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c index a7baa9e3277..387aeb5df10 100644 --- a/source/smbd/server.c +++ b/source/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 |