Drop EEXIST handling in load_credential_glob()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 31 Jul 2024 13:21:17 +0000 (15:21 +0200)
committerLuca Boccassi <bluca@debian.org>
Thu, 15 Aug 2024 13:04:41 +0000 (14:04 +0100)
Credentials are written to a temporary file and renamed to the
destination with renameat() which will replace existing files so
EEXIST should not happen so drop the handling for EEXIST.

(cherry picked from commit 2c2ed3272b992b6eb13864e49847c943e42be00f)

src/core/exec-credential.c

index f4cff57848b3614bfab890d2e4d0a1ee314fcec1..fcb5df8a37b4cf4bf67d218abe874d7bc7a0c786 100644 (file)
@@ -378,8 +378,6 @@ static int load_credential_glob(
                                         ownership_ok,
                                         data, size,
                                         left);
-                        if (r == -EEXIST)
-                                continue;
                         if (r < 0)
                                 return r;
                 }