]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptenroll: don't return slot 0 when we have no policy to search for
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Aug 2024 10:54:40 +0000 (12:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 30 Aug 2024 12:16:39 +0000 (14:16 +0200)
commit41bcb9308743f021f9635b35100e63106588cab9
tree301495d455ce9a37c4b5d4b6b07aad2610407941
parent549c1a99d469d9d1ec42ddfccba26724dea0d28a
cryptenroll: don't return slot 0 when we have no policy to search for

If the policy hash is empty we shouldn't return "0" from
search_policy_hash(), because that is understood as slot index 0, but
that's unlikely to match the policy.

Hence, return -ENOENT instead, indicating that we can't find a matching
slot.
src/cryptenroll/cryptenroll-tpm2.c