tmpfiles: fix relabel to run restorecon before chown and chmod
This commit is contained in:
parent
6f080e9c1a
commit
c8018d04a7
@ -45,10 +45,10 @@ relabel() {
|
|||||||
|
|
||||||
for path in ${paths}; do
|
for path in ${paths}; do
|
||||||
if [ -e "$path" ]; then
|
if [ -e "$path" ]; then
|
||||||
|
[ -x /sbin/restorecon ] && dryrun_or_real restorecon $CHOPTS "$path"
|
||||||
[ $uid != '-' ] && dryrun_or_real chown $CHOPTS "$uid" "$path"
|
[ $uid != '-' ] && dryrun_or_real chown $CHOPTS "$uid" "$path"
|
||||||
[ $gid != '-' ] && dryrun_or_real chgrp $CHOPTS "$gid" "$path"
|
[ $gid != '-' ] && dryrun_or_real chgrp $CHOPTS "$gid" "$path"
|
||||||
[ $mode != '-' ] && dryrun_or_real chmod $CHOPTS "$mode" "$path"
|
[ $mode != '-' ] && dryrun_or_real chmod $CHOPTS "$mode" "$path"
|
||||||
[ -x /sbin/restorecon ] && dryrun_or_real restorecon $CHOPTS "$path"
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user