Thread (53 messages) 53 messages, 7 authors, 2020-01-19

Re: [PATCH RFC 0/1] mount: universally disallow mounting over symlinks

From: Ian Kent <raven@themaw.net>
Date: 2020-01-14 00:25:33
Also in: linux-api, linux-fsdevel, lkml

On Mon, 2020-01-13 at 10:59 +0800, Ian Kent wrote:
quoted
3) is _anything_ besides root directory ever created in direct
autofs
superblocks by anyone?  If not, why does autofs_lookup() even
bother
to
do anything there?  IOW, why not have it return ERR_PTR(-ENOENT)
immediately
for direct ones?  Or am I missing something and it is, in fact,
possible
to have the daemon create something in those?
Short answer is no, longer answer is directories "shouldn't" ever
be created inside direct mount points.

The thing is that the multi-mount map construct can be used with
direct mounts too, but they must always have a real mount at the
base because they are direct mounts. So processes should not be
able to walk into them while they are being mounted (constructed).

But I'm pretty sure it's rare (maybe not done at all) that this
map construct is used with direct mounts.
This isn't right.

There's actually nothing stopping a user from using a direct map
entry that's a multi-mount without an actual mount at its root.
So there could be directories created under these, it's just not
usually done.

I'm pretty sure I don't check and disallow this.

Ian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help