summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/param/loadparm.c5
-rw-r--r--source3/smbd/service.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 8849d2dea7..b90b53c16b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2157,7 +2157,6 @@ static int getservicebyname(const char *pszServiceName,
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 @@ Check a service for consistency. Return False if the service is in any way
incomplete or faulty, else True.
***************************************************************************/
-static BOOL service_ok(int iService)
+BOOL service_ok(int iService)
{
BOOL bRetval;
@@ -3010,7 +3009,7 @@ static BOOL service_ok(int iService)
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));
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index de2bfd9100..c96bcea4e2 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -313,6 +313,14 @@ static int load_registry_service(const char *servicename)
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);