From a98cdefad60a8ad6e2ea72e48adc9a4d58f16560 Mon Sep 17 00:00:00 2001 From: Howard Yen Date: Thu, 28 Nov 2019 15:02:26 +0800 Subject: [PATCH] Add sepolicy for usb gadget hal v1.1 Bug: 147645728 Test: build pass and service running correctly Change-Id: I52b6bcae2c05998e3f22c39998597e2ecef55036 --- vendor/file_contexts | 1 + vendor/hal_usb_gadget_default.te | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 vendor/hal_usb_gadget_default.te diff --git a/vendor/file_contexts b/vendor/file_contexts index a3726cad1..84cd14632 100644 --- a/vendor/file_contexts +++ b/vendor/file_contexts @@ -61,6 +61,7 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.input@1\.0-service u:object_r:hal_tv_input_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.tuner@1\.0-service u:object_r:hal_tv_tuner_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.usb@1\.0-service u:object_r:hal_usb_default_exec:s0 +/(vendor|system/vendor)/bin/hw/android\.hardware\.usb\.gadget@1\.1-service u:object_r:hal_usb_gadget_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator@1\.0-service u:object_r:hal_vibrator_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator-service.example u:object_r:hal_vibrator_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.vr@1\.0-service u:object_r:hal_vr_default_exec:s0 diff --git a/vendor/hal_usb_gadget_default.te b/vendor/hal_usb_gadget_default.te new file mode 100644 index 000000000..f1486b9e2 --- /dev/null +++ b/vendor/hal_usb_gadget_default.te @@ -0,0 +1,5 @@ +type hal_usb_gadget_default, domain; +hal_server_domain(hal_usb_gadget_default, hal_usb_gadget) + +type hal_usb_gadget_default_exec, exec_type, vendor_file_type, file_type; +init_daemon_domain(hal_usb_gadget_default)