sepolicy: allow gnssd access modem_state

avc:  denied  { read } for  name="modem_state" dev="sysfs" ino=77641 scontext=u:r:gnssd:s0 tcontext=u:object_r:sysfs_modem_state:s0 tclass=file
avc:  denied  { open } for path="/sys/devices/platform/cpif/modem_state" dev="sysfs" ino=77641 scontext=u:r:gnssd:s0 tcontext=u:object_r:sysfs_modem_state:s0 tclass=file
avc:  denied  { getattr } for path="/sys/devices/platform/cpif/modem_state" dev="sysfs" ino=77641 scontext=u:r:gnssd:s0 tcontext=u:object_r:sysfs_modem_state:s0 tclass=file

Bug: 340977648
Test: Verification boot-health at b/340977648#comment2
Test: Verification the function has been called by gnss.
Change-Id: I7b8e53cc4bfe0c2170a4d0346a48c996a5f41dcd
This commit is contained in:
Cheng Chang 2024-05-16 02:48:28 +00:00
parent 8745414fb8
commit a6ee1c723c

3
vendor/gnssd.te vendored
View file

@ -25,3 +25,6 @@ get_prop(gnssd, bootanim_system_prop)
allow gnssd sysfs_soc:file r_file_perms; allow gnssd sysfs_soc:file r_file_perms;
allow gnssd sysfs_gps:file rw_file_perms; allow gnssd sysfs_gps:file rw_file_perms;
# Read modme state
allow gnssd sysfs_modem_state:file r_file_perms;