svn commit: samba r21547 - in branches/SAMBA_3_0/source: param smbd

vlendec at samba.org vlendec at samba.org
Mon Feb 26 20:14:36 GMT 2007


Author: vlendec
Date: 2007-02-26 20:14:35 +0000 (Mon, 26 Feb 2007)
New Revision: 21547

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

Log:
Fix from Michael Adam <ma at sernet.de>: Refuse registry shares without path.

Thanks,

Volker

Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0/source/smbd/service.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===================================================================
--- branches/SAMBA_3_0/source/param/loadparm.c	2007-02-26 17:43:45 UTC (rev 21546)
+++ branches/SAMBA_3_0/source/param/loadparm.c	2007-02-26 20:14:35 UTC (rev 21547)
@@ -2157,7 +2157,6 @@
 			    service * pserviceDest);
 static void copy_service(service * pserviceDest,
 			 service * pserviceSource, BOOL *pcopymapDest);
-static BOOL service_ok(int iService);
 static BOOL do_parameter(const char *pszParmName, const char *pszParmValue);
 static BOOL do_section(const char *pszSectionName);
 static void init_copymap(service * pservice);
@@ -2977,7 +2976,7 @@
 incomplete or faulty, else True.
 ***************************************************************************/
 
-static BOOL service_ok(int iService)
+BOOL service_ok(int iService)
 {
 	BOOL bRetval;
 
@@ -3010,7 +3009,7 @@
 		ServicePtrs[iService]->bAvailable = False;
 	}
 
-	/* If a service is flagged unavailable, log the fact at level 0. */
+	/* If a service is flagged unavailable, log the fact at level 1. */
 	if (!ServicePtrs[iService]->bAvailable)
 		DEBUG(1, ("NOTE: Service %s is flagged unavailable.\n",
 			  ServicePtrs[iService]->szService));

Modified: branches/SAMBA_3_0/source/smbd/service.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/service.c	2007-02-26 17:43:45 UTC (rev 21546)
+++ branches/SAMBA_3_0/source/smbd/service.c	2007-02-26 20:14:35 UTC (rev 21547)
@@ -313,6 +313,14 @@
 		TALLOC_FREE(value);
 	}
 
+	if (!service_ok(res)) {
+		/* this is actually never reached, since 
+		 * service_ok only returns False if the service
+		 * entry does not have a service name, and we _know_
+		 * we do have a service name here... */
+		res = -1;
+	}
+
  error:
 
 	TALLOC_FREE(key);



More information about the samba-cvs mailing list