svn commit: samba r19626 - in branches/SAMBA_3_0/source: lib nmbd nsswitch smbd

jpeach at samba.org jpeach at samba.org
Tue Nov 7 17:18:01 GMT 2006


Author: jpeach
Date: 2006-11-07 17:18:00 +0000 (Tue, 07 Nov 2006)
New Revision: 19626

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19626

Log:
Coalesce usage of DUMP_CORE. Fix formatting on chdir error message
in core dump path.

Modified:
   branches/SAMBA_3_0/source/lib/fault.c
   branches/SAMBA_3_0/source/nmbd/nmbd.c
   branches/SAMBA_3_0/source/nsswitch/winbindd.c
   branches/SAMBA_3_0/source/smbd/server.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/fault.c
===================================================================
--- branches/SAMBA_3_0/source/lib/fault.c	2006-11-07 16:14:14 UTC (rev 19625)
+++ branches/SAMBA_3_0/source/lib/fault.c	2006-11-07 17:18:00 UTC (rev 19626)
@@ -160,12 +160,13 @@
 		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 @@
 #endif
 
 	abort();
+
+#else /* DUMP_CORE */
+	exit(1);
+#endif /* DUMP_CORE */
 }
 

Modified: branches/SAMBA_3_0/source/nmbd/nmbd.c
===================================================================
--- branches/SAMBA_3_0/source/nmbd/nmbd.c	2006-11-07 16:14:14 UTC (rev 19625)
+++ branches/SAMBA_3_0/source/nmbd/nmbd.c	2006-11-07 17:18:00 UTC (rev 19626)
@@ -112,9 +112,7 @@
 
 static void fault_continue(void)
 {
-#if DUMP_CORE
 	dump_core();
-#endif
 }
 
 /**************************************************************************** **

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd.c	2006-11-07 16:14:14 UTC (rev 19625)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd.c	2006-11-07 17:18:00 UTC (rev 19626)
@@ -65,9 +65,7 @@
 
 static void fault_quit(void)
 {
-#if DUMP_CORE
 	dump_core();
-#endif
 }
 
 static void winbindd_status(void)

Modified: branches/SAMBA_3_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/server.c	2006-11-07 16:14:14 UTC (rev 19625)
+++ branches/SAMBA_3_0/source/smbd/server.c	2006-11-07 17:18:00 UTC (rev 19626)
@@ -725,9 +725,7 @@
 		}
 
 		DEBUGLEVEL = oldlevel;
-#if DUMP_CORE
 		dump_core();
-#endif
 
 	} else {    
 		DEBUG(3,("Server exit (%s)\n",



More information about the samba-cvs mailing list