Blame SOURCES/0006-restorecon-1082956.patch

a13ffa
From 68ebd4f452f4fe8f290eef6674cdd4687104abe3 Mon Sep 17 00:00:00 2001
a13ffa
From: Dan Walsh <dwalsh@redhat.com>
a13ffa
Date: Thu, 7 Aug 2014 09:08:12 -0400
a13ffa
Subject: [PATCH 5/5] If the user attempts to restorecon the label of a file
a13ffa
 that does not exist, do not report this as an error
a13ffa
a13ffa
---
a13ffa
 policycoreutils/setfiles/restore.c | 3 +++
a13ffa
 1 file changed, 3 insertions(+)
a13ffa
a13ffa
diff --git a/policycoreutils/setfiles/restore.c b/policycoreutils/setfiles/restore.c
a13ffa
index 2a7cfa3..10933e4 100644
a13ffa
--- a/policycoreutils/setfiles/restore.c
a13ffa
+++ b/policycoreutils/setfiles/restore.c
a13ffa
@@ -160,6 +160,9 @@ static int restore(FTSENT *ftsent, int recurse)
a13ffa
 	/* Get the current context of the file. */
a13ffa
 	ret = lgetfilecon_raw(ftsent->fts_accpath, &curcon);
a13ffa
 	if (ret < 0) {
a13ffa
+		if (errno == ENOENT) {
a13ffa
+			goto out;
a13ffa
+		}
a13ffa
 		if (errno == ENODATA) {
a13ffa
 			curcon = NULL;
a13ffa
 		} else {
a13ffa
-- 
a13ffa
2.1.0
a13ffa