diff options
author | William Roberts <william.c.roberts@intel.com> | 2022-09-19 20:50:03 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-20 01:05:33 +0200 |
commit | 3fab44b2ff6dc2daf785cf43e2a998e9b43c89ce (patch) | |
tree | f9df16e42df988412abfd80f94952572126c0725 /src/cryptsetup/cryptsetup.c | |
parent | meson: make several tests run sequentially (diff) | |
download | systemd-3fab44b2ff6dc2daf785cf43e2a998e9b43c89ce.tar.xz systemd-3fab44b2ff6dc2daf785cf43e2a998e9b43c89ce.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | src/cryptsetup/cryptsetup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index d6e5833b24..03b85359a5 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -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, |