File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ ../../data/commonlib.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # # kola:
3
+ # # exclusive: false
4
+ # # architectures: x86_64 aarch64
5
+ # # description: Verify that the lockdown LSM is set to integrity when booted using Secure Boot
6
+ #
7
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=2333706
8
+
9
+ set -xeuo pipefail
10
+
11
+ . $KOLA_EXT_DATA /commonlib.sh
12
+
13
+ lockdown_state=" $( cat " /sys/kernel/security/lockdown" ) "
14
+
15
+ if [[ " $( mokutil --sb) " == " SecureBoot enabled" ]]; then
16
+ if [[ " ${lockdown_state} " == " none [integrity] confidentiality" ]]; then
17
+ ok " lockdown LSM set to integrity on a Secure Boot system"
18
+ else
19
+ fatal " lockdown LSM not set to integrity on a Secure Boot system"
20
+ fi
21
+ else
22
+ if [[ " ${lockdown_state} " == " [none] integrity confidentiality" ]]; then
23
+ ok " lockdown LSM set to non on a non Secure Boot system"
24
+ else
25
+ fatal " lockdown LSM not set to none on a non Secure Boot system"
26
+ fi
27
+ fi
You can’t perform that action at this time.
0 commit comments