2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

test: better test for SELinux tools

Previously the check was just if /sys/fs/selinux is mounted. This
extends the check to see if all necessary tools are installed.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2024-07-08 16:50:23 +00:00 committed by Andrei Vagin
parent 615ccf98cf
commit 01c65732b6

View File

@ -2,6 +2,19 @@
test -d /sys/fs/selinux || exit 1
# check if necessary commands are installed
if ! command -v setenforce &>/dev/null; then
exit 1
fi
if ! command -v setsebool &>/dev/null; then
exit 1
fi
if ! command -v getsebool &>/dev/null; then
exit 1
fi
# See selinux00.hook for details
getsebool unconfined_dyntrans_all > /dev/null 2>&1