gs101-sepolicy: Rename hal_uwb -> hal_uwb_vendor

Since we are now creating an AOSP HAL for uwb. Rename qorvo's internal
HAL to hal_uwb_vendor to avoid conflicts with the AOSP HAL sepolicy
rules.

Bug: 195308730
Test: Compiles
Change-Id: Ief48eacde68b062b2199b20c0c1bb3af23795240
Merged-In: Ief48eacde68b062b2199b20c0c1bb3af23795240
This commit is contained in:
Roshan Pius 2021-08-23 08:55:07 -07:00
parent 545771e074
commit 9c96111094
9 changed files with 35 additions and 35 deletions

View file

@ -1,6 +1,6 @@
dump_hal(hal_telephony)
dump_hal(hal_graphics_composer)
dump_hal(hal_uwb)
dump_hal(hal_uwb_vendor)
userdebug_or_eng(`
allow dumpstate media_rw_data_file:file append;

View file

@ -348,7 +348,7 @@
# Uwb
# R4
/vendor/bin/hw/hardware\.qorvo\.uwb-service u:object_r:hal_uwb_default_exec:s0
/vendor/bin/hw/hardware\.qorvo\.uwb-service u:object_r:hal_uwb_vendor_default_exec:s0
/vendor/bin/init\.uwb\.calib\.sh u:object_r:vendor_uwb_init_exec:s0
/mnt/vendor/persist/uwb(/.*)? u:object_r:persist_uwb_file:s0
/data/vendor/uwb(/.*)? u:object_r:uwb_data_vendor:s0

View file

@ -1,15 +0,0 @@
# HwBinder IPC from client to server
binder_call(hal_uwb_client, hal_uwb_server)
binder_call(hal_uwb_server, hal_uwb_client)
hal_attribute_service(hal_uwb, hal_uwb_service)
binder_call(hal_uwb_server, servicemanager)
# allow hal_uwb to set wpan interfaces up and down
allow hal_uwb self:udp_socket create_socket_perms;
allowxperm hal_uwb self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFHWADDR SIOCETHTOOL };
allow hal_uwb self:global_capability_class_set { net_admin };
# allow hal_uwb to speak to nl802154 in the kernel
allow hal_uwb self:netlink_generic_socket create_socket_perms_no_ioctl;

View file

@ -1,11 +0,0 @@
type hal_uwb_default, domain;
type hal_uwb_default_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(hal_uwb_default)
add_service(hal_uwb_default, hal_uwb_service)
hal_server_domain(hal_uwb_default, hal_uwb)
binder_call(hal_uwb_default, uwb_vendor_app)
allow hal_uwb_default uwb_data_vendor:dir create_dir_perms;
allow hal_uwb_default uwb_data_vendor:file create_file_perms;

View file

@ -0,0 +1,15 @@
# HwBinder IPC from client to server
binder_call(hal_uwb_vendor_client, hal_uwb_vendor_server)
binder_call(hal_uwb_vendor_server, hal_uwb_vendor_client)
hal_attribute_service(hal_uwb_vendor, hal_uwb_vendor_service)
binder_call(hal_uwb_vendor_server, servicemanager)
# allow hal_uwb_vendor to set wpan interfaces up and down
allow hal_uwb_vendor self:udp_socket create_socket_perms;
allowxperm hal_uwb_vendor self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFHWADDR SIOCETHTOOL };
allow hal_uwb_vendor self:global_capability_class_set { net_admin };
# allow hal_uwb_vendor to speak to nl802154 in the kernel
allow hal_uwb_vendor self:netlink_generic_socket create_socket_perms_no_ioctl;

View file

@ -0,0 +1,11 @@
type hal_uwb_vendor_default, domain;
type hal_uwb_vendor_default_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(hal_uwb_vendor_default)
add_service(hal_uwb_vendor_default, hal_uwb_vendor_service)
hal_server_domain(hal_uwb_vendor_default, hal_uwb_vendor)
binder_call(hal_uwb_vendor_default, uwb_vendor_app)
allow hal_uwb_vendor_default uwb_data_vendor:dir create_dir_perms;
allow hal_uwb_vendor_default uwb_data_vendor:file create_file_perms;

View file

@ -1,4 +1,4 @@
type hal_pixel_display_service, service_manager_type, vendor_service;
type uwb_vendor_service, service_manager_type, vendor_service;
type touch_context_service, service_manager_type, vendor_service;
type hal_uwb_service, service_manager_type, vendor_service;
type hal_uwb_vendor_service, service_manager_type, vendor_service;

View file

@ -1,4 +1,4 @@
com.google.hardware.pixel.display.IDisplay/default u:object_r:hal_pixel_display_service:s0
com.google.input.ITouchContextService/default u:object_r:touch_context_service:s0
uwb_vendor u:object_r:uwb_vendor_service:s0
hardware.qorvo.uwb.IUwb/default u:object_r:hal_uwb_service:s0
hardware.qorvo.uwb.IUwb/default u:object_r:hal_uwb_vendor_service:s0

View file

@ -5,18 +5,18 @@ app_domain(uwb_vendor_app)
add_service(uwb_vendor_app, uwb_vendor_service)
not_recovery(`
hal_client_domain(uwb_vendor_app, hal_uwb)
hal_client_domain(uwb_vendor_app, hal_uwb_vendor)
allow uwb_vendor_app app_api_service:service_manager find;
allow uwb_vendor_app hal_uwb_service:service_manager find;
allow uwb_vendor_app hal_uwb_vendor_service:service_manager find;
allow uwb_vendor_app nfc_service:service_manager find;
allow uwb_vendor_app radio_service:service_manager find;
allow uwb_vendor_app uwb_vendor_data_file:file create_file_perms;
allow uwb_vendor_app uwb_vendor_data_file:dir create_dir_perms;
allow hal_uwb_default self:global_capability_class_set { sys_nice };
allow hal_uwb_default kernel:process { setsched };
allow hal_uwb_vendor_default self:global_capability_class_set { sys_nice };
allow hal_uwb_vendor_default kernel:process { setsched };
binder_call(uwb_vendor_app, hal_uwb_default)
binder_call(uwb_vendor_app, hal_uwb_vendor_default)
')