SELinux: hwservice: Add type for hal_miscpower

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I02f15eba26d9491ff694e6076c0fa4d90a5532a0
This commit is contained in:
Deokgyu Yang 2021-05-13 17:50:24 +09:00
parent 7ae364f33e
commit dd8af22d97
4 changed files with 21 additions and 2 deletions

View file

@ -13,4 +13,14 @@ type sysfs_fpc_keyevents, sysfs_type, fs_type;
type sysfs_fpc_wakeup, sysfs_type, fs_type;
type sysfs_fpc_proximity, sysfs_type, fs_type;
type sysfs_panel, sysfs_type, fs_type;
type sysfs_audio_writable, fs_type, sysfs_type;
type sysfs_camera_writable, fs_type, sysfs_type;
type sysfs_lcd_writable, fs_type, sysfs_type;
type sysfs_mdnie_writable, fs_type, sysfs_type;
type sysfs_sec_keypad, fs_type, sysfs_type;
type sysfs_sec_switch, fs_type, sysfs_type;
type sysfs_tsp, fs_type, sysfs_type;
type sysfs_wifi, fs_type, sysfs_type;
type thermal_data_file, core_data_file_type, data_file_type, file_type;

View file

@ -50,7 +50,7 @@
/(vendor|system/vendor)/bin/hw/android\.hardware\.usb@1\.1-service\.gts3l u:object_r:hal_usb_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-qcom u:object_r:hal_lineage_livedisplay_sysfs_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.camera\.provider@3\.0-service u:object_r:hal_camera_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.miscpower@2\.0-service u:object_r:hal_power_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.miscpower@1\.0-service u:object_r:hal_power_default_exec:s0
# Shell scripts
/(vendor|system/vendor)/bin/init\.panel\.sh u:object_r:init_panel_exec:s0

View file

@ -1,3 +1,11 @@
add_hwservice(hal_power_default, hal_miscpower_hwservice)
# Allow writing to files in /proc/touchpanel
allow hal_power_default proc_touchpanel:dir search;
allow hal_power_default proc_touchpanel:file rw_file_perms;
allow hal_power_default sysfs_devices_system_cpu:file rw_file_perms;
allow hal_power_default sysfs_batteryinfo:dir r_dir_perms;
allow hal_power_default sysfs_batteryinfo:file rw_file_perms;
allow hal_power_default sysfs_tsp:dir r_dir_perms;
allow hal_power_default sysfs_tsp:file rw_file_perms;

View file

@ -1 +1,2 @@
type hal_bluetooth_a2dp_hwservice, hwservice_manager_type
type hal_bluetooth_a2dp_hwservice, hwservice_manager_type;
type hal_miscpower_hwservice, hwservice_manager_type;