summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-11-07 17:18:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:42 -0500
commit9a0273634860386ecdd6b4c606f30f2620ae3dc0 (patch)
treea2f66ff19760e317196ec10c91e8ff2217b3d084 /source3
parentea705fb3453a94fb4fee6f3a5299c988d8e48b26 (diff)
downloadsamba-9a0273634860386ecdd6b4c606f30f2620ae3dc0.tar.gz
samba-9a0273634860386ecdd6b4c606f30f2620ae3dc0.tar.bz2
samba-9a0273634860386ecdd6b4c606f30f2620ae3dc0.zip
r19626: Coalesce usage of DUMP_CORE. Fix formatting on chdir error message
in core dump path. (This used to be commit 9a51fba71c5fa7082c331e1a78a98638d9aa06cf)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/fault.c7
-rw-r--r--source3/nmbd/nmbd.c2
-rw-r--r--source3/nsswitch/winbindd.c2
-rw-r--r--source3/smbd/server.c2
4 files changed, 6 insertions, 7 deletions
diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index dc8c276d02..b632a5c82f 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -160,12 +160,13 @@ void dump_core_setup(const char *progname)
exit(1);
}
+#if DUMP_CORE
if (*corepath != '\0') {
/* The chdir might fail if we dump core before we finish
* processing the config file.
*/
if (chdir(corepath) != 0) {
- DEBUG(0, ("unable to change to %s", corepath));
+ DEBUG(0, ("unable to change to %s\n", corepath));
DEBUGADD(0, ("refusing to dump core\n"));
exit(1);
}
@@ -182,5 +183,9 @@ void dump_core_setup(const char *progname)
#endif
abort();
+
+#else /* DUMP_CORE */
+ exit(1);
+#endif /* DUMP_CORE */
}
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 26495d25c1..4a05fde28c 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -112,9 +112,7 @@ static void sig_hup(int sig)
static void fault_continue(void)
{
-#if DUMP_CORE
dump_core();
-#endif
}
/**************************************************************************** **
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 6e61df99f1..e9e51449d6 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -65,9 +65,7 @@ static BOOL reload_services_file(void)
static void fault_quit(void)
{
-#if DUMP_CORE
dump_core();
-#endif
}
static void winbindd_status(void)
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index a7a84eced1..593e2bfb12 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -725,9 +725,7 @@ static void exit_server_common(enum server_exit_reason how,
}
DEBUGLEVEL = oldlevel;
-#if DUMP_CORE
dump_core();
-#endif
} else {
DEBUG(3,("Server exit (%s)\n",