creds: Use ERRNO_IS_NEG_TPM2_UNSEAL_BAD_PCR

The error set was duplicated, use the macro.
This commit is contained in:
Kai Lüke
2026-07-10 08:07:47 +02:00
committed by Kai Lüke
parent e2b89bc3d5
commit 70cd612797
+1 -1
View File
@@ -1411,7 +1411,7 @@ static int vl_method_decrypt(sd_varlink *link, sd_json_variant *parameters, sd_v
ask_polkit = true;
}
if (IN_SET(r, -EREMCHG, -ENOANO, -EUCLEAN, -EPERM))
if (ERRNO_IS_NEG_TPM2_UNSEAL_BAD_PCR(r))
return sd_varlink_error(link, "io.systemd.Credentials.UnexpectedPCRState", NULL);
if (r < 0) {
const CredentialsVarlinkError *e = credentials_varlink_error_by_errno(r);