mirror of
https://github.com/kairos-io/kcrypt.git
synced 2025-07-16 15:26:01 +00:00
Fix wrong arg used (#408)
This commit is contained in:
parent
1477b07170
commit
2bc901ed2c
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user