From d2add2ac56863b5afd8bf107a07d13450b19a82b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 28 Apr 2009 01:24:27 +0200 Subject: [PATCH] s3:loadparm: mark registry shares without path unavailable ...just as with text config. This applies to testparm and friends. smbd is fixed in a second patch. Michael --- source/param/loadparm.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/source/param/loadparm.c b/source/param/loadparm.c index b08ff6d..c7b06a4 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -6585,6 +6585,9 @@ static bool process_registry_service(struct smbconf_service *service) return false; } } + if (iServiceIndex >= 0) { + return service_ok(iServiceIndex); + } return true; } -- 1.6.0.2 From cdd4c769142dfd49e9602bc06ddd412620456919 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 5 May 2009 17:02:46 +0200 Subject: [PATCH] s3:mark registry shares without path unavailable in the server, too This prevents users from getting access to "/" in misconfigured setups. Michael --- source/smbd/service.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/source/smbd/service.c b/source/smbd/service.c index 5e75fce..98b2536 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -286,6 +286,10 @@ static int load_registry_service(const char *servicename) TALLOC_FREE(value); } + if (!service_ok(res)) { + res = -1; + } + error: TALLOC_FREE(key); -- 1.6.0.2