All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: netfs allows multiple identical mounts (was: smb/mount
@ 2001-08-08 14:00 Petr Vandrovec
  2001-08-09  7:52 ` Urban Widmark
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Vandrovec @ 2001-08-08 14:00 UTC (permalink / raw)
  To: Urban Widmark; +Cc: linux-kernel, Trond Myklebust, pdan

On  8 Aug 01 at 1:20, Urban Widmark wrote:
> On Mon, 6 Aug 2001, Dan Podeanu wrote:
> > This should be self explanatory. My guess is, its probably the smb
> > filesystem reporting as mounting again a share after network failure.
> 
> A very simple way to reproduce this (on 2.4.7):
> 
> $ mount -t smbfs -o username=puw //srv/share /mnt/smb
> $ mount -t smbfs -o username=puw //srv/share /mnt/smb
> $ cat /proc/mounts | grep smbfs
> //srv/share /mnt/smb smbfs rw 0 0
> //srv/share /mnt/smb smbfs rw 0 0
> 
> This is probably something that smbmount could check before mounting.
> But I'm not sure if that is the best fix.

For sure it is, as doing

mount -t smbfs -o username=a //srv/share /mnt/smb
mount -t smbfs -o username=b //srv/share /mnt/smb

looks quite legal to me, as both //srv/share can display completely
different set of files, and nobody except smbfs knows that username=a/
username=b matters, but fmode=700/fmode=755 does not...
 
> It could compare the server string ("//srv/share") but what if that server
> listens to more than one name?

ncpfs (mount.ncp) will warn you if //srv/share is listed anywhere in
/etc/mtab and it is mounted by you. If you'll use '-o multiple', then
it is assumed that you know what you are doing, and nothing prevents you
from mounting same thing on same place 255 times.
                                            Best regards,
                                                    Petr Vandrovec
                                                    vandrove@vc.cvut.cz
                                                    

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: netfs allows multiple identical mounts (was: smb/mount
  2001-08-08 14:00 netfs allows multiple identical mounts (was: smb/mount Petr Vandrovec
@ 2001-08-09  7:52 ` Urban Widmark
  0 siblings, 0 replies; 2+ messages in thread
From: Urban Widmark @ 2001-08-09  7:52 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel, Trond Myklebust, pdan

On Wed, 8 Aug 2001, Petr Vandrovec wrote:

> > This is probably something that smbmount could check before mounting.
> > But I'm not sure if that is the best fix.
> 
> For sure it is, as doing
> 
> mount -t smbfs -o username=a //srv/share /mnt/smb
> mount -t smbfs -o username=b //srv/share /mnt/smb
> 
> looks quite legal to me, as both //srv/share can display completely
> different set of files, and nobody except smbfs knows that username=a/
> username=b matters, but fmode=700/fmode=755 does not...

If this was a local block device it would not allow the mount, because the
device is the same. Even if the options differ in a way that makes it
access the files differently (hypothetical ntfs that allows you to
specify the NT-GUID to use for access control? some funky iso9660 option
that force it to read dirs from some alternative list?)

Doing this in smbmount isn't a problem, but I thought this was
inconsistent between local and remote fs and that it could perhaps be
(sort of) solved for all fs at once by doing something clever. Perhaps not.


> ncpfs (mount.ncp) will warn you if //srv/share is listed anywhere in
> /etc/mtab and it is mounted by you. If you'll use '-o multiple', then
> it is assumed that you know what you are doing, and nothing prevents you
> from mounting same thing on same place 255 times.

Most people have other "nodev" fs' so you can't actually mount 255 times
(unless you hack get_unnamed_dev to give you more :)

And yes, I know someone that wanted to.

/Urban


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-09  7:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-08 14:00 netfs allows multiple identical mounts (was: smb/mount Petr Vandrovec
2001-08-09  7:52 ` Urban Widmark

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.