From c8018d04a7b238b57a3d74a68e2af02af395f510 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 13 Aug 2014 15:26:37 -0500 Subject: [PATCH] tmpfiles: fix relabel to run restorecon before chown and chmod --- sh/tmpfiles.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index 85385453..42a36392 100755 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -45,10 +45,10 @@ relabel() { for path in ${paths}; do if [ -e "$path" ]; then + [ -x /sbin/restorecon ] && dryrun_or_real restorecon $CHOPTS "$path" [ $uid != '-' ] && dryrun_or_real chown $CHOPTS "$uid" "$path" [ $gid != '-' ] && dryrun_or_real chgrp $CHOPTS "$gid" "$path" [ $mode != '-' ] && dryrun_or_real chmod $CHOPTS "$mode" "$path" - [ -x /sbin/restorecon ] && dryrun_or_real restorecon $CHOPTS "$path" fi done }