platform_build/target/board/generic/sepolicy/genfs_contexts
Bjoern Johansson ca5bfb1ca7 Update SELinux rules to support emulator WiFi
SELinux policies have become stricter, this updates the emulator SELinux
rules to accomodate these changes. It also adds rules for the new
createns command with the accompanying execns changes that are needed
to work with an updated filesystem layout.

BUG: 74514143
Test: Compile emulator images and verify that WiFi works
Change-Id: I4b58cea681a1e41b0cb7368e1c696f74ce28f871
2018-03-22 12:59:49 -07:00

20 lines
964 B
Text

# On the emulator, device tree dir is configured to be
# /sys/bus/platform/devices/ANDR0001:00/properties/android/ which is a symlink to
# /sys/devices/platform/ANDR0001:00/properties/android/
genfscon sysfs /devices/platform/ANDR0001:00/properties/android u:object_r:sysfs_dt_firmware_android:s0
# 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
# /proc/<pid>/ns
genfscon nsfs / u:object_r:nsfs:s0