selinux: skip bounded transition processing if the policy isn't loaded
Changes
1 files changed · +3 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| security/selinux/ss/services.c | modified | +3 | −0 | View file |
security/selinux/ss/services.c
View filediff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index d05496d..8900ea5 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -867,6 +867,9 @@ int security_bounded_transition(u32 old_sid, u32 new_sid)
int index;
int rc;
+ if (!ss_initialized)
+ return 0;
+
read_lock(&policy_rwlock);
rc = -EINVAL;