mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 01:20:53 +00:00
pcrlock: skip make-policy tests if environment lacks TPM support
make-policy needs to write into an NVindex. For that we need an actual TPM. Co-authored-by: Akarithos <277667353+Akarithos@users.noreply.github.com>
This commit is contained in:
@@ -117,10 +117,12 @@ if [[ -n "$SD_STUB" ]]; then
|
||||
[[ "$uki_stdin" == "$uki_pipe" ]]
|
||||
fi
|
||||
|
||||
PIN=huhu "$SD_PCRLOCK" make-policy --pcr="$PCRS" --recovery-pin=query
|
||||
# Repeat immediately (this call will have to reuse the nvindex, rather than create it)
|
||||
"$SD_PCRLOCK" make-policy --pcr="$PCRS"
|
||||
"$SD_PCRLOCK" make-policy --pcr="$PCRS" --force
|
||||
if "$SD_PCRLOCK" is-supported; then
|
||||
PIN=huhu "$SD_PCRLOCK" make-policy --pcr="$PCRS" --recovery-pin=query
|
||||
# Repeat immediately (this call will have to reuse the nvindex, rather than create it)
|
||||
"$SD_PCRLOCK" make-policy --pcr="$PCRS"
|
||||
"$SD_PCRLOCK" make-policy --pcr="$PCRS" --force
|
||||
fi
|
||||
|
||||
img="/tmp/pcrlock.img"
|
||||
truncate -s 20M "$img"
|
||||
|
||||
Reference in New Issue
Block a user