From: Jonathan Billings Date: Wed, 1 Jun 2011 15:05:11 +0000 (-0400) Subject: linux: rpm: Fix SELinux attributes on /afs when installing openafs-client package X-Git-Tag: upstream/1.8.0_pre1^2~3681 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b3232b2cb44a3df02a37efd852ecfef2f3a9e5cc;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index 08013f6fb..224cf86bc 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