On Sun, 19 Sep 1999, H. Peter Anvin wrote:
> Roy Stogner wrote:
> >
> > On Sun, 19 Sep 1999, Alvin Oga wrote:
> >
> > > hi ya roy
> > >
> > > > $mount -t smb //'server 2'/share /mnt/temp
> > > > $mount -t smb //server\ 3/share /mnt/temp
> > >
> > > if these "name creates a problem"
> > >
> > > why not just make an cname alias for smbfs/autofs/etc...
> > > ( ie: fix your DNS so you have many names for the same server )
> >
> > If I had control over the servers this wouldn't be a problem. But in
> > my case (as probably in many cases with Windows Networking) it's a
> > peer-to-peer setup - I have guest access to lots of shares, but I
> > can't change the names on any of them.
>
> Note that you're not talking about the shares here, but about the
> servers.
True, but unfortunately NetBIOS names on Win9x machines are just as
much up to the user as share names, and Win9x SMB servers won't
respond to a request unless it includes the correct NetBIOS name.
Anyway, I've done some more testing, with the following conclusions:
Autofs handles backslash-escaped white space in the mountpoint name
just fine; smbmount (and mount -t smb) screw it up. Fortunately this
isn't a problem that I can't work around.
Autofs doesn't handle backslash-escaped white space in the device
(the third field) name correctly, and this isn't a problem I can work
around.
The config file line I'm using is:
test3 -fstype=smb ://localhost/test\ share
And the relevant debug messages from syslog are:
automount[12800]: lookup(file): looking up test3
automount[12800]: lookup(file): test3 -> -fstype=smb^I ://localhost/test\ share
automount[12800]: expanded entry: -fstype=smb^I ://localhost/test share
automount[12800]: parse(sun): gathered options: fstype=smb
automount[12800]: parse(sun): core of entry: //localhost/test
automount[12800]: do_mount //localhost/test /.autosmb/test3 type smb options (null)
using module generic
automount[12800]: mount(generic): calling mkdir /.autosmb/test3
automount[12800]: mount(generic): calling mount -t smb //localhost/test /.autosmb/test3
automount[12800]: mount(generic): mounted //localhost/test type smb on /.autosmb/test3
See the problem? Somewhere in parse_sun.c (I couldn't figure out
where; I hate string parsing in C without regex.h) whitespace isn't
being handled, and the *ent string is being truncated at that
backslash.
---
Roy Stogner