[prev in list] [next in list] [prev in thread] [next in thread] 

List:       util-linux-ng
Subject:    Re: [RFC] refactor mnt_fstype_is_pseudofs()?
From:       Karel Zak <kzak () redhat ! com>
Date:       2019-02-06 10:55:27
Message-ID: 20190206105416.aivihlrfsrq35uhr () ws ! net ! home
[Download RAW message or body]

On Tue, Feb 05, 2019 at 11:19:18PM +0100, Stanislav Brabec wrote:
> Dne 04. 02. 19 v 15:03 Karel Zak napsal(a):
> > On Fri, Feb 01, 2019 at 12:07:12AM +0100, Stanislav Brabec wrote:
> > > The same problem affects other pseudo file systems not listed in \
> > > mnt_fstype_is_pseudofs(): # mount | grep encfs
> > > encfs on /Encrypted type fuse.encfs \
> > > (rw,nosuid,nodev,relatime,user_id=10027,group_id=100,default_permissions) # \
> > > mkdir encfs # mount | grep encfs
> > > /root/encfs on /Encrypted type fuse.encfs \
> > > (rw,nosuid,nodev,relatime,user_id=10027,group_id=100,default_permissions) \
> > > ^^^^^^^^^^^ 
> > > Debugging shows two reasons why it happens:
> > > 1) encfs is not listed in mnt_fstype_is_pseudofs()
> > > 2) mnt_resolve_path() calls canonicalize_path_and_cache() on the kernel output, \
> > > which makes only a little sense
> > 
> > Where? It should be easy to check by mnt_fs_is_kernel().
> 
> I just found that the check is incomplete and the same problem also affects ALL \
> network file systems, listed or not listed in mnt_fstype_is_netfs():

So we need mnt_fstype_is_netfs() there :-) or keep it without the canonicalization.

The canonicalization is only necessary if you do not use libmount/mount(8)
to mount the filesystem. This is probably very unusual use case...

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic