Re: [PATCH] configfs: make directories inherit uid/gid from creator

From: Maciej Żenczykowski
Date: Wed Jan 27 2021 - 14:57:14 EST


> > Currently a non-root process can create directories, but cannot
> > create stuff in the directories it creates.
>
> Isn't that on purpose?

Is it? What's the use case of being able to create empty directories
you can't use?
Why allow their creation in the first place then?

> > + (void)configfs_setattr(dentry, &ia);
>
> No need for (void), here, right?

Just being clear we're ignoring any potential error return.

> And this feels like a big user-visible change, what is going to break
> with this?

That I don't know, but it's unlikely to break anything, since it's virtually
impossible to use as it is now. If non-root creates the directory, it's
currently root-owned, so can only be used by root (or something with
appropriate caps).
Something with capabilities will be able to use it even if it is no
longer owned by root.