From ee85ef4ffa9367ff5122b5955039009080659ce0 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 31 Jul 2024 15:01:40 +0200 Subject: [PATCH] exec-credential: Log if we skip duplicate credential (cherry picked from commit 590348e2bf8415053487324d47d0083b49dfdeb0) --- src/core/exec-credential.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/exec-credential.c b/src/core/exec-credential.c index fcb5df8a37..8ed5b8a989 100644 --- a/src/core/exec-credential.c +++ b/src/core/exec-credential.c @@ -715,8 +715,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); -- 2.25.1