File tree 3 files changed +50
-0
lines changed 3 files changed +50
-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
+ # # tags: needs-secureboot
5
+ # # architectures: x86_64 aarch64
6
+ # # description: Verify that the lockdown LSM is set to integrity when booted using Secure Boot
7
+ #
8
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=2333706
9
+
10
+ set -xeuo pipefail
11
+
12
+ . $KOLA_EXT_DATA /commonlib.sh
13
+
14
+ lockdown_state=" $( cat " /sys/kernel/security/lockdown" ) "
15
+
16
+ if [[ " $( mokutil --sb) " == " SecureBoot enabled" ]]; then
17
+ if [[ " ${lockdown_state} " == " none [integrity] confidentiality" ]]; then
18
+ ok " lockdown LSM set to integrity on a Secure Boot system"
19
+ else
20
+ fatal " lockdown LSM not set to integrity on a Secure Boot system"
21
+ fi
22
+ else
23
+ fatal " system is not running with secure boot enabled"
24
+ fi
25
+
26
+ exit 1
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 none on a non Secure Boot system"
18
+ else
19
+ fatal " lockdown LSM not set to none on a non Secure Boot system"
20
+ fi
21
+ else
22
+ fatal " system is running with secure boot enabled"
23
+ fi
You can’t perform that action at this time.
0 commit comments