1# Copyright (c) 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 14binder_call(daudio, accountmgr); 15 16allow daudio hilog_param:file { open read map }; 17 18allow daudio debug_param:file { open read map }; 19 20allow daudio accesstoken_service:binder { call }; 21 22allow daudio media_service:binder { call transfer}; 23 24allow daudio musl_param:file { read open map }; 25 26allow daudio data_file:dir { search }; 27 28allow daudio data_data_file:dir { search }; 29 30allow daudio data_data_file:file { create append open ioctl getattr }; 31 32allowxperm daudio data_data_file:file ioctl { 0x5413 }; 33 34allow daudio_host data_data_file:dir { add_name search write }; 35 36allow daudio_host data_data_file:file { create append open ioctl getattr }; 37 38allowxperm daudio_host data_data_file:file ioctl { 0x5413 }; 39 40allow daudio data_data_pulse_dir:dir { search read open getattr }; 41 42allow daudio data_data_pulse_dir:file { read write open lock }; 43 44allow daudio dhardware:binder { call }; 45 46allow daudio daudio:udp_socket { create setopt }; 47 48allow daudio daudio:udp_socket { read write connect }; 49 50allow daudio daudio:netlink_route_socket { create write nlmsg_read nlmsg_readpriv read }; 51 52allow daudio daudio_host:binder { call transfer }; 53 54allow daudio daudio:unix_dgram_socket { getopt setopt }; 55 56allow daudio dev_unix_socket:dir { search }; 57 58allow daudio media_service:fd { use }; 59 60allow daudio native_socket:sock_file { write }; 61 62allow daudio softbus_server:tcp_socket { setopt write }; 63 64allow daudio softbus_server:udp_socket { write read }; 65 66allow daudio softbus_server:dir { read }; 67 68allow daudio softbus_server:fd { use }; 69 70allow daudio softbus_server:binder { call transfer }; 71 72allow daudio softbus_server:tcp_socket { shutdown }; 73 74allow daudio softbus_server:tcp_socket { read }; 75 76allow daudio hilog_param:udp_socket { read }; 77 78allow daudio hdf_devmgr:binder { call transfer }; 79 80allow daudio hdf_device_manager:hdf_devmgr_class { get }; 81 82allow daudio hdf_daudio_ext:hdf_devmgr_class { get }; 83 84allow daudio tracefs:dir { search }; 85 86allow daudio tracefs_trace_marker_file:file { write open }; 87 88allow daudio proc_file:file { read open }; 89 90allow daudio audio_server:unix_stream_socket { connectto }; 91 92allow daudio audio_server:binder { call transfer }; 93 94allow daudio audio_server:fd { use }; 95 96allow daudio param_watcher:binder { call transfer }; 97 98allow daudio sa_param_watcher:samgr_class { get }; 99 100allow daudio sa_distributed_hardware_audio_sink_service:samgr_class { add get_remote }; 101 102allow daudio sa_distributed_hardware_audio_source_service:samgr_class { add get_remote }; 103 104allow daudio sa_device_service_manager:samgr_class { get }; 105 106allow daudio sa_softbus_service:samgr_class { get }; 107 108allow daudio sa_media_service:samgr_class { get }; 109 110allow daudio sa_audio_policy_service:samgr_class { get }; 111 112allow daudio sa_accesstoken_manager_service:samgr_class { get }; 113 114allow daudio sa_pulseaudio_audio_service:samgr_class { get }; 115 116allow daudio daudio:udp_socket { bind getattr }; 117 118allow daudio node:udp_socket { node_bind }; 119 120allow daudio sys_param:file { open read map }; 121 122allow daudio system_bin_file:dir { search }; 123 124allow daudio vendor_bin_file:dir { search }; 125 126allow daudio hdf_devhost_exec:dir { search }; 127 128allow daudio daudio_host:fd { use }; 129 130allow daudio sa_dhardware_service:samgr_class { get }; 131 132allow daudio hdf_codec_hdi_omx_service:hdf_devmgr_class { get }; 133 134allow daudio sa_foundation_bms:samgr_class { get }; 135 136allow daudio foundation:binder { call }; 137 138allow daudio dhardware:binder { transfer }; 139 140allow daudio sa_foundation_devicemanager_service:samgr_class { get }; 141 142allow daudio dslm_service:binder { call transfer }; 143 144allow daudio device_manager:binder { call transfer }; 145 146allow daudio dev_kmsg_file:chr_file { write open }; 147 148allow daudio dev_ashmem_file:chr_file { open }; 149 150allow daudio hdf_codec_component_manager_service:hdf_devmgr_class { get }; 151 152allow daudio sa_device_security_level_manager_service:samgr_class { get }; 153 154allow daudio persist_sys_param:file { read open map }; 155 156allow daudio arkcompiler_param:file { read open map }; 157 158allow daudio ark_writeable_param:file { read open map }; 159 160allow daudio system_lib_file:dir { read open }; 161 162allow daudio persist_param:file { read open map }; 163 164allow daudio codec_host:binder { call transfer }; 165 166allow daudio sa_accountmgr:samgr_class { get }; 167 168debug_only(` 169 allow daudio sh:binder { call }; 170') 171