kernel: Refactor selinux/selinux.c (#2881)

Signed-off-by: shadichy <shadichy@blisslabs.org>
Co-authored-by: Wang Han <416810799@qq.com>
This commit is contained in:
Shadichy
2025-11-07 21:18:05 +07:00
committed by ShirkNeko
parent c24ed3b5c4
commit f39d4f0f38
2 changed files with 19 additions and 53 deletions

View File

@@ -118,14 +118,6 @@ else
$(info -- KPM is disabled)
endif
# SELinux drivers check
ifeq ($(shell grep -q "current_sid(void)" $(srctree)/security/selinux/include/objsec.h; echo $$?),0)
ccflags-y += -DKSU_COMPAT_HAS_CURRENT_SID
endif
ifeq ($(shell grep -q "struct selinux_state " $(srctree)/security/selinux/include/security.h; echo $$?),0)
ccflags-y += -DKSU_COMPAT_HAS_SELINUX_STATE
endif
# Handle optional backports
ifeq ($(shell grep -q "strncpy_from_user_nofault" $(srctree)/include/linux/uaccess.h; echo $$?),0)
ccflags-y += -DKSU_OPTIONAL_STRNCPY