Wayne Lin 1c9e011597 gps: add policy for partial reset feature
avc:  denied  { read } for  name="u:object_r:vendor_rild_prop:s0" dev="tmpfs" ino=413 scontext=u:r:gnssd:s0 tcontext=u:object_r:vendor_rild_prop:s0 tclass=file permissive=0
avc:  denied  { open } for  path="/dev/__properties__/u:object_r:vendor_rild_prop:s0" dev="tmpfs" ino=414 scontext=u:r:gnssd:s0 tcontext=u:object_r:vendor_rild_prop:s0 tclass=file permissive=0
avc:  denied  { getattr } for  path="/dev/__properties__/u:object_r:vendor_rild_prop:s0" dev="tmpfs" ino=414 scontext=u:r:gnssd:s0 tcontext=u:object_r:vendor_rild_prop:s0 tclass=file permissive=0
avc:  denied  { map } for  path="/dev/__properties__/u:object_r:vendor_rild_prop:s0" dev="tmpfs" ino=414 scontext=u:r:gnssd:s0 tcontext=u:object_r:vendor_rild_prop:s0 tclass=file permissive=0

Bug: 326493553
Test: no avc denied error
Change-Id: I4ac1ecf51da01c24d4e2f0f7e52df1d2cb92e275
2024-03-01 02:46:50 +08:00

34 lines
976 B
Plaintext

type gnssd, domain;
type gnssd_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(gnssd);
# Allow gnssd to access rild
binder_call(gnssd, rild);
binder_call(gnssd, hwservicemanager)
allow gnssd hal_exynos_rild_hwservice:hwservice_manager find;
allow gnssd radio_device:chr_file rw_file_perms;
# Allow gnssd to acess gnss device
allow gnssd vendor_gnss_device:chr_file rw_file_perms;
allow gnssd vendor_gps_file:dir create_dir_perms;
allow gnssd vendor_gps_file:file create_file_perms;
allow gnssd vendor_gps_file:fifo_file create_file_perms;
# Allow gnssd to obtain wakelock
wakelock_use(gnssd)
# Allow a base set of permissions required for network access.
net_domain(gnssd);
# Allow gnssd to get boot complete
get_prop(gnssd, bootanim_system_prop)
allow gnssd sysfs_soc:file r_file_perms;
allow gnssd sysfs_gps:file rw_file_perms;
# Allow gnssd to set GPS property
set_prop(gnssd, vendor_gps_prop)
# Read RIL property
get_prop(gnssd, vendor_rild_prop)