Skip to content
Snippets Groups Projects
Commit f67e0ef3 authored by Nick Kralevich's avatar Nick Kralevich Committed by Gerrit Code Review
Browse files

Merge "Revisit kernel setenforce"

parents 4fc25052 abae8a9b
No related branches found
No related tags found
No related merge requests found
...@@ -169,7 +169,8 @@ neverallow { domain -init } kernel:security load_policy; ...@@ -169,7 +169,8 @@ neverallow { domain -init } kernel:security load_policy;
# init starts in kernel domain and switches to init domain via setcon in # init starts in kernel domain and switches to init domain via setcon in
# the init.rc, so the setenforce occurs while still in kernel. After # the init.rc, so the setenforce occurs while still in kernel. After
# switching domains, there is never any need to setenforce again by init. # switching domains, there is never any need to setenforce again by init.
neverallow { domain -kernel } kernel:security { setenforce setcheckreqprot }; neverallow domain kernel:security setenforce;
neverallow { domain -kernel } kernel:security setcheckreqprot;
# No booleans in AOSP policy, so no need to ever set them. # No booleans in AOSP policy, so no need to ever set them.
neverallow domain kernel:security setbool; neverallow domain kernel:security setbool;
......
...@@ -11,7 +11,9 @@ allow kernel unlabeled:filesystem mount; ...@@ -11,7 +11,9 @@ allow kernel unlabeled:filesystem mount;
allow kernel fs_type:filesystem *; allow kernel fs_type:filesystem *;
# Initial setenforce by init prior to switching to init domain. # Initial setenforce by init prior to switching to init domain.
allow kernel self:security setenforce; # We use dontaudit instead of allow to prevent a kernel spawned userspace
# process from turning off SELinux once enabled.
dontaudit kernel self:security setenforce;
# Set checkreqprot by init.rc prior to switching to init domain. # Set checkreqprot by init.rc prior to switching to init domain.
allow kernel self:security setcheckreqprot; allow kernel self:security setcheckreqprot;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment