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.6.0.pre7^2~68 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=46842f03d96d586e69b9ed5f70d6f4c220d3a93c;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. Reviewed-on: http://gerrit.openafs.org/4763 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit b3232b2cb44a3df02a37efd852ecfef2f3a9e5cc) Change-Id: I5944c16f558f2651250d122f547fbfd71519c1d1 Reviewed-on: http://gerrit.openafs.org/4786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index cb7132119..12603b700 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