]> www.infradead.org Git - users/dwmw2/linux.git/commit
selinux: access superblock_security_struct in LSM blob way
authorGONG, Ruiqi <gongruiqi1@huawei.com>
Tue, 25 Jan 2022 07:11:33 +0000 (15:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:32 +0000 (13:57 +0200)
commitc58320cba465f6ac0b97e2f893b43e190ad25024
tree2c6c091b6ea79d522702c989333acdcc3f5ef8b6
parentda50a4ec5dea6164e6c137b7794b0b5cf4eae4a7
selinux: access superblock_security_struct in LSM blob way

[ Upstream commit 0266c25e7c2821181b610595df42cbca6bc93cb8 ]

LSM blob has been involved for superblock's security struct. So fix the
remaining direct access to sb->s_security by using the LSM blob
mechanism.

Fixes: 08abe46b2cfc ("selinux: fall back to SECURITY_FS_USE_GENFS if no xattr support")
Fixes: 69c4a42d72eb ("lsm,selinux: add new hook to compare new mount to an existing mount")
Signed-off-by: GONG, Ruiqi <gongruiqi1@huawei.com>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
security/selinux/hooks.c