# Copyright (c) 2024 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. type devicedebug, native_system_domain, domain; type devicedebug_exec, system_file_attr, exec_attr, file_attr; developer_only(` domain_auto_transition_pattern(sh, devicedebug_exec, devicedebug); allow sh devicedebug_exec:file { execute execute_no_trans getattr map open read }; allow devicedebug default_param:file { map open read }; allow devicedebug appspawn:unix_stream_socket { connectto }; allow devicedebug appspawn_socket:sock_file { write }; allow devicedebug sh:fd { use }; allow devicedebug dev_unix_socket:dir { search }; allow appspawn hap_domain:process { signal }; allow devicedebug hdcd:fd { use }; allow devicedebug devpts:chr_file { read write }; ')