summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-16 03:53:07 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-16 03:53:07 +0000
commitac50a88e1181bd4954f03e5450dedce87ed781ad (patch)
treea5b550524c7c7be36c60af0cc0f95a7ea2eab7f2 /source
parent31d50db98bbb3b64400d432e386056f7963b7d8d (diff)
downloadsamba-ac50a88e1181bd4954f03e5450dedce87ed781ad.tar.gz
samba-ac50a88e1181bd4954f03e5450dedce87ed781ad.tar.xz
samba-ac50a88e1181bd4954f03e5450dedce87ed781ad.zip
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)
Diffstat (limited to 'source')
-rw-r--r--source/param/loadparm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index edc2d2b65f6..b8776500781 100644
--- a/source/param/loadparm.c
+++ b/source/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);
}