From b3232b2cb44a3df02a37efd852ecfef2f3a9e5cc Mon Sep 17 00:00:00 2001 From: Jonathan Billings Date: Wed, 1 Jun 2011 11:05:11 -0400 Subject: [PATCH] linux: rpm: Fix SELinux attributes on /afs when installing openafs-client package Since the directory /afs isn't included in the package manifest, but rather created in a script in the openafs-client package, it never gets the appropriate SELinux attributes that are required to mount a volume (mnt_t). This change fixes the problem by running '/sbin/restorecon' (if it is an executable that exists) on the /afs directory after the openafs-client package is installed, right after the directory is created. Change-Id: I3905cf8da8f7414e410acfa8df51b35abe057cd7 Reviewed-on: http://gerrit.openafs.org/4763 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- src/packaging/RedHat/openafs.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index 08013f6..224cf86 100644 --- a/src/packaging/RedHat/openafs.spec.in +++ b/src/packaging/RedHat/openafs.spec.in @@ -1296,6 +1296,7 @@ if [ ! -d /afs ]; then mkdir /afs chown root.root /afs chmod 0755 /afs + [ -x /sbin/restorecon ] && /sbin/restorecon /afs fi # Create the CellServDB -- 1.9.4