From 69eea4fcf818ce976060e31432a6a415ab191d64 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Oct 1997 03:53:07 +0000 Subject: fixed the problem that browsing breaks if you put quote marks around the server string option. I fixed it by adding: trim_string(ret, "\"", "\"") to lp_string() which means that it removes leading and trailing quotes from _all_ strings in smb.conf. I think this is what we want as I can't actually think of any case where quoted strings are needed. I suspect that this fix will actually fix browsing at quite a few sites. It's not uncommon to see people putting "" marks around the workgroup name or other essential strings. The real reason it was causing browsing to fail is that the browse.dat file uses " to delimit fields, which means that it wasn't being parsed correctly. It would be nice to use a proper database format in browse.dat sometime. In fact, we really need a generic database type subsystem in Samba to replace the mish-mash we currrently use (browse.dat, wins.dat, smbpasswd etc) (This used to be commit ac50a88e1181bd4954f03e5450dedce87ed781ad) --- source3/param/loadparm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index edc2d2b65f..b877650078 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -783,6 +783,8 @@ char *lp_string(char *s) else StrCpy(ret,s); + trim_string(ret, "\"", "\""); + standard_sub_basic(ret); return(ret); } -- cgit