65878a
From 5d27397f97e26c9b1e9f01f041c2e68cbfb41eb3 Mon Sep 17 00:00:00 2001
65878a
From: Lukas Nykryn <lnykryn@redhat.com>
65878a
Date: Thu, 9 Jan 2014 18:00:50 +0100
65878a
Subject: [PATCH] tmpfiles: don't allow label_fix to print ENOENT when we want
65878a
 to ignore it
65878a
65878a
---
65878a
 src/tmpfiles/tmpfiles.c | 5 +----
65878a
 1 file changed, 1 insertion(+), 4 deletions(-)
65878a
65878a
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
65878a
index 239e56b..9a397af 100644
65878a
--- a/src/tmpfiles/tmpfiles.c
65878a
+++ b/src/tmpfiles/tmpfiles.c
65878a
@@ -434,8 +434,6 @@ finish:
65878a
 }
65878a
 
65878a
 static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
65878a
-        int r;
65878a
-
65878a
         /* not using i->path directly because it may be a glob */
65878a
         if (i->mode_set)
65878a
                 if (chmod(path, i->mode) < 0) {
65878a
@@ -456,8 +454,7 @@ static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
65878a
                         }
65878a
                 }
65878a
 
65878a
-        r = label_fix(path, false, false);
65878a
-        return r == -ENOENT && ignore_enoent ? 0 : r;
65878a
+        return label_fix(path, ignore_enoent, false);
65878a
 }
65878a
 
65878a
 static int item_set_perms(Item *i, const char *path) {