dcavalca / rpms / systemd

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