]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
creds-util: log when we remove a secret from a different machine
authorLương Việt Hoàng <tcm4095@gmail.com>
Tue, 7 Jul 2026 06:38:13 +0000 (13:38 +0700)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 8 Jul 2026 13:49:14 +0000 (14:49 +0100)
src/shared/creds-util.c

index e1bf71bc3794c50fab75f0efbe98c03e4e1aa36a..eaee54ee57abc288844cdf18af53b5c6b3318df0 100644 (file)
@@ -610,6 +610,8 @@ int get_credential_host_secret(CredentialSecretFlags flags, struct iovec *ret) {
                 /* Hmm, this secret is from somewhere else. Let's delete the file. Let's first acquire a lock
                  * to ensure we are the only ones accessing the file while we delete it. */
 
+                log_notice("'%s/%s' comes from a different machine ID, deleting.", dirname, filename);
+
                 if (flock(fd, LOCK_EX) < 0)
                         return log_debug_errno(errno,
                                                "Failed to flock %s/%s: %m", dirname, filename);