fixed the problem that browsing breaks if you put quote marks around
authorAndrew Tridgell <tridge@samba.org>
Thu, 16 Oct 1997 03:53:07 +0000 (03:53 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 16 Oct 1997 03:53:07 +0000 (03:53 +0000)
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)

source/param/loadparm.c

index edc2d2b65f60afb39ba0e2629a9de9dd4afd1994..b87765007816ee9a79f679c7d145ac5f7c22cad9 100644 (file)
@@ -783,6 +783,8 @@ char *lp_string(char *s)
   else
     StrCpy(ret,s);
 
+  trim_string(ret, "\"", "\"");
+
   standard_sub_basic(ret);
   return(ret);
 }