From 2bc901ed2c56da435d7fa60545e562c14331023a Mon Sep 17 00:00:00 2001 From: Itxaka Date: Wed, 19 Jun 2024 16:45:33 +0200 Subject: [PATCH] Fix wrong arg used (#408) --- pkg/lib/lock.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/lib/lock.go b/pkg/lib/lock.go index 81f87762..2ee38183 100644 --- a/pkg/lib/lock.go +++ b/pkg/lib/lock.go @@ -150,7 +150,7 @@ func LuksifyMeasurements(label string, publicKeyPcrs []string, pcrs []string, lo fmt.Sprintf("--tpm2-pcrs=%s", strings.Join(pcrs, "+")), "--tpm2-signature=/run/systemd/tpm2-pcr-signature.json", "--tpm2-device-key=/run/systemd/tpm2-srk-public-key.tpm2b_public", - part} + device} logger.Debug().Str("args", strings.Join(args, " ")).Msg("running command") cmd := exec.Command("systemd-cryptenroll", args...) cmd.Env = append(cmd.Env, fmt.Sprintf("PASSWORD=%s", pass), "SYSTEMD_LOG_LEVEL=debug") // cannot pass it via stdin @@ -166,6 +166,8 @@ func LuksifyMeasurements(label string, publicKeyPcrs []string, pcrs []string, lo return err } + logger.Debug().Str("output", stdOut.String()).Msg("debug from cryptenroll") + err = formatLuks(device, b.Name, mapper, label, pass, logger) if err != nil { logger.Err(err).Msg("format luks")