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
79e873c0
Commit
79e873c0
authored
10 years ago
by
Nick Kralevich
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "sepolicy: Clean up mls constraints."
parents
0d3bf4be
025b7df2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mls
+9
-25
9 additions, 25 deletions
mls
with
9 additions
and
25 deletions
mls
+
9
−
25
View file @
79e873c0
...
...
@@ -26,9 +26,9 @@ mlsconstrain process { transition dyntransition }
mlsconstrain process { getsched getsession getpgid getcap getattr ptrace share }
(l1 dom l2 or t1 == mlstrustedsubject);
# Process write operations:
No write down
unless trusted.
# Process write operations:
Require equivalence
unless trusted.
mlsconstrain process { sigkill sigstop signal setsched setpgid setcap setrlimit ptrace share }
(l1
domby
l2 or t1 == mlstrustedsubject);
(l1
eq
l2 or t1 == mlstrustedsubject);
#
# Socket constraints
...
...
@@ -39,10 +39,10 @@ mlsconstrain process { sigkill sigstop signal setsched setpgid setcap setrlimit
mlsconstrain socket_class_set { create relabelfrom relabelto }
((h1 eq h2 and l1 eq l2) or t1 == mlstrustedsubject);
# Datagram send: Sender must be
dominated by
receiver unless one of them
is
# trusted.
# Datagram send: Sender must be
equivalent to the
receiver unless one of them
#
is
trusted.
mlsconstrain unix_dgram_socket { sendto }
(l1
domby
l2 or t1 == mlstrustedsubject or t2 == mlstrustedsubject);
(l1
eq
l2 or t1 == mlstrustedsubject or t2 == mlstrustedsubject);
# Stream connect: Client must be equivalent to server unless one of them
# is trusted.
...
...
@@ -83,13 +83,13 @@ mlsconstrain dir { read getattr search }
mlsconstrain { file lnk_file sock_file chr_file blk_file } { read getattr execute }
(t2 == app_data_file or l1 dom l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
# Write operations: Subject must be
dominated by
the object unless the
# Write operations: Subject must be
equivalent to
the object unless the
# subject or the object is trusted.
mlsconstrain dir { write setattr rename add_name remove_name reparent rmdir }
(t2 == app_data_file or l1
domby
l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
(t2 == app_data_file or l1
eq
l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
mlsconstrain { file lnk_file sock_file chr_file blk_file } { write setattr append unlink link rename }
(t2 == app_data_file or l1
domby
l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
(t2 == app_data_file or l1
eq
l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
# Special case for FIFOs.
# These can be unnamed pipes, in which case they will be labeled with the
...
...
@@ -100,23 +100,7 @@ mlsconstrain fifo_file { read getattr }
(l1 dom l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject or t2 == domain);
mlsconstrain fifo_file { write setattr append unlink link rename }
(l1 domby l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject or t2 == domain);
#
# IPC constraints
#
# Create/destroy: equivalence or trusted.
mlsconstrain ipc_class_set { create destroy }
(l2 eq h2 and (l1 eq l2 or t1 == mlstrustedsubject));
# Read ops: No read up unless trusted.
mlsconstrain ipc_class_set r_ipc_perms
(l1 dom l2 or t1 == mlstrustedsubject);
# Write ops: No write down unless trusted.
mlsconstrain ipc_class_set w_ipc_perms
(l1 domby l2 or t1 == mlstrustedsubject);
(l1 eq l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject or t2 == domain);
#
# Binder IPC constraints
...
...
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