From: Kai Lüke Date: Mon, 6 Jul 2026 13:58:39 +0000 (+0900) Subject: creds: Use ERRNO_IS_NEG_TPM2_UNSEAL_BAD_PCR X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70cd612797b5bbcf8cee5911fdb5d164412e0a12;p=thirdparty%2Fsystemd.git creds: Use ERRNO_IS_NEG_TPM2_UNSEAL_BAD_PCR The error set was duplicated, use the macro. --- diff --git a/src/creds/creds.c b/src/creds/creds.c index 6dc4ea9277d..9d17e30ac1f 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -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);