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
2377fa7c
Commit
2377fa7c
authored
7 years ago
by
Tri Vo
Committed by
android-build-merger
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Files under /vendor must have attribute vendor_file_type." am:
97753529
am:
51ba2a75
am:
1316d5a5
Change-Id: I80994ace09a7f3a3e455733737cc0c00d01c500a
parents
19243f69
1316d5a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
private/file_contexts
+0
-11
0 additions, 11 deletions
private/file_contexts
tests/sepolicy_tests.py
+6
-0
6 additions, 0 deletions
tests/sepolicy_tests.py
with
6 additions
and
11 deletions
private/file_contexts
+
0
−
11
View file @
2377fa7c
...
@@ -306,17 +306,6 @@
...
@@ -306,17 +306,6 @@
# HAL location
# HAL location
/(vendor|system/vendor)/lib(64)?/hw u:object_r:vendor_hal_file:s0
/(vendor|system/vendor)/lib(64)?/hw u:object_r:vendor_hal_file:s0
/vendor/etc/selinux/nonplat_mac_permissions.xml u:object_r:mac_perms_file:s0
/vendor/etc/selinux/nonplat_property_contexts u:object_r:property_contexts_file:s0
/vendor/etc/selinux/nonplat_service_contexts u:object_r:nonplat_service_contexts_file:s0
/vendor/etc/selinux/nonplat_hwservice_contexts u:object_r:hwservice_contexts_file:s0
/vendor/etc/selinux/nonplat_file_contexts u:object_r:file_contexts_file:s0
/vendor/etc/selinux/nonplat_seapp_contexts u:object_r:seapp_contexts_file:s0
/vendor/etc/selinux/nonplat_sepolicy.cil u:object_r:sepolicy_file:s0
/vendor/etc/selinux/precompiled_sepolicy u:object_r:sepolicy_file:s0
/vendor/etc/selinux/precompiled_sepolicy\.plat_and_mapping\.sha256 u:object_r:sepolicy_file:s0
/vendor/etc/selinux/vndservice_contexts u:object_r:vndservice_contexts_file:s0
#############################
#############################
# OEM and ODM files
# OEM and ODM files
#
#
...
...
This diff is collapsed.
Click to expand it.
tests/sepolicy_tests.py
+
6
−
0
View file @
2377fa7c
...
@@ -19,6 +19,10 @@ def TestDebugfsTypeViolations(pol):
...
@@ -19,6 +19,10 @@ def TestDebugfsTypeViolations(pol):
# TODO: this should apply to genfs_context entries as well
# TODO: this should apply to genfs_context entries as well
return
pol
.
AssertPathTypesHaveAttr
([
"
/sys/kernel/debug/
"
,
return
pol
.
AssertPathTypesHaveAttr
([
"
/sys/kernel/debug/
"
,
"
/sys/kernel/tracing
"
],
[],
"
debugfs_type
"
)
"
/sys/kernel/tracing
"
],
[],
"
debugfs_type
"
)
def
TestVendorTypeViolations
(
pol
):
return
pol
.
AssertPathTypesHaveAttr
([
"
/vendor/
"
],
[],
"
vendor_file_type
"
)
###
###
# extend OptionParser to allow the same option flag to be used multiple times.
# extend OptionParser to allow the same option flag to be used multiple times.
# This is used to allow multiple file_contexts files and tests to be
# This is used to allow multiple file_contexts files and tests to be
...
@@ -81,6 +85,8 @@ if __name__ == '__main__':
...
@@ -81,6 +85,8 @@ if __name__ == '__main__':
results
+=
TestSysfsTypeViolations
(
pol
)
results
+=
TestSysfsTypeViolations
(
pol
)
if
options
.
test
is
None
or
"
TestDebugfsTypeViolations
"
in
options
.
test
:
if
options
.
test
is
None
or
"
TestDebugfsTypeViolations
"
in
options
.
test
:
results
+=
TestDebugfsTypeViolations
(
pol
)
results
+=
TestDebugfsTypeViolations
(
pol
)
if
options
.
test
is
None
or
"
TestVendorTypeViolations
"
in
options
.
test
:
results
+=
TestVendorTypeViolations
(
pol
)
if
len
(
results
)
>
0
:
if
len
(
results
)
>
0
:
sys
.
exit
(
results
)
sys
.
exit
(
results
)
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