From: Daan De Meyer Date: Wed, 31 Jul 2024 13:01:40 +0000 (+0200) Subject: exec-credential: Log if we skip duplicate credential X-Git-Tag: v257-rc1~789^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=590348e2bf8415053487324d47d0083b49dfdeb0;p=thirdparty%2Fsystemd.git exec-credential: Log if we skip duplicate credential --- diff --git a/src/core/exec-credential.c b/src/core/exec-credential.c index 8731d74666b..a70cf23eaaa 100644 --- a/src/core/exec-credential.c +++ b/src/core/exec-credential.c @@ -779,8 +779,10 @@ static int acquire_credentials( * EEXIST if the credential already exists. That's because the TPM2-based decryption is kinda * slow and involved, hence it's nice to be able to skip that if the credential already * exists anyway. */ - if (faccessat(dfd, sc->id, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) + if (faccessat(dfd, sc->id, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) { + log_debug("Skipping credential with duplicated ID %s", sc->id); continue; + } if (errno != ENOENT) return log_debug_errno(errno, "Failed to test if credential %s exists: %m", sc->id);