1# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14allow hdfdomain vendor_bin_file:file { entrypoint execute map read };
15
16#neverallow
17# let every hdf_host join hdf_domain
18neverallow { domain -hdfdomain -sadomain -init -hap_domain -isolated_gpu developer_only(`-input_isolate_debug_hap') -input_isolate_hap } hdf_devmgr:binder call;
19
20neverallow { domain -hdfdomain -sadomain -hap_domain -isolated_gpu -binder_call_hdfdomain_violators } hdfdomain:binder call;
21
22neverallow isolated_gpu { hdfdomain -codec_host -allocator_host }: binder call;
23
24neverallow { hap_domain } { hdfdomain -allocator_host -violator_hdfdomain_binder_call -codec_host -usb_host -input_user_host }:binder call;
25
26neverallow 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_devmgr_class { get };
27