File foo.patch of Package libselinux
commit 639e613db574fd6315cf338d453899897426db1e
Author: Johannes Segitz <jsegitz@suse.de>
Date: Fri Jan 9 10:07:12 2026 +0100
foo
diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
index 7ef2d45d..3bafb1fc 100644
--- libselinux/src/selinux_restorecon.c.orig
+++ libselinux/src/selinux_restorecon.c
@@ -768,10 +768,14 @@ out1:
freecon(newcon);
return rc;
err:
- selinux_log(SELINUX_ERROR,
- "Could not set context for %s: %m\n",
- pathname);
- rc = -1;
+ if (flags->ignore_noent && errno == ENOENT) {
+ rc = 0;
+ } else {
+ selinux_log(SELINUX_ERROR,
+ "Could not set context for %s: %m\n",
+ pathname);
+ rc = -1;
+ }
goto out1;
}