[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y3iYVFT40L0+/MzO@ZenIV>
Date: Sat, 19 Nov 2022 08:48:20 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: David Howells <dhowells@...hat.com>
Cc: Jeff Layton <jlayton@...nel.org>,
Casey Schaufler <casey@...aufler-ca.com>,
"Christian Brauner (Microsoft)" <brauner@...nel.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna@...nel.org>,
Scott Mayhew <smayhew@...hat.com>,
Paul Moore <paul@...l-moore.com>, linux-nfs@...r.kernel.org,
selinux@...r.kernel.org, linux-security-module@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5] vfs, security: Fix automount superblock LSM init
problem, preventing NFS sb sharing
On Thu, Nov 10, 2022 at 11:09:27AM +0000, David Howells wrote:
> When NFS superblocks are created by automounting, their LSM parameters
> aren't set in the fs_context struct prior to sget_fc() being called,
> leading to failure to match existing superblocks.
>
> Fix this by adding a new LSM hook to load fc->security for submount
> creation when alloc_fs_context() is creating the fs_context for it.
FWIW, it feels like security_sb_mnt_opts_compat() would be a saner place
for that. It would need to get struct dentry *reference passed to it,
but that should be it...
Powered by blists - more mailing lists