Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
2637198f
Commit
2637198f
authored
11 years ago
by
Nick Kralevich
Browse files
Options
Downloads
Patches
Plain Diff
Only init should be able to load a security policy
Bug: 9859477 Change-Id: Iadd26cac2f318b81701310788bed795dadfa5b6b
parent
8a2ebe34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app.te
+1
-1
1 addition, 1 deletion
app.te
domain.te
+7
-0
7 additions, 0 deletions
domain.te
init.te
+1
-0
1 addition, 0 deletions
init.te
unconfined.te
+1
-1
1 addition, 1 deletion
unconfined.te
with
10 additions
and
2 deletions
app.te
+
1
−
1
View file @
2637198f
...
@@ -138,7 +138,7 @@ neverallow { appdomain -unconfineddomain } kmem_device:chr_file { read write };
...
@@ -138,7 +138,7 @@ neverallow { appdomain -unconfineddomain } kmem_device:chr_file { read write };
neverallow { appdomain -unconfineddomain } kernel:security { setenforce setbool };
neverallow { appdomain -unconfineddomain } kernel:security { setenforce setbool };
# Load security policy.
# Load security policy.
neverallow
{
appdomain
-unconfineddomain }
kernel:security load_policy;
neverallow appdomain kernel:security load_policy;
# Privileged netlink socket interfaces.
# Privileged netlink socket interfaces.
neverallow { appdomain -unconfineddomain }
neverallow { appdomain -unconfineddomain }
...
...
This diff is collapsed.
Click to expand it.
domain.te
+
7
−
0
View file @
2637198f
...
@@ -135,3 +135,10 @@ allow domain unlabeled:file { create_file_perms rwx_file_perms relabelfrom };
...
@@ -135,3 +135,10 @@ allow domain unlabeled:file { create_file_perms rwx_file_perms relabelfrom };
allow domain unlabeled:dir { create_dir_perms relabelfrom };
allow domain unlabeled:dir { create_dir_perms relabelfrom };
allow domain unlabeled:lnk_file { create_file_perms };
allow domain unlabeled:lnk_file { create_file_perms };
neverallow { domain -relabeltodomain } *:dir_file_class_set relabelto;
neverallow { domain -relabeltodomain } *:dir_file_class_set relabelto;
###
### neverallow rules
###
# Only init should be able to load SELinux policies
neverallow { domain -init } kernel:security load_policy;
This diff is collapsed.
Click to expand it.
init.te
+
1
−
0
View file @
2637198f
...
@@ -9,3 +9,4 @@ relabelto_domain(init)
...
@@ -9,3 +9,4 @@ relabelto_domain(init)
allow init unlabeled:filesystem mount;
allow init unlabeled:filesystem mount;
allow init {fs_type dev_type file_type}:dir_file_class_set relabelto;
allow init {fs_type dev_type file_type}:dir_file_class_set relabelto;
allow init kernel:security load_policy;
This diff is collapsed.
Click to expand it.
unconfined.te
+
1
−
1
View file @
2637198f
allow unconfineddomain self:capability_class_set *;
allow unconfineddomain self:capability_class_set *;
allow unconfineddomain kernel:security
*
;
allow unconfineddomain kernel:security
~load_policy
;
allow unconfineddomain kernel:system *;
allow unconfineddomain kernel:system *;
allow unconfineddomain self:memprotect *;
allow unconfineddomain self:memprotect *;
allow unconfineddomain domain:process *;
allow unconfineddomain domain:process *;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment