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 14allow init data_module_update:dir { add_name create getattr link open read relabelto remove_name search setattr unlink write }; 15allow init data_module_update_package:dir { getattr open read relabelto search setattr write }; 16allow init data_module_update_package:file { getattr link open read }; 17allowxperm init dev_block_file:blk_file ioctl { 0x1261 0x4c00 0x4c01 0x4c04 0x4c09 0x4c0a }; 18allow init dev_file:chr_file { ioctl open read write }; 19allowxperm init dev_file:chr_file ioctl { 0xfd03 0xfd06 0xfd07 0xfd09 }; 20allow init dev_loop_control_file:chr_file { getattr ioctl open read write }; 21allowxperm init dev_loop_control_file:chr_file ioctl { 0x4c80 0x4c82 }; 22allow init module_update_file:dir { search }; 23allow init module_update_service:binder { call }; 24allow init sa_module_update_service:samgr_class { get }; 25allow init sysfs_block_loop:file { open read write }; 26allow init system_file:dir { open read }; 27allow init system_file:file { open read getattr }; 28allow init system_module_update_file:dir { getattr open read search }; 29allow init system_profile_file:file { getattr open read }; 30allow init tmpfs:dir { remove_name }; 31allow init tmpfs:filesystem { mount }; 32