Skip to content
Snippets Groups Projects
Commit bb24f3ab authored by Sandeep Patil's avatar Sandeep Patil
Browse files

mac_permissions: explicitly label all mac_permissions files


*mac_permissions.xml files need to be explicitly labeled as they are now split
cross system and vendor and won't have the generic world readable
'system_file' or 'rootfs' label.

Bug: 36003167
Test: no new 'mac_perms_file' denials at boot complete on sailfish
Test: successfully booted into recovery without denials and sideloaded
      OTA update.
Test: Launch 'chrome' and succesfully load a website.
Test: Launch Camera and take a picture.
Test: Launch Camera and record a video, succesfully playback recorded
      video

Change-Id: I1c882872bb78d1242ba273756ef0dc27487f58fc
Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
parent 136caa1b
No related branches found
No related tags found
No related merge requests found
...@@ -249,6 +249,7 @@ ...@@ -249,6 +249,7 @@
/system/bin/virtual_touchpad u:object_r:virtual_touchpad_exec:s0 /system/bin/virtual_touchpad u:object_r:virtual_touchpad_exec:s0
/system/bin/vr_wm u:object_r:vr_wm_exec:s0 /system/bin/vr_wm u:object_r:vr_wm_exec:s0
/system/bin/hw/android\.hidl\.allocator@1\.0-service u:object_r:hal_allocator_default_exec:s0 /system/bin/hw/android\.hidl\.allocator@1\.0-service u:object_r:hal_allocator_default_exec:s0
/system/etc/selinux/plat_mac_permissions.xml u:object_r:mac_perms_file:s0
/system/etc/selinux/plat_property_contexts u:object_r:property_contexts_file:s0 /system/etc/selinux/plat_property_contexts u:object_r:property_contexts_file:s0
/system/etc/selinux/plat_service_contexts u:object_r:service_contexts_file:s0 /system/etc/selinux/plat_service_contexts u:object_r:service_contexts_file:s0
/system/etc/selinux/plat_file_contexts u:object_r:file_contexts_file:s0 /system/etc/selinux/plat_file_contexts u:object_r:file_contexts_file:s0
...@@ -261,6 +262,7 @@ ...@@ -261,6 +262,7 @@
# #
/vendor(/.*)? u:object_r:system_file:s0 /vendor(/.*)? u:object_r:system_file:s0
/vendor/etc/selinux/mapping_sepolicy.cil u:object_r:sepolicy_file:s0 /vendor/etc/selinux/mapping_sepolicy.cil u:object_r:sepolicy_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_property_contexts u:object_r:property_contexts_file:s0
/vendor/etc/selinux/nonplat_service_contexts u:object_r:service_contexts_file:s0 /vendor/etc/selinux/nonplat_service_contexts u:object_r:service_contexts_file:s0
/vendor/etc/selinux/nonplat_file_contexts u:object_r:file_contexts_file:s0 /vendor/etc/selinux/nonplat_file_contexts u:object_r:file_contexts_file:s0
......
...@@ -232,6 +232,8 @@ allow system_server mediadrmserver:udp_socket rw_socket_perms; ...@@ -232,6 +232,8 @@ allow system_server mediadrmserver:udp_socket rw_socket_perms;
# Get file context # Get file context
allow system_server file_contexts_file:file r_file_perms; allow system_server file_contexts_file:file r_file_perms;
# access for mac_permissions
allow system_server mac_perms_file: file r_file_perms;
# Check SELinux permissions. # Check SELinux permissions.
selinux_check_access(system_server) selinux_check_access(system_server)
......
...@@ -259,6 +259,9 @@ type gps_control, file_type; ...@@ -259,6 +259,9 @@ type gps_control, file_type;
# file_contexts files # file_contexts files
type file_contexts_file, file_type; type file_contexts_file, file_type;
# mac_permissions file
type mac_perms_file, file_type;
# property_contexts file # property_contexts file
type property_contexts_file, file_type; type property_contexts_file, file_type;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment