diff options
author | Jason Zaman <jason@perfinion.com> | 2014-07-17 03:07:18 +0400 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2014-07-16 18:21:59 -0500 |
commit | 99939b9839fb45093fe193e06139eab4a95637da (patch) | |
tree | 04262d529a4c2af9544a5761c4147218e7849261 | |
parent | 89907b60bac51db2cda1afe4555676577ef498a8 (diff) |
sysfs: restorecon after mounting /sys
X-Gentoo-Bug: 516956
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
-rw-r--r-- | init.d/sysfs.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in index e01dcc87..21566704 100644 --- a/init.d/sysfs.in +++ b/init.d/sysfs.in @@ -120,6 +120,18 @@ mount_cgroups() done < /proc/cgroups } +restorecon_sys() +{ + if [ -x /sbin/restorecon ]; then + ebegin "Restoring SELinux contexts in /sys" + restorecon -F /sys/devices/system/cpu/online >/dev/null 2>&1 + restorecon -rF /sys/fs/cgroup >/dev/null 2>&1 + eend $? + fi + + return 0 +} + start() { local retval @@ -133,5 +145,8 @@ start() mount_cgroups retval=$? fi + + restorecon_sys + return $retval } |