Skip to content
Snippets Groups Projects
Commit 5a6ab596 authored by Sandeep Patil's avatar Sandeep Patil Committed by android-build-merger
Browse files

service_contexts: label service_contexts explicitly

am: 939d16b5

Change-Id: I1c351ee36100730bf98a3fe820d1f51f7b672ba5
parents b81943b6 939d16b5
No related branches found
No related tags found
No related merge requests found
...@@ -100,6 +100,7 @@ allow adbd system_file:file r_file_perms; ...@@ -100,6 +100,7 @@ allow adbd system_file:file r_file_perms;
allow adbd selinuxfs:dir r_dir_perms; allow adbd selinuxfs:dir r_dir_perms;
allow adbd selinuxfs:file r_file_perms; allow adbd selinuxfs:file r_file_perms;
allow adbd kernel:security read_policy; allow adbd kernel:security read_policy;
allow adbd service_contexts_file:file r_file_perms;
allow adbd surfaceflinger_service:service_manager find; allow adbd surfaceflinger_service:service_manager find;
allow adbd bootchart_data_file:dir search; allow adbd bootchart_data_file:dir search;
......
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
/nonplat_seapp_contexts u:object_r:rootfs:s0 /nonplat_seapp_contexts u:object_r:rootfs:s0
/plat_seapp_contexts u:object_r:rootfs:s0 /plat_seapp_contexts u:object_r:rootfs:s0
/sepolicy u:object_r:rootfs:s0 /sepolicy u:object_r:rootfs:s0
/plat_service_contexts u:object_r:rootfs:s0 /plat_service_contexts u:object_r:service_contexts_file:s0
/nonplat_service_contexts u:object_r:rootfs:s0 /nonplat_service_contexts u:object_r:service_contexts_file:s0
########################## ##########################
# Devices # Devices
...@@ -250,12 +250,14 @@ ...@@ -250,12 +250,14 @@
/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_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
############################# #############################
# Vendor files # Vendor files
# #
/vendor(/.*)? u:object_r:system_file:s0 /vendor(/.*)? u:object_r:system_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
############################# #############################
# OEM and ODM files # OEM and ODM files
......
...@@ -259,6 +259,9 @@ type gps_control, file_type; ...@@ -259,6 +259,9 @@ type gps_control, file_type;
# property_contexts file # property_contexts file
type property_contexts_file, file_type; type property_contexts_file, file_type;
# service_contexts file
type service_contexts_file, file_type;
# Allow files to be created in their appropriate filesystems. # Allow files to be created in their appropriate filesystems.
allow fs_type self:filesystem associate; allow fs_type self:filesystem associate;
allow sysfs_type sysfs:filesystem associate; allow sysfs_type sysfs:filesystem associate;
......
...@@ -11,7 +11,8 @@ type servicemanager_exec, exec_type, file_type; ...@@ -11,7 +11,8 @@ type servicemanager_exec, exec_type, file_type;
allow servicemanager self:binder set_context_mgr; allow servicemanager self:binder set_context_mgr;
allow servicemanager { domain -init }:binder transfer; allow servicemanager { domain -init }:binder transfer;
r_dir_file(servicemanager, rootfs) # Access to all (system and vendor) service_contexts
allow servicemanager service_contexts_file:file r_file_perms;
# Check SELinux permissions. # Check SELinux permissions.
selinux_check_access(servicemanager) selinux_check_access(servicemanager)
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