Re: smbfs-mount flags

2000-08-06 Thread Urban Widmark

On Tue, 1 Aug 2000, Petr Vandrovec wrote:

 At least with ncpfs there is problem that some of mount options are
 parsed completely in userspace (passwd,ipserver), some are passed to
 mountpoint with ioctl (ttl,volume,codepage), some are mapped into VFS flags
 (ro,rw,noatime,...), some are ignored completely (auto,noauto) and some
 are pasted into binary mount structure (mode,uid,gid,owner)... So
 ncpmount has to parse options anyway...

Same for smbfs. I have a feeling I am not explaining this very well.

The mount program parses the options and filters out the ones intended for
it (passwd,ipserver,ttl,volume,codepage,ro,rw,noatime,...). That list is
known when the program is built. Any unknown options are sent to the fs
and parsed there. The command:
mount -t smbfs -o username=foo,win95,soft,intr,case=sensitive //x/y /z
ends up sending as "mount_data" the string:
version=7,win95,soft,intr,case=sensitive
(to use a silly example)

The special mount program still sets up the connection, does ioctls, ...
The only difference is that what used to be a fixed binary struct is now a
flexible ascii string. This allows an old smbmount to send a parameter to
smbfs that was not known when that samba version was released a few months
ago. That is the only thing I'm thinking about changing.

Obviously it is required to keep supporting the binary format for some
time.

 mount() failed. If there is general consensus that passing binary
 structure to mount() is stupid, I can change ncpfs behavior for 2.5.x...

No, it seems to be just me.

ncpmount and mount can be released with much shorter intervals (I know
mount is, there is always a new util-linux version whenever I check) than
smbmount can since smbmount is included with samba. That is the right
place for smbmount, but it is also why I think it needs to be more
disconnected from smbfs.

/Urban




Re: smbfs-mount flags

2000-08-01 Thread Petr Vandrovec

On  1 Aug 00 at 14:38, Urban Widmark wrote:
 
 To correct this with the current binary solution that requires a new
 protocol version and a new smbmount (possibly with all sorts of
 compile/version problems since it includes kernel headers directly). With

You should not do it... For example you can compile userspace ncpfs
on 2.0.0 kernel and although you did this, such binary will understand
all kernels between 2.0.0 and 2.4.0-test6-pre1 - even 32bit uids will
work...

 an ascii option string it would probably not have been done like that in
 the first place, but changing it requires only administrator changes (fix
 your fstab entry, autofs map, script).

At least with ncpfs there is problem that some of mount options are
parsed completely in userspace (passwd,ipserver), some are passed to
mountpoint with ioctl (ttl,volume,codepage), some are mapped into VFS flags
(ro,rw,noatime,...), some are ignored completely (auto,noauto) and some
are pasted into binary mount structure (mode,uid,gid,owner)... So
ncpmount has to parse options anyway...
 
 I know you were talking about VFS-level options. Is it more acceptable for
 fs-level options? If not, is there a plan/goal to make mount(8) start
 passing a binary struct as *data?

And what about read_super returning error code except simple NULL/non-NULL
error code? So ncpmount could distinguish different reasons of why
mount() failed. If there is general consensus that passing binary
structure to mount() is stupid, I can change ncpfs behavior for 2.5.x...
Best regards,
Petr Vandrovec
[EMAIL PROTECTED]