Skip to content

Commit 4f6d317

Browse files
committed
tests/kola: Add lockdown LSM test
See: https://bugzilla.redhat.com/show_bug.cgi?id=2333706
1 parent f78f2a9 commit 4f6d317

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/kola/security/lockdown

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
## kola:
3+
## exclusive: false
4+
## description: Verify that the lockdown LSM is set to integrity.
5+
#
6+
# See https://bugzilla.redhat.com/show_bug.cgi?id=2333706
7+
8+
set -xeuo pipefail
9+
10+
. $KOLA_EXT_DATA/commonlib.sh
11+
12+
if [[ "$(mokutil --sb)" != "SecureBoot enabled" ]]; then
13+
# To be confirmed
14+
ok "not checking systems without Secure Boot enabled"
15+
exit 0
16+
fi
17+
if [[ "$(cat "/sys/kernel/security/lockdown")" == "none [integrity] confidentiality" ]]; then
18+
ok "lockdown LSM set to integrity"
19+
else
20+
fatal "lockdown LSM not set to integrity"
21+
fi

0 commit comments

Comments
 (0)