• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  { add } for service=3304 pid=469 scontext=u:r:foundation:s0 tcontext=u:object_r:sa_foundation_batterystats_service:s0 tclass=samgr_class permissive=0
15allow foundation sa_foundation_batterystats_service:samgr_class { add };
16
17#avc:  denied  { read } for  pid=542 comm="foundation" name="power_average.json" dev="mmcblk0p6" ino=830 scontext=u:r:foundation:s0 tcontext=u:object_r:system_etc_batterystats_file:s0 tclass=file permissive=0
18allow foundation system_etc_batterystats_file:file { open read };
19
20#avc:  denied  { create } for  pid=520 comm="CesFwkListener" name="battery_stats.json" scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=file permissive=1
21#avc:  denied  { open } for  pid=520 comm="foundation" path="/data/service/el0/stats/battery_stats.json" dev="mmcblk0p11" ino=6893 scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=file permissive=1
22#avc:  denied  { read } for  pid=520 comm="foundation" name="battery_stats.json" dev="mmcblk0p11" ino=6893 scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=file permissive=1
23#avc:  denied  { write } for  pid=520 comm="CesFwkListener" name="battery_stats.json" dev="mmcblk0p11" ino=6893 scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=file permissive=1
24allow foundation data_service_el0_file:file { create ioctl open read write };
25
26#avc:  denied  { add_name } for  pid=520 comm="CesFwkListener" name="battery_stats.json" scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=dir permissive=1
27#avc:  denied  { search } for  pid=476 comm="foundation" name="el0" dev="mmcblk0p11" ino=8 scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=dir permissive=0
28#avc:  denied  { write } for  pid=520 comm="CesFwkListener" name="stats" dev="mmcblk0p11" ino=197 scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=dir permissive=1
29allow foundation data_service_el0_file:dir { add_name search write };
30
31#avc:  denied  { get } for service=1203 pid=598 scontext=u:r:foundation:s0 tcontext=u:object_r:sa_sys_event_service:s0 tclass=samgr_class permissive=1
32allow foundation sa_sys_event_service:samgr_class { get };
33
34#avc:  denied  { ioctl } for  pid=520 comm="CesFwkListener" path="/data/service/el0/stats/battery_stats.json" dev="mmcblk0p11" ino=6893 ioctlcmd=0x5413 scontext=u:r:foundation:s0 tcontext=u:object_r:data_service_el0_file:s0 tclass=file permissive=1
35allowxperm foundation data_service_el0_file:file ioctl { 0x5413 };
36
37#avc: denied { getattr } for pid=668 comm="SaInit2" path="/system/etc/profile/power_average.json" dev="mmcblk0p7" ino=752 scontext=u:r:foundation:s0 tcontext=u:object_r:system_etc_batterystats_file:s0 tclass=file permissive=0
38allow foundation system_etc_batterystats_file:file { getattr };
39
40#avc: denied { search } for pid=668 comm="IPC_6_1023" name="etc" dev="mmcblk0p9" ino=12 scontext=u:r:foundation:s0 tcontext=u:object_r:sys_prod_file:s0 tclass=dir permissive=0
41allow foundation sys_prod_file:dir { search };
42