From f34e592984c4918d6db2532945ca793d14a09d29 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Tue, 12 Dec 2017 09:34:13 -0800 Subject: [PATCH] shell: directory access to sysfs_net This will allow bionic cts test to list network interfaces in /sys/class/net. Bug: 70537905 Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter=ifaddrs.getifaddrs_interfaces Change-Id: Ie07425fc54f9101e911962142824697e64d2bc45 --- public/shell.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/shell.te b/public/shell.te index 1318c35f4..81f4bf0ca 100644 --- a/public/shell.te +++ b/public/shell.te @@ -123,6 +123,9 @@ allow shell { proc_zoneinfo }:file r_file_perms; +# allow listing network interfaces under /sys/class/net. +allow shell sysfs_net:dir r_dir_perms; + r_dir_file(shell, cgroup) allow shell domain:dir { search open read getattr }; allow shell domain:{ file lnk_file } { open read getattr };