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 14#avc: denied { signal } for pid=2026 comm="sh" scontext=u:r:sh:s0 tcontext=u:r:sensors:s0 tclass=process permissive=1 15allow sh sensors:process { signal }; 16 17#avc: denied { call } for pid=2025 comm="SensorAgentFuzz" scontext=u:r:sh:s0 tcontext=u:r:sensors:s0 tclass=binder permissive=1 18#avc: denied { transfer } for pid=2349 comm="SensorAgentTest" scontext=u:r:sh:s0 tcontext=u:r:sensors:s0 tclass=binder permissive=1 19allow sh sensors:binder { call transfer }; 20 21#avc: denied { get } for service=3601 pid=1930 scontext=u:r:sh:s0 tcontext=u:object_r:sa_sensor_service:s0 tclass=samgr_class permissive=1 22allow sh sa_sensor_service:samgr_class { get }; 23 24#avc: denied { unlink } for pid=2268 comm="rm" name="SensorAgentFuzzTest" dev="mmcblk0p11" ino=913935 scontext=u:r:sh:s0 tcontext=u:object_r:data_file:s0 tclass=file permissive=1 25#avc: denied { getattr } for pid=2268 comm="rm" path="/data/test/SensorAgentFuzzTest" dev="mmcblk0p11" ino=913935 scontext=u:r:sh:s0 tcontext=u:object_r:data_file:s0 tclass=file permissive=1 26#avc: denied { setattr } for pid=2043 comm="chmod" name="SensorJsTest.hap" dev="mmcblk0p11" ino=255 scontext=u:r:sh:s0 tcontext=u:object_r:data_file:s0 tclass=file permissive=1 27allow sh data_file:file { unlink getattr setattr }; 28 29#avc: denied { getattr } for pid=2148 comm="ps" path="/proc/571" dev="proc" ino=30549 scontext=u:r:sh:s0 tcontext=u:r:sensors:s0 tclass=dir permissive=1 30#avc: denied { search } for pid=2148 comm="ps" name="571" dev="proc" ino=30549 scontext=u:r:sh:s0 tcontext=u:r:sensors:s0 tclass=dir permissive=1 31allow sh sensors:dir { search getattr }; 32 33#avc: denied { read } for pid=1963 comm="SensorAgentFuzz" name="u:object_r:sys_param:s0" dev="tmpfs" ino=48 scontext=u:r:sh:s0 tcontext=u:object_r:sys_param:s0 tclass=file permissive=1 34#avc: denied { open } for pid=1963 comm="SensorAgentFuzz" path="/dev/parameters/u:object_r:sys_param:s0" dev="tmpfs" ino=48 scontext=u:r:sh:s0 tcontext=u:object_r:sys_param:s0 tclass=file permissive=1 35#avc: denied { map } for pid=1963 comm="SensorAgentFuzz" path="/dev/parameters/u:object_r:sys_param:s0" dev="tmpfs" ino=48 scontext=u:r:sh:s0 tcontext=u:object_r:sys_param:s0 tclass=file permissive=1 36allow sh sys_param:file { open read map }; 37 38#avc: denied { remove_name } for pid=2050 comm="rm" name="SensorJsTest.hap" dev="mmcblk0p11" ino=255 scontext=u:r:sh:s0 tcontext=u:object_r:data_file:s0 tclass=dir permissive=1 39allow sh data_file:dir { remove_name }; 40 41#avc: denied { write } for pid=2011 comm="SensorAgentTest" name="/" dev="mmcblk0p6" ino=2 scontext=u:r:sh:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=1 42#avc: denied { add_name } for pid=2011 comm="SensorAgentTest" name="SensorAgentTest.xml" scontext=u:r:sh:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=1 43allow sh rootfs:dir { write add_name }; 44 45#avc: denied { ioctl } for pid=2011 comm="SensorAgentTest" path="/SensorAgentTest.xml" dev="mmcblk0p6" ino=2550 ioctlcmd=0x5413 scontext=u:r:sh:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1 46#avc: denied { open } for pid=2011 comm="SensorAgentTest" path="/SensorAgentTest.xml" dev="mmcblk0p6" ino=2550 scontext=u:r:sh:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1 47allow sh rootfs:file { ioctl open }; 48 49#avc: denied { sigkill } for pid=2789 comm="sh" scontext=u:r:sh:s0 tcontext=u:r:sensors:s0 tclass=process permissive=1 50allow sh sensors:process { sigkill }; 51 52#avc: denied { getattr } for pid=3482 comm="sh" path="/system/bin/hisysevent" dev="mmcblk0p6" ino=228 scontext=u:r:sh:s0 tcontext=u:object_r:hisysevent_exec:s0 tclass=file permissive=1 53#avc: denied { execute } for pid=3482 comm="sh" name="hisysevent" dev="mmcblk0p6" ino=228 scontext=u:r:sh:s0 tcontext=u:object_r:hisysevent_exec:s0 tclass=file permissive=1 54#avc: denied { read open } for pid=3596 comm="sh" path="/system/bin/hisysevent" dev="mmcblk0p6" ino=228 scontext=u:r:sh:s0 tcontext=u:object_r:hisysevent_exec:s0 tclass=file permissive=1 55#avc: denied { map } for pid=3596 comm="hisysevent" path="/system/bin/hisysevent" dev="mmcblk0p6" ino=228 scontext=u:r:sh:s0 tcontext=u:object_r:hisysevent_exec:s0 tclass=file permissive=1 56#avc: denied { execute_no_trans } for pid=3662 comm="sh" path="/system/bin/hisysevent" dev="mmcblk0p6" ino=228 scontext=u:r:sh:s0 tcontext=u:object_r:hisysevent_exec:s0 tclass=file permissive=1 57allow sh hisysevent_exec:file { getattr execute read open map execute_no_trans }; 58 59#avc: denied { open } for pid=2841 comm="SensorAgentTest" path="/proc/stat" dev="proc" ino=4026532112 scontext=u:r:sh:s0 tcontext=u:object_r:proc_stat_file:s0 tclass=file permissive=1 60#avc: denied { read } for pid=2841 comm="SensorAgentTest" name="stat" dev="proc" ino=4026532112 scontext=u:r:sh:s0 tcontext=u:object_r:proc_stat_file:s0 tclass=file permissive=1 61allow sh proc_stat_file:file { open read }; 62 63#avc: denied { get } for service=3602 pid=1907 scontext=u:r:sh:s0 tcontext=u:object_r:sa_miscdevice_service:s0 tclass=samgr_class permissive=1 64allow sh sa_miscdevice_service:samgr_class { get } ; 65