svn commit: samba r23437 - in branches/SAMBA_3_0_26/source: param
smbd
obnox at samba.org
obnox at samba.org
Tue Jun 12 15:09:45 GMT 2007
Author: obnox
Date: 2007-06-12 15:09:44 +0000 (Tue, 12 Jun 2007)
New Revision: 23437
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23437
Log:
Merge r21547 from 3_0:
Refuse registry shares without path.
Michael
Modified:
branches/SAMBA_3_0_26/source/param/loadparm.c
branches/SAMBA_3_0_26/source/smbd/service.c
Changeset:
Modified: branches/SAMBA_3_0_26/source/param/loadparm.c
===================================================================
--- branches/SAMBA_3_0_26/source/param/loadparm.c 2007-06-12 14:44:15 UTC (rev 23436)
+++ branches/SAMBA_3_0_26/source/param/loadparm.c 2007-06-12 15:09:44 UTC (rev 23437)
@@ -2174,7 +2174,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);
@@ -2994,7 +2993,7 @@
incomplete or faulty, else True.
***************************************************************************/
-static BOOL service_ok(int iService)
+BOOL service_ok(int iService)
{
BOOL bRetval;
@@ -3027,7 +3026,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_26/source/smbd/service.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/service.c 2007-06-12 14:44:15 UTC (rev 23436)
+++ branches/SAMBA_3_0_26/source/smbd/service.c 2007-06-12 15:09:44 UTC (rev 23437)
@@ -322,6 +322,14 @@
TALLOC_FREE(values);
return res;
+ 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(value_names);
More information about the samba-cvs
mailing list