cachefilesd/cachefilesd-0.10-security-contexts.patch

28 lines
758 B
Diff
Raw Normal View History

commit e8ce3e8205c9aabfe61bc3b34142b9b98e4e0611
Author: Steve Dickson <steved@redhat.com>
Date: Sat Feb 27 05:00:57 2010 -0500
Set default SELinux security contexts on startup.
Make sure the SELinux security contexts are set on files
and directories that the cachefilesd daemon needs to access.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/cachefilesd.initd b/cachefilesd.initd
index 06c4237..bbddcbc 100755
--- a/cachefilesd.initd
+++ b/cachefilesd.initd
@@ -49,6 +49,11 @@ case "$1" in
fi
}
+ # Set security contexts
+ /sbin/restorecon /sbin/cachefilesd
+ /sbin/restorecon /dev/cachefiles
+ /sbin/restorecon -R /var/fscache
+
# Start daemon.
daemon --pidfile=$PIDFILE $PROG ${OPTIONS}
RETVAL=$?