summarylogtreecommitdiffstats
path: root/selinux-alpm-hook
diff options
context:
space:
mode:
authorNicolas Iooss2022-06-19 22:22:51 +0200
committerNicolas Iooss2022-06-19 22:22:51 +0200
commit4163d5df5929abd136da797806a5e2554e9b7291 (patch)
tree1906dd01169a4c0da67a7bb381c284594ce28e38 /selinux-alpm-hook
parent1427658177e989137cc89720b30618dd5efcc7d4 (diff)
downloadaur-4163d5df5929abd136da797806a5e2554e9b7291.tar.gz
selinux-alpm-hook 0.1-4 update: add -T0 option
Since SELinux userspace 3.4 release, restorecon supports a -T option to run multi-threaded. Use it to speed the ALPM hook up. Closes: https://github.com/archlinuxhardened/selinux/issues/101
Diffstat (limited to 'selinux-alpm-hook')
-rwxr-xr-xselinux-alpm-hook4
1 files changed, 2 insertions, 2 deletions
diff --git a/selinux-alpm-hook b/selinux-alpm-hook
index 9ac5b060753f..dd34b3a85e60 100755
--- a/selinux-alpm-hook
+++ b/selinux-alpm-hook
@@ -28,7 +28,7 @@ while read -r FILE; do
# Only show a warning when a file does not exist as this is not fatal
echo >&2 "Ugh, an installed file does not exist: $FILE"
fi
-done | xargs -0 /usr/bin/restorecon -F || die "Error while relabeling files"
+done | xargs -0 /usr/bin/restorecon -F -T0 || die "Error while relabeling files"
# The install hooks of packages create files which got labelled with the wrong SELinux user
# (e.g. sysadm_u instead of system_u). Relabel all these files too.
@@ -83,6 +83,6 @@ GEN_DIRS=(
for DIR in ${GEN_DIRS[@]}; do
# Only relabel directories which exist
if [ -e "$DIR" ]; then
- /usr/bin/restorecon -RF "$DIR" || die "Error while relabeling generated directories"
+ /usr/bin/restorecon -RF -T0 "$DIR" || die "Error while relabeling generated directories"
fi
done