# Copyright (c) 2021-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. attribute cap_violator_binder_hmc; allow hdfdomain vendor_bin_file:file { entrypoint execute map read }; #neverallow # let every hdf_host join hdf_domain neverallow { domain -hdfdomain -sadomain -init -hap_domain developer_only(`-input_isolate_debug_hap') -input_isolate_hap } hdf_devmgr:binder call; neverallow { domain -hdfdomain -sadomain -hap_domain -binder_call_hdfdomain_violators developer_only(`-input_isolate_debug_hap') -input_isolate_hap } hdfdomain:binder call; neverallow { hap_domain } { hdfdomain -allocator_host -violator_hdfdomain_binder_call -codec_host -usb_host -input_user_host -cap_violator_binder_hmc }:binder call; neverallow { input_isolate_debug_hap -input_isolate_hap } { hdfdomain -allocator_host }:binder call; neverallow hap_domain { hdf_service_attr -hdf_hid_ddk_service -hdf_usb_ddk_service debug_only(`-hdf_usb_interface_service') -hdf_allocator_service -hdf_codec_image_service -violator_hdf_devmgr_class_get -hdf_codec_component_manager_service -hdf_usbfn_mtp_interface_service -cap_violator_binder_hmc }:hdf_devmgr_class { get }; neverallow { hap_domain -medialibrary_hap } { hdf_usbfn_mtp_interface_service }:hdf_devmgr_class { get };