kernel: don't apply rules for permissive/disabled selinux

This commit is contained in:
weishu
2022-12-23 08:59:57 +07:00
parent 5f1d813635
commit e44b1c2a95
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -71,6 +71,12 @@ void setenforce(bool enforce) {
}
bool getenforce() {
#ifdef CONFIG_SECURITY_SELINUX_DISABLE
if (selinux_state.disabled) {
return false;
}
#endif
#ifdef CONFIG_SECURITY_SELINUX_DEVELOP
return selinux_state.enforcing;
#else