param: add extra condition in lpcfg_service_ok
authorGarming Sam <garming@catalyst.net.nz>
Thu, 20 Mar 2014 20:30:26 +0000 (09:30 +1300)
committerMichael Adam <obnox@samba.org>
Thu, 31 Jul 2014 06:17:10 +0000 (08:17 +0200)
Change-Id: Id9a95748904516fd34869fee61b1e85b6d14f083
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib/param/loadparm.c

index 728377a480f27f9fad56b8b342d1ae9552a147b3..2d9bee2ab6d97824232a2afe64e064fed78e0b6c 100644 (file)
@@ -956,6 +956,15 @@ static bool lpcfg_service_ok(struct loadparm_service *service)
                        service->browseable = false;
        }
 
+       if (service->path[0] == '\0' &&
+           strwicmp(service->szService, HOMES_NAME) != 0 &&
+           service->msdfs_proxy[0] == '\0')
+       {
+               DEBUG(0, ("WARNING: No path in service %s - making it unavailable!\n",
+                       service->szService));
+               service->bAvailable = false;
+       }
+
        /* If a service is flagged unavailable, log the fact at level 0. */
        if (!service->bAvailable)
                DEBUG(1, ("NOTE: Service %s is flagged unavailable.\n",