Skip to content

Commit

Permalink
Fix wrong arg used (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Jun 19, 2024
1 parent 1477b07 commit 2bc901e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/lib/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down

0 comments on commit 2bc901e

Please sign in to comment.