ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Blob Blame History Raw
From 3bef88018c93e77d50d3206e84f6fa2fe8c2fb99 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 9 Jan 2014 18:00:50 +0100
Subject: [PATCH] tmpfiles: don't allow label_fix to print ENOENT when we want
 to ignore it

---
 src/tmpfiles/tmpfiles.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 4dd1638..5e49cc8 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -435,8 +435,6 @@ finish:
 }
 
 static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
-        int r;
-
         /* not using i->path directly because it may be a glob */
         if (i->mode_set)
                 if (chmod(path, i->mode) < 0) {
@@ -457,8 +455,7 @@ static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
                         }
                 }
 
-        r = label_fix(path, false, false);
-        return r == -ENOENT && ignore_enoent ? 0 : r;
+        return label_fix(path, ignore_enoent, false);
 }
 
 static int item_set_perms(Item *i, const char *path) {