mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
cryptsetup: use TPM flags over bool
This works becuase TPM2_FLAGS_USE_PIN is 1 and bool is a 1 so the bits line up as expected, however if for some reason flags change values and for clarity check if the boolean indicates this flag and pass the flag value. Signed-off-by: William Roberts <william.c.roberts@intel.com>
This commit is contained in:
committed by
Yu Watanabe
parent
57c15ca357
commit
3fab44b2ff
@@ -1461,7 +1461,7 @@ static int attach_luks_or_plain_or_bitlk_by_tpm2(
|
||||
key_file, arg_keyfile_size, arg_keyfile_offset,
|
||||
key_data, key_data_size,
|
||||
/* policy_hash= */ NULL, /* policy_hash_size= */ 0, /* we don't know the policy hash */
|
||||
arg_tpm2_pin,
|
||||
arg_tpm2_pin ? TPM2_FLAGS_USE_PIN : 0,
|
||||
until,
|
||||
arg_headless,
|
||||
arg_ask_password_flags,
|
||||
|
||||
Reference in New Issue
Block a user