patch: don't show /tmp/ if path is unset

Bjoern JACKE samba at j3e.de
Thu Feb 2 12:00:23 GMT 2006


Hi Volker, hi all

here's a patch:

- don't complain about missing path if share is msdfs proxy
- make shares without "path" definition "available = no" because divulging /tmp/ was evil


Cheers
Bjoern
-------------- next part --------------
Index: source/param/loadparm.c
===================================================================
--- source/param/loadparm.c	(Revision 13259)
+++ source/param/loadparm.c	(Arbeitskopie)
@@ -2889,10 +2889,11 @@
 	}
 
 	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]->bAvailable = False;
 	}
 
 	/* If a service is flagged unavailable, log the fact at level 0. */


More information about the samba-technical mailing list