# Copyright (c) 2023 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. allow init update_firmware_file:dir { search write create add_name getattr open read relabelto setattr }; allow init update_firmware_file:file { getattr }; allow init update_dupdate_engine_file:dir { getattr open read relabelto search setattr }; allow init update_dupdate_engine_file:file { getattr relabelto }; allow init update_update_service_file:dir { getattr open read relabelto search setattr }; allow init update_update_service_file:file { getattr relabelto }; allow init updater_sa:file { getattr }; # avc: denied { setattr } for pid=1 comm="init" name="mmcblk0p2" dev="tmpfs" ino=35 scontext=u:r:init:s0 tcontext=u:object_r:updater_block_file:s0 tclass=blk_file permissive=1 allow init updater_block_file:blk_file { setattr }; # avc: denied { read } for pid=1 comm="init" name="misc" dev="tmpfs" ino=37 scontext=u:r:init:s0 tcontext=u:object_r:updater_block_file:s0 tclass=lnk_file permissive=1 allow init updater_block_file:lnk_file { read };