Merge "sepolicy for usb hal" am: deefb43328

am: a03dc09d97

Change-Id: Idbf416c1355edfbf05db9f24c455ee1cc65e2b5b
This commit is contained in:
Badhri Jagan Sridharan 2017-01-27 07:40:19 +00:00 committed by android-build-merger
commit abd94f25f2
5 changed files with 21 additions and 0 deletions

View file

@ -259,6 +259,7 @@
/system/bin/hw/android\.hardware\.power@1\.0-service u:object_r:hal_power_default_exec:s0
/system/bin/hw/android\.hardware\.sensors@1\.0-service u:object_r:hal_sensors_default_exec:s0
/system/bin/hw/android\.hardware\.thermal@1\.0-service u:object_r:hal_thermal_default_exec:s0
/system/bin/hw/android\.hardware\.usb@1\.0-service u:object_r:hal_usb_default_exec:s0
/system/bin/hw/android\.hardware\.vibrator@1\.0-service u:object_r:hal_vibrator_default_exec:s0
/system/bin/hw/android\.hardware\.vr@1\.0-service u:object_r:hal_vr_default_exec:s0
/system/bin/hw/android\.hardware\.wifi@1\.0-service u:object_r:hal_wifi_default_exec:s0

View file

@ -0,0 +1,4 @@
type hal_usb_default, domain;
hal_impl_domain(hal_usb_default, hal_usb)
type hal_usb_default_exec, exec_type, file_type;
init_daemon_domain(hal_usb_default)

View file

@ -138,6 +138,7 @@ attribute hal_power;
attribute hal_sensors;
attribute hal_telephony;
attribute hal_thermal;
attribute hal_usb;
attribute hal_vibrator;
attribute hal_vr;
attribute hal_wifi;

14
public/hal_usb.te Normal file
View file

@ -0,0 +1,14 @@
# call into system_server process (callbacks)
binder_call(hal_usb, system_server)
allow hal_usb self:netlink_kobject_uevent_socket create;
allow hal_usb self:netlink_kobject_uevent_socket setopt;
allow hal_usb self:netlink_kobject_uevent_socket bind;
allow hal_usb self:netlink_kobject_uevent_socket read;
allow hal_usb sysfs:dir open;
allow hal_usb sysfs:dir read;
allow hal_usb sysfs:file read;
allow hal_usb sysfs:file open;
allow hal_usb sysfs:file write;
allow hal_usb sysfs:file getattr;

View file

@ -178,6 +178,7 @@ binder_call(system_server, hal_memtrack)
binder_call(system_server, hal_power)
binder_call(system_server, hal_sensors)
binder_call(system_server, hal_thermal)
binder_call(system_server, hal_usb)
binder_call(system_server, hal_vibrator)
binder_call(system_server, hal_vr)
binder_call(system_server, hal_wifi)