]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
lsm: CONFIG_LSM can depend on CONFIG_SECURITY
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 24 Aug 2025 22:28:00 +0000 (15:28 -0700)
committerPaul Moore <paul@paul-moore.com>
Thu, 11 Sep 2025 20:32:04 +0000 (16:32 -0400)
When CONFIG_SECURITY is not set, CONFIG_LSM (builtin_lsm_order) does
not need to be visible and settable since builtin_lsm_order is defined in
security.o, which is only built when CONFIG_SECURITY=y.

So make CONFIG_LSM depend on CONFIG_SECURITY.

Fixes: 13e735c0e953 ("LSM: Introduce CONFIG_LSM")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
[PM: subj tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/Kconfig

index 4816fc74f81ebe71749cbc687d855af12768ab3d..285f284dfcac44b60bac80c5e6bd7d4fc39ed8c4 100644 (file)
@@ -269,6 +269,7 @@ endchoice
 
 config LSM
        string "Ordered list of enabled LSMs"
+       depends on SECURITY
        default "landlock,lockdown,yama,loadpin,safesetid,smack,selinux,tomoyo,apparmor,ipe,bpf" if DEFAULT_SECURITY_SMACK
        default "landlock,lockdown,yama,loadpin,safesetid,apparmor,selinux,smack,tomoyo,ipe,bpf" if DEFAULT_SECURITY_APPARMOR
        default "landlock,lockdown,yama,loadpin,safesetid,tomoyo,ipe,bpf" if DEFAULT_SECURITY_TOMOYO