mirror of
https://github.com/systemd/systemd.git
synced 2026-08-11 17:45:59 +00:00
creds-util: log when we remove a secret from a different machine
(cherry picked from commit 0168b13fb3)
This commit is contained in:
committed by
Luca Boccassi
parent
050ff0d62b
commit
bcabc25eb6
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user