mirror of
https://github.com/systemd/systemd.git
synced 2025-03-09 12:58:26 +03:00
test: add brief test for prclock varlink interfaces and varlinkctl --collect
This commit is contained in:
parent
24835e9933
commit
d02018afdb
@ -156,4 +156,20 @@ SYSTEMD_XBOOTLDR_PATH=/tmp/fakexbootldr SYSTEMD_RELAX_XBOOTLDR_CHECKS=1 "$SD_PCR
|
||||
(! "$SD_PCRLOCK" lock-uki /bin/true)
|
||||
(! "$SD_PCRLOCK" lock-file-system "")
|
||||
|
||||
# Excercise Varlink API a bit (but first turn off condition)
|
||||
|
||||
mkdir -p /run/systemd/system/systemd-pcrlock.socket.d
|
||||
cat > /run/systemd/system/systemd-pcrlock.socket.d/50-no-condition.conf <<EOF
|
||||
[Unit]
|
||||
# Turn off all conditions
|
||||
ConditionSecurity=
|
||||
EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart systemd-pcrlock.socket
|
||||
|
||||
varlinkctl call /run/systemd/io.systemd.PCRLock io.systemd.PCRLock.RemovePolicy '{}'
|
||||
varlinkctl call /run/systemd/io.systemd.PCRLock io.systemd.PCRLock.MakePolicy '{}'
|
||||
varlinkctl call --collect --json=pretty /run/systemd/io.systemd.PCRLock io.systemd.PCRLock.ReadEventLog '{}'
|
||||
|
||||
rm "$img" /tmp/pcrlockpwd
|
||||
|
Loading…
x
Reference in New Issue
Block a user