svn commit: samba r23591 - in branches: SAMBA_3_0/source/registry SAMBA_3_0/source/rpc_server SAMBA_3_0_25/source/registry SAMBA_3_0_25/source/rpc_server SAMBA_3_0_26/source/registry SAMBA_3_0_26/source/rpc_server

jra at samba.org jra at samba.org
Fri Jun 22 19:33:47 GMT 2007


Author: jra
Date: 2007-06-22 19:33:46 +0000 (Fri, 22 Jun 2007)
New Revision: 23591

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

Log:
Fix bug #4725. Don't crash when no eventlogs specified. Needs
merging for 3.0.25b.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/registry/reg_eventlog.c
   branches/SAMBA_3_0/source/rpc_server/srv_eventlog_nt.c
   branches/SAMBA_3_0_25/source/registry/reg_eventlog.c
   branches/SAMBA_3_0_25/source/rpc_server/srv_eventlog_nt.c
   branches/SAMBA_3_0_26/source/registry/reg_eventlog.c
   branches/SAMBA_3_0_26/source/rpc_server/srv_eventlog_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/registry/reg_eventlog.c
===================================================================
--- branches/SAMBA_3_0/source/registry/reg_eventlog.c	2007-06-22 17:36:10 UTC (rev 23590)
+++ branches/SAMBA_3_0/source/registry/reg_eventlog.c	2007-06-22 19:33:46 UTC (rev 23591)
@@ -194,6 +194,10 @@
 	int i;
 	int numsources;
 
+	if (!elogs) {
+		return False;
+	}
+
 	for ( i = 0; elogs[i]; i++ ) {
 		if ( strequal( elogs[i], eventlog ) )
 			break;

Modified: branches/SAMBA_3_0/source/rpc_server/srv_eventlog_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_eventlog_nt.c	2007-06-22 17:36:10 UTC (rev 23590)
+++ branches/SAMBA_3_0/source/rpc_server/srv_eventlog_nt.c	2007-06-22 19:33:46 UTC (rev 23591)
@@ -123,6 +123,10 @@
 	int i;
 	const char **elogs = lp_eventlog_list();
 	
+	if (!elogs) {
+		return False;
+	}
+
 	for ( i=0; elogs[i]; i++ ) {
 		if ( strequal( name, elogs[i] ) )
 			return True;

Modified: branches/SAMBA_3_0_25/source/registry/reg_eventlog.c
===================================================================
--- branches/SAMBA_3_0_25/source/registry/reg_eventlog.c	2007-06-22 17:36:10 UTC (rev 23590)
+++ branches/SAMBA_3_0_25/source/registry/reg_eventlog.c	2007-06-22 19:33:46 UTC (rev 23591)
@@ -190,6 +190,10 @@
 	int i;
 	int numsources;
 
+	if (!elogs) {
+		return False;
+	}
+
 	for ( i = 0; elogs[i]; i++ ) {
 		if ( strequal( elogs[i], eventlog ) )
 			break;

Modified: branches/SAMBA_3_0_25/source/rpc_server/srv_eventlog_nt.c
===================================================================
--- branches/SAMBA_3_0_25/source/rpc_server/srv_eventlog_nt.c	2007-06-22 17:36:10 UTC (rev 23590)
+++ branches/SAMBA_3_0_25/source/rpc_server/srv_eventlog_nt.c	2007-06-22 19:33:46 UTC (rev 23591)
@@ -123,6 +123,10 @@
 	int i;
 	const char **elogs = lp_eventlog_list();
 	
+	if (!elogs) {
+		return False;
+	}
+
 	for ( i=0; elogs[i]; i++ ) {
 		if ( strequal( name, elogs[i] ) )
 			return True;

Modified: branches/SAMBA_3_0_26/source/registry/reg_eventlog.c
===================================================================
--- branches/SAMBA_3_0_26/source/registry/reg_eventlog.c	2007-06-22 17:36:10 UTC (rev 23590)
+++ branches/SAMBA_3_0_26/source/registry/reg_eventlog.c	2007-06-22 19:33:46 UTC (rev 23591)
@@ -194,6 +194,10 @@
 	int i;
 	int numsources;
 
+	if (!elogs) {
+		return False;
+	}
+
 	for ( i = 0; elogs[i]; i++ ) {
 		if ( strequal( elogs[i], eventlog ) )
 			break;

Modified: branches/SAMBA_3_0_26/source/rpc_server/srv_eventlog_nt.c
===================================================================
--- branches/SAMBA_3_0_26/source/rpc_server/srv_eventlog_nt.c	2007-06-22 17:36:10 UTC (rev 23590)
+++ branches/SAMBA_3_0_26/source/rpc_server/srv_eventlog_nt.c	2007-06-22 19:33:46 UTC (rev 23591)
@@ -123,6 +123,10 @@
 	int i;
 	const char **elogs = lp_eventlog_list();
 	
+	if (!elogs) {
+		return False;
+	}
+
 	for ( i=0; elogs[i]; i++ ) {
 		if ( strequal( name, elogs[i] ) )
 			return True;



More information about the samba-cvs mailing list