# 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. #avc:denied { call } scontext=u:r:nfc_service:s0 tcontext=u:r:normal_hap:s0 tclass=binder #avc:denied { transfer } scontext=u:r:nfc_service:s0 tcontext=u:r:normal_hap:s0 tclass=binder allow nfc_service hap_domain:binder { transfer call }; #avc:denied { getattr } scontext=u:r:nfc_service:s0 tcontext=u:object_r:vendor_etc_file:s0 tclass=dir #avc:denied { search } scontext=u:r:nfc_service:s0 tcontext=u:object_r:vendor_etc_file:s0 tclass=dir allow nfc_service vendor_etc_file:dir { getattr search }; allow nfc_service sys_file:file { read }; allow nfc_service dev_kmsg_file:chr_file { open write }; #avc:denied { map } scontext=u:r:nfc_service:s0 tcontext=u:object_r:persist_param:s0 tclass=file #avc:denied { open } scontext=u:r:nfc_service:s0 tcontext=u:object_r:persist_param:s0 tclass=file #avc:denied { read } scontext=u:r:nfc_service:s0 tcontext=u:object_r:persist_param:s0 tclass=file allow nfc_service persist_param:file { map open read }; allow nfc_service hiview_file:dir { open read remove_name search write }; allow nfc_service hiview_file:file { getattr open read unlink }; #avc:denied { write } scontext=u:r:nfc_service:s0 tcontext=u:object_r:data_nfc:s0 tclass=dir #avc:denied { add_name } scontext=u:r:nfc_service:s0 tcontext=u:object_r:data_nfc:s0 tclass=dir #avc:denied { remove_name } scontext=u:r:nfc_service:s0 tcontext=u:object_r:data_nfc:s0 tclass=dir allow nfc_service data_nfc:dir { write add_name remove_name }; #avc:denied { create write open } scontext=u:r:nfc_service:s0 tcontext=u:object_r:data_nfc:s0 tclass=file #avc:denied { getattr ioctl setattr } scontext=u:r:nfc_service:s0 tcontext=u:object_r:data_nfc:s0 tclass=file #avc:denied { read rename unlink } scontext=u:r:nfc_service:s0 tcontext=u:object_r:data_nfc:s0 tclass=file allow nfc_service data_nfc:file { create write open getattr ioctl setattr read rename unlink }; allowxperm nfc_service data_nfc:file ioctl { 0x5413 }; #avc:denied { getattr } scontext=u:r:nfc_service:s0 tcontext=u:object_r:vendor_etc_file:s0 tclass=dir #avc:denied { search } scontext=u:r:nfc_service:s0 tcontext=u:object_r:vendor_etc_file:s0 tclass=dir allow nfc_service vendor_etc_file:dir { getattr search }; allow nfc_service vendor_bin_file:dir {search};