summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Lawrence <paullawrence@google.com>2016-11-02 14:23:31 -0700
committerPaul Lawrence <paullawrence@google.com>2016-11-04 10:56:06 -0700
commitd2abcbd0aba8197040e940d898eb8e28b9fc675d (patch)
tree55cbd61da0c54507f6e437ab02f4c9f6e2bdabc4
parentfc3e90689ecc452b3f0e05144df1580ad78d5d0d (diff)
Fix selinux warning on tracefs systems
restorecon_recursive doesn't traverse filesystem boundaries. On tracefs systems, tracing is a separate filesystem, so restorecon this as well Bug: 30963384 Test: Boot hikey, and check that there are no debugfs_tracing denials in dmesg Change-Id: I24abd3ad80d2cfdab4f64fecee799fc0c24ed238
-rw-r--r--rootdir/init.rc4
1 files changed, 4 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index e8b188259..4c49791a7 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -295,6 +295,10 @@ on post-fs
# Make sure /sys/kernel/debug (if present) is labeled properly
restorecon_recursive /sys/kernel/debug
+ # On systems with tracefs, tracing is a separate mount, so make sure
+ # it too is correctly labeled
+ restorecon_recursive /sys/kernel/debug/tracing
+
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache
chmod 0770 /cache