Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82ca9a74 authored by Tri Vo's avatar Tri Vo
Browse files

Fix /sys denials.

Labeled files linked from /sys/class/{rtc, net}.
Fixes these denials:
avc: denied { read } for pid=6413 comm="system_server" name="hctosys"
dev="sysfs" ino=10068 scontext=u:r:system_server:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

avc: denied { write } for pid=4785 comm="Binder:4785_2" name="mtu"
dev="sysfs" ino=9213 scontext=u:r:netd:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=0

Test: files labeled as expected; emulator boots without above denials.
Change-Id: I8fd8cc993ede0ddfd4404c0647a60da4867ef128
parent 30a532a1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -6,3 +6,12 @@ genfscon sysfs /devices/platform/ANDR0001:00/properties/android u:object_r:sysfs
# We expect /sys/class/power_supply/* and everything it links to to be labeled
# as sysfs_batteryinfo.
genfscon sysfs /devices/platform/GFSH0001:00/power_supply u:object_r:sysfs_batteryinfo:s0

# /sys/class/rtc
genfscon sysfs /devices/pnp0/00:00/rtc u:object_r:sysfs_rtc:s0
genfscon sysfs /devices/platform/GFSH0007:00/rtc u:object_r:sysfs_rtc:s0

# /sys/class/net
genfscon sysfs /devices/pci0000:00/0000:00:08.0/virtio5/net u:object_r:sysfs_net:s0
genfscon sysfs /devices/virtual/mac80211_hwsim/hwsim0/net u:object_r:sysfs_net:s0
genfscon sysfs /devices/virtual/mac80211_hwsim/hwsim1/net u:object_r:sysfs_net:s0