From 60e0a18e2a48cc1b95ae093a83653ebaed59aac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 11 May 2021 00:29:44 -0700 Subject: [PATCH] correctly label networking gadgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to pass system/netd/tests/netd_test.cpp: TEST(NetdSELinuxTest, CheckProperMTULabels) { // Since we expect the egrep regexp to filter everything out, // we thus expect no matches and thus a return code of 1 ASSERT_EQ(W_EXITCODE(1, 0), system("ls -Z /sys/class/net/*/mtu | egrep -q -v " "'^u:object_r:sysfs_net:s0 /sys/class/net/'")); } Test: atest, TreeHugger, manual observation of labeling Bug: 185962988 Signed-off-by: Maciej Żenczykowski Change-Id: Ib4f8aa6cc2e0f5a5bd432bcfe473e550f5c68132 --- whitechapel/vendor/google/genfs_contexts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/whitechapel/vendor/google/genfs_contexts b/whitechapel/vendor/google/genfs_contexts index baef90b9..65bda57f 100644 --- a/whitechapel/vendor/google/genfs_contexts +++ b/whitechapel/vendor/google/genfs_contexts @@ -66,6 +66,9 @@ genfscon sysfs /devices/platform/14700000.ufs/health_descriptor u:object genfscon sysfs /devices/platform/14700000.ufs/host0/target0:0:0/0:0:0: u:object_r:sysfs_scsi_devices_0000:s0 genfscon sysfs /devices/platform/14700000.ufs/ufs_stats u:object_r:sysfs_scsi_devices_0000:s0 +# Tethering +genfscon sysfs /devices/platform/11110000.usb/11110000.dwc3/gadget/net u:object_r:sysfs_net:s0 + # Vibrator genfscon sysfs /devices/platform/10970000.hsi2c/i2c-4/4-005a u:object_r:sysfs_vibrator:s0 genfscon sysfs /devices/platform/10970000.hsi2c/i2c-4/4-0043 u:object_r:sysfs_vibrator:s0