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
e44a431d
Commit
e44a431d
authored
10 years ago
by
dcashman
Committed by
Android Git Automerger
10 years ago
Browse files
Options
Downloads
Plain Diff
am
60cfe79f
: Revert "Drop special handling of app_data_file in mls constraints."
* commit '
60cfe79f
': Revert "Drop special handling of app_data_file in mls constraints."
parents
31a8511a
60cfe79f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mls
+21
-5
21 additions, 5 deletions
mls
with
21 additions
and
5 deletions
mls
+
21
−
5
View file @
e44a431d
...
@@ -59,21 +59,37 @@ mlsconstrain unix_stream_socket { connectto }
...
@@ -59,21 +59,37 @@ mlsconstrain unix_stream_socket { connectto }
mlsconstrain dir_file_class_set { create relabelfrom relabelto }
mlsconstrain dir_file_class_set { create relabelfrom relabelto }
(l2 eq h2 and (l1 eq l2 or t1 == mlstrustedsubject));
(l2 eq h2 and (l1 eq l2 or t1 == mlstrustedsubject));
#
# Constraints for app data files only.
#
# Only constrain open, not read/write.
# Also constrain other forms of manipulation, e.g. chmod/chown, unlink, rename, etc.
# Subject must be equivalent to object unless the subject is trusted.
mlsconstrain dir { open search setattr rename add_name remove_name reparent rmdir }
(t2 != app_data_file or l1 eq l2 or t1 == mlstrustedsubject);
mlsconstrain { file lnk_file sock_file } { open setattr unlink link rename }
(t2 != app_data_file or l1 eq l2 or t1 == mlstrustedsubject);
#
# Constraints for file types other than app data files.
#
# Read operations: Subject must dominate object unless the subject
# Read operations: Subject must dominate object unless the subject
# or the object is trusted.
# or the object is trusted.
mlsconstrain dir { read getattr search }
mlsconstrain dir { read getattr search }
(l1 dom l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
(
t2 == app_data_file or
l1 dom l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
mlsconstrain { file lnk_file sock_file chr_file blk_file } {
open
execute }
mlsconstrain { file lnk_file sock_file chr_file blk_file } {
read getattr
execute }
(l1 dom l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
(
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 dominated by the object unless the
# subject or the object is trusted.
# subject or the object is trusted.
mlsconstrain dir { write setattr rename add_name remove_name reparent rmdir }
mlsconstrain dir { write setattr rename add_name remove_name reparent rmdir }
(l1 domby l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
(
t2 == app_data_file or
l1 domby l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
mlsconstrain { file lnk_file sock_file chr_file blk_file } { write setattr append unlink link rename }
mlsconstrain { file lnk_file sock_file chr_file blk_file } { write setattr append unlink link rename }
(l1 domby l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
(
t2 == app_data_file or
l1 domby l2 or t1 == mlstrustedsubject or t2 == mlstrustedobject);
# Special case for FIFOs.
# Special case for FIFOs.
# These can be unnamed pipes, in which case they will be labeled with the
# These can be unnamed pipes, in which case they will be labeled with the
...
...
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