[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZWoRA52jPacJCiqs@slm.duckdns.org>
Date: Fri, 1 Dec 2023 06:59:47 -1000
From: Tejun Heo <tj@...nel.org>
To: Max Kellermann <max.kellermann@...os.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] fs/kernfs/dir: obey S_ISGID
On Fri, Dec 01, 2023 at 01:56:38PM +0100, Max Kellermann wrote:
> Handling of S_ISGID is usually done by inode_init_owner() in all other
> filesystems, but kernfs doesn't use that function. In kernfs, struct
> kernfs_node is the primary data structure, and struct inode is only
> created from it on demand. Therefore, inode_init_owner() can't be
> used and we need to imitate its behavior.
>
> S_ISGID support is useful for the cgroup filesystem; it allows
> subtrees managed by an unprivileged process to retain a certain owner
> gid, which then enables sharing access to the subtree with another
> unprivileged process.
>
> Signed-off-by: Max Kellermann <max.kellermann@...os.com>
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
Powered by blists - more mailing lists