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