1# Copyright (c) 2022 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 14type updater_sa, sadomain, domain; 15 16allow updater_sa dev_unix_socket:dir { search }; 17allow updater_sa port:tcp_socket { name_connect }; 18allow updater_sa updater_sa:tcp_socket { connect create read setopt write getopt getattr }; 19allow updater_sa updater_sa:unix_dgram_socket { getopt setopt }; 20allow updater_sa data_file:dir { search }; 21allow updater_sa data_ota_package:dir { add_name search write remove_name }; 22allow updater_sa data_ota_package:dir { append ioctl open read }; 23allow updater_sa data_ota_package:file { append create ioctl open read rename unlink getattr }; 24allow updater_sa dev_file:sock_file { write }; 25allow updater_sa netsysnative:unix_stream_socket { connectto }; 26allow updater_sa updater_sa:udp_socket { create bind connect getattr read write }; 27allow updater_sa node:udp_socket { node_bind }; 28allow updater_sa system_basic_hap:binder { call }; 29 30