diff --git a/sepolicy/ohos_policy/drivers/adapter/public/hdf_service.te b/sepolicy/ohos_policy/drivers/adapter/public/hdf_service.te index 964e3b47..d1aeafa6 100644 --- a/sepolicy/ohos_policy/drivers/adapter/public/hdf_service.te +++ b/sepolicy/ohos_policy/drivers/adapter/public/hdf_service.te @@ -48,6 +48,7 @@ type hdf_activity_interface_service, hdf_service_attr; type hdf_usb_interface_service, hdf_service_attr; type hdf_usbfn_mtp_interface_service, hdf_service_attr; +type hdf_usb_ddk_service, hdf_service_attr; type hdf_usb_pnp_sample_service, hdf_service_attr; type hdf_usbhost_acm_pnp_service, hdf_service_attr; type hdf_usbhost_acm_rawapi_service, hdf_service_attr; diff --git a/sepolicy/ohos_policy/drivers/adapter/public/hdf_service_contexts b/sepolicy/ohos_policy/drivers/adapter/public/hdf_service_contexts index ea00ce92..6f34c625 100644 --- a/sepolicy/ohos_policy/drivers/adapter/public/hdf_service_contexts +++ b/sepolicy/ohos_policy/drivers/adapter/public/hdf_service_contexts @@ -67,6 +67,7 @@ allocator_service u:object_r:hdf_allocator_service:s0 usb_interface_service u:object_r:hdf_usb_interface_service:s0 usbfn_mtp_interface_service u:object_r:hdf_usbfn_mtp_interface_service:s0 +usb_ddk_service u:object_r:hdf_usb_ddk_service:s0 partition_slot_service u:object_r:hdf_partition_slot_service:s0 wlan_interface_service u:object_r:hdf_wlan_interface_service:s0 diff --git a/sepolicy/ohos_policy/drivers/peripheral/usb/vendor/usb_host.te b/sepolicy/ohos_policy/drivers/peripheral/usb/vendor/usb_host.te index efa87d07..b3be0386 100644 --- a/sepolicy/ohos_policy/drivers/peripheral/usb/vendor/usb_host.te +++ b/sepolicy/ohos_policy/drivers/peripheral/usb/vendor/usb_host.te @@ -14,8 +14,8 @@ allow usb_host dev_console_file:chr_file { read write }; allow usb_host sa_usb_service:samgr_class { add }; allow usb_host data_service_file:dir { search }; -allow usb_host data_service_el1_file:dir { search }; -allow usb_host data_service_el1_file:file { ioctl open read write getattr }; +allow usb_host data_service_el1_file:dir { search add_name write}; +allow usb_host data_service_el1_file:file { ioctl open read write getattr create map}; allow usb_host hdf_usbhost_acm_pnp_service:hdf_devmgr_class { add }; allow usb_host hdf_usbhost_acm_rawapi_service:hdf_devmgr_class { add }; allow usb_host hdf_usbhost_ecm_pnp_service:hdf_devmgr_class { add }; @@ -78,6 +78,7 @@ allow usb_host configfs:lnk_file { create unlink }; debug_only(` allow usb_host console:binder { call }; allow usb_host console:fd { use }; + allow usb_host sh:binder { call }; ') allow usb_host data_file:dir { search }; allow usb_host data_init_agent:dir { search }; @@ -108,6 +109,7 @@ allow usb_host hdf_usbd:hdf_devmgr_class { add }; allow usb_host hdf_usbfn_cdcacm:hdf_devmgr_class { add get }; allow usb_host hdf_usbfn_cdcecm:hdf_devmgr_class { add get }; allow usb_host hdf_usbfn:hdf_devmgr_class { add get }; +allow usb_host hdf_usb_ddk_service:hdf_devmgr_class { add }; allow usb_host hiview:binder { call }; allow usb_host kernel:unix_stream_socket { connectto }; allow usb_host paramservice_socket:sock_file { write };