From 983a25b4d25d40704ad7112ac930f2d216db4335 Mon Sep 17 00:00:00 2001 From: roynatech2544 Date: Wed, 5 Oct 2022 09:59:39 +0000 Subject: [PATCH] universal7885: sepolicy: Rename for aidl hals --- universal7885-common/sepolicy/private/file_contexts | 5 +++-- .../sepolicy/private/hal_fmradio_default.te | 7 ++++--- .../sepolicy/private/hal_parts_default.te | 9 +++++---- universal7885-common/sepolicy/private/hwservice.te | 2 -- universal7885-common/sepolicy/private/service.te | 2 ++ .../private/{hwservice_contexts => service_contexts} | 12 ++++++------ 6 files changed, 20 insertions(+), 17 deletions(-) delete mode 100644 universal7885-common/sepolicy/private/hwservice.te create mode 100644 universal7885-common/sepolicy/private/service.te rename universal7885-common/sepolicy/private/{hwservice_contexts => service_contexts} (69%) diff --git a/universal7885-common/sepolicy/private/file_contexts b/universal7885-common/sepolicy/private/file_contexts index 3f29825..568cf18 100644 --- a/universal7885-common/sepolicy/private/file_contexts +++ b/universal7885-common/sepolicy/private/file_contexts @@ -9,8 +9,9 @@ /data/debug(/.*)? u:object_r:eklogger_data_file:s0 # SamsungParts -/system/bin/vendor\.eureka\.hardware\.parts@[0-9]\.[0-9]-service u:object_r:hal_parts_default_exec:s0 +/system/bin/vendor\.eureka\.hardware\.parts-service u:object_r:hal_parts_default_exec:s0 + # FMRadio -/system/bin/vendor\.eureka\.hardware\.fmradio@[0-9]\.[0-9]-service u:object_r:hal_fmradio_default_exec:s0 +/system/bin/vendor\.eureka\.hardware\.fmradio-service u:object_r:hal_fmradio_default_exec:s0 /dev/radio0 u:object_r:fm_radio_device:s0 diff --git a/universal7885-common/sepolicy/private/hal_fmradio_default.te b/universal7885-common/sepolicy/private/hal_fmradio_default.te index f4af7b9..465f065 100644 --- a/universal7885-common/sepolicy/private/hal_fmradio_default.te +++ b/universal7885-common/sepolicy/private/hal_fmradio_default.te @@ -1,10 +1,11 @@ type hal_fmradio_default, domain, coredomain; type hal_fmradio_default_exec, exec_type, file_type, system_file_type; -add_hwservice(hal_fmradio_default, hal_fmradio_hwservice); + +add_service(hal_fmradio_default, hal_fmradio_service); init_daemon_domain(hal_fmradio_default); -hwbinder_use(hal_fmradio_default); -get_prop(hal_fmradio_default, hwservicemanager_prop); +binder_use(hal_fmradio_default); +get_prop(hal_fmradio_default, servicemanager_prop); allow hal_fmradio_default sysfs_fmradio_tune:file rw_file_perms; allow hal_fmradio_default sysfs_fmradio_tune:dir search; diff --git a/universal7885-common/sepolicy/private/hal_parts_default.te b/universal7885-common/sepolicy/private/hal_parts_default.te index 943448c..e9512bc 100644 --- a/universal7885-common/sepolicy/private/hal_parts_default.te +++ b/universal7885-common/sepolicy/private/hal_parts_default.te @@ -1,10 +1,11 @@ type hal_parts_default, domain, coredomain; -type hal_parts_default_exec, exec_type, file_type, system_file_type; -add_hwservice(hal_parts_default, hal_parts_hwservice); +type hal_parts_default_exec, exec_type, file_type, system_file_type; + +add_hwservice(hal_parts_default, hal_parts_service); init_daemon_domain(hal_parts_default); -hwbinder_use(hal_parts_default); -get_prop(hal_parts_default, hwservicemanager_prop); +binder_use(hal_parts_default); +get_prop(hal_parts_default, servicemanager_prop); # Battery allow hal_parts_default sysfs_sec_switch:dir { search }; diff --git a/universal7885-common/sepolicy/private/hwservice.te b/universal7885-common/sepolicy/private/hwservice.te deleted file mode 100644 index 77fe145..0000000 --- a/universal7885-common/sepolicy/private/hwservice.te +++ /dev/null @@ -1,2 +0,0 @@ -type hal_parts_hwservice, hwservice_manager_type; -type hal_fmradio_hwservice, hwservice_manager_type; diff --git a/universal7885-common/sepolicy/private/service.te b/universal7885-common/sepolicy/private/service.te new file mode 100644 index 0000000..43b4ca6 --- /dev/null +++ b/universal7885-common/sepolicy/private/service.te @@ -0,0 +1,2 @@ +type hal_parts_service, service_manager_type; +type hal_fmradio_service, service_manager_type; diff --git a/universal7885-common/sepolicy/private/hwservice_contexts b/universal7885-common/sepolicy/private/service_contexts similarity index 69% rename from universal7885-common/sepolicy/private/hwservice_contexts rename to universal7885-common/sepolicy/private/service_contexts index efc3d87..b06d61b 100644 --- a/universal7885-common/sepolicy/private/hwservice_contexts +++ b/universal7885-common/sepolicy/private/service_contexts @@ -1,8 +1,8 @@ # SamsungParts -vendor.eureka.hardware.parts::IBatteryStats u:object_r:hal_parts_hwservice:s0 -vendor.eureka.hardware.parts::IFlashBrightness u:object_r:hal_parts_hwservice:s0 -vendor.eureka.hardware.parts::IDisplayConfigs u:object_r:hal_parts_hwservice:s0 -vendor.eureka.hardware.parts::ISwapOnData u:object_r:hal_parts_hwservice:s0 -vendor.eureka.hardware.parts::ISmartCharge u:object_r:hal_parts_hwservice:s0 +vendor.eureka.hardware.parts::IBatteryStats u:object_r:hal_parts_service:s0 +vendor.eureka.hardware.parts::IFlashBrightness u:object_r:hal_parts_service:s0 +vendor.eureka.hardware.parts::IDisplayConfigs u:object_r:hal_parts_service:s0 +vendor.eureka.hardware.parts::ISwapOnData u:object_r:hal_parts_service:s0 +vendor.eureka.hardware.parts::ISmartCharge u:object_r:hal_parts_service:s0 # FMRadio -vendor.eureka.hardware.fmradio::IFMRadio u:object_r:hal_fmradio_hwservice:s0 +vendor.eureka.hardware.fmradio::IFMRadio u:object_r:hal_fmradio_service:s0