diff --git a/private/file_contexts b/private/file_contexts index ef4287b094853f7f6068859e3f5ee60c882212e0..9a1c4967634213da542d1ee7bcbc66cf94d9191d 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -247,7 +247,7 @@ /system/bin/webview_zygote64 u:object_r:webview_zygote_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/hw/android\.hidl\.allocator@1\.0-service u:object_r:hal_allocator_exec:s0 +/system/bin/hw/android\.hidl\.allocator@1\.0-service u:object_r:hal_allocator_default_exec:s0 ############################# # Vendor files diff --git a/private/hal_allocator.te b/private/hal_allocator.te deleted file mode 100644 index d185d490d7575bd7a97e023ed18adb9f09c3f2a8..0000000000000000000000000000000000000000 --- a/private/hal_allocator.te +++ /dev/null @@ -1 +0,0 @@ -init_daemon_domain(hal_allocator) diff --git a/private/hal_allocator_default.te b/private/hal_allocator_default.te new file mode 100644 index 0000000000000000000000000000000000000000..ff407d5a6f153cad002b1d323abd2a94209216e6 --- /dev/null +++ b/private/hal_allocator_default.te @@ -0,0 +1,5 @@ +type hal_allocator_default, domain; +hal_server_domain(hal_allocator_default, hal_allocator) + +type hal_allocator_default_exec, exec_type, file_type; +init_daemon_domain(hal_allocator_default) diff --git a/public/attributes b/public/attributes index 799a4fd78588b3c775c315db40b96f8513885004..b9360a6c683686e035885df34ae3dd807160a998 100644 --- a/public/attributes +++ b/public/attributes @@ -121,6 +121,9 @@ attribute halserverdomain; attribute halclientdomain; # HALs +attribute hal_allocator; +attribute hal_allocator_client; +attribute hal_allocator_server; attribute hal_audio; attribute hal_audio_client; attribute hal_audio_server; diff --git a/public/hal_allocator.te b/public/hal_allocator.te deleted file mode 100644 index cab0145430b3c5545b6ad5825886d8ca054dbb2b..0000000000000000000000000000000000000000 --- a/public/hal_allocator.te +++ /dev/null @@ -1,5 +0,0 @@ -# allocator subsystem -type hal_allocator, domain; -hal_impl_domain(hal_allocator) - -type hal_allocator_exec, exec_type, file_type; diff --git a/public/hal_camera.te b/public/hal_camera.te index 6ed06b79aef4dfb49d1f177f716eebf02198107c..b05239b78714346c8483cde56d04ed1495eca864 100644 --- a/public/hal_camera.te +++ b/public/hal_camera.te @@ -16,7 +16,7 @@ allow { hal_camera_client hal_camera_server } hal_graphics_allocator:fd use; # Allow hal_camera to use fd from app,gralloc,and ashmem HAL allow hal_camera { appdomain -isolated_app }:fd use; allow hal_camera surfaceflinger:fd use; -allow hal_camera hal_allocator:fd use; +allow hal_camera hal_allocator_server:fd use; ### ### neverallow rules diff --git a/public/te_macros b/public/te_macros index 97dd948fce5583a36de4c71efd620223d4610bf6..60de5684e9532b8ae530da69bd7fc601d3d929f8 100644 --- a/public/te_macros +++ b/public/te_macros @@ -338,7 +338,7 @@ typeattribute $1 binderservicedomain; # Allow a domain to use Hidl shared memory define(`hwallocator_use', ` # Call into the allocator hal -binder_call($1, hal_allocator); +binder_call($1, hal_allocator_server); ') #####################################