Skip to content

Commit

Permalink
tests/kola: Add lockdown LSM test
Browse files Browse the repository at this point in the history
  • Loading branch information
travier committed Jan 20, 2025
1 parent f78f2a9 commit 4f6d317
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/kola/security/lockdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
## kola:
## exclusive: false
## description: Verify that the lockdown LSM is set to integrity.
#
# See https://bugzilla.redhat.com/show_bug.cgi?id=2333706

set -xeuo pipefail

. $KOLA_EXT_DATA/commonlib.sh

if [[ "$(mokutil --sb)" != "SecureBoot enabled" ]]; then
# To be confirmed
ok "not checking systems without Secure Boot enabled"
exit 0
fi
if [[ "$(cat "/sys/kernel/security/lockdown")" == "none [integrity] confidentiality" ]]; then
ok "lockdown LSM set to integrity"
else
fatal "lockdown LSM not set to integrity"
fi

0 comments on commit 4f6d317

Please sign in to comment.