Re: [PATCH] umount: allow non-root umount of FUSE even if not in fstab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-03-29 at 10:28 +0200, Karel Zak wrote:
> On Mon, Mar 28, 2011 at 04:23:20PM +0200, Miklos Szeredi wrote:
> > On Mon, 2011-03-28 at 16:04 +0200, Petr Uzel wrote:
> > > Hi all,
> > > 
> > > I hacked the following patch with which it is possible to use 
> > > "umount $dir" instead of "fusermount -u $dir", which IMHO is an
> > > improvement in usability. It seems to work (at least for me), however,
> > > I have to admit that I don't like it very much, because:
> > > - it complicates umount
> > > - duplicates code from fusermount
> > 
> > And this is not the only one that would have to be duplicated.  The
> > mount and umount races that were fixed in fusermount in recently and not
> > so recently would also have to be added to util-linux, which would
> > actually be a good thing, since in theory they could affect fstab based
> > user mounts as well (though that is much more unlikely than with fuse,
> > where the user chooses the mountpoint).
> 
>  Maybe we need to call umount2() with UMOUNT_NOFOLLOW flag for
>  non-root users in umount(8). I think it should be enough for
>  umount(8) (where almost all is controlled by system admin in fstab). 
>  
>  See below. Comments?

UMOUNT_NOFOLLOW is a good idea but not enough, it will only deal with
last path component changing to a symlink.  If previous path component
is changed then UMOUNT_NOFOLLOW will not have any effect.

What fusermount does is change cwd to the parent directory, check if cwd
matches that of the intended path, and then umount with UMOUNT_NOFOLLOW.

Thanks,
Miklos


--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux