]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
exec-credential: Log if we skip duplicate credential
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 31 Jul 2024 13:01:40 +0000 (15:01 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 31 Jul 2024 13:23:45 +0000 (15:23 +0200)
src/core/exec-credential.c

index 8731d74666b9156e256e3acbfc6e22d86105d8e0..a70cf23eaaa14db0d4d1990d6035ea4c03792d64 100644 (file)
@@ -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);