commit: 99939b9839fb45093fe193e06139eab4a95637da Author: Jason Zaman <jason <AT> perfinion <DOT> com> AuthorDate: Wed Jul 16 23:07:18 2014 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Wed Jul 16 23:21:59 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=99939b98
sysfs: restorecon after mounting /sys X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956 --- init.d/sysfs.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/init.d/sysfs.in b/init.d/sysfs.in index e01dcc8..2156670 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 }
