r13610: Patch from Bjoern JACKE <samba@j3e.de>. Don't default to
authorJeremy Allison <jra@samba.org>
Wed, 22 Feb 2006 01:31:43 +0000 (01:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:10:19 +0000 (11:10 -0500)
/tmp if there is no path in the share, make it unavailable.
All printer shares should have a path and IPC$ is already
explicitly set to tmpdir().
Jeremy.

source/param/loadparm.c

index b44fcfbd91f12a3bad107309bcc23226b79733c9..92719d9a3a0cbd2409a83ecaa777e9f109f800d3 100644 (file)
@@ -2929,10 +2929,12 @@ static BOOL service_ok(int iService)
        }
 
        if (ServicePtrs[iService]->szPath[0] == '\0' &&
-           strwicmp(ServicePtrs[iService]->szService, HOMES_NAME) != 0) {
-               DEBUG(0, ("No path in service %s - using %s\n",
-                      ServicePtrs[iService]->szService, tmpdir()));
-               string_set(&ServicePtrs[iService]->szPath, tmpdir());
+           strwicmp(ServicePtrs[iService]->szService, HOMES_NAME) != 0 &&
+           ServicePtrs[iService]->szMSDfsProxy[0] == '\0'
+           ) {
+               DEBUG(0, ("WARNING: No path in service %s - making it unavailable!\n",
+                       ServicePtrs[iService]->szService));
+               ServicePtrs[iService]->bAvailable = False;
        }
 
        /* If a service is flagged unavailable, log the fact at level 0. */