]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
install: suppress "Operation not supported" false alarms
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Nov 2020 09:48:15 +0000 (01:48 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Nov 2020 09:48:45 +0000 (01:48 -0800)
At least, I *think* they are false alarms.  An SELinux expert eye
would be welcome.
* src/install.c (setdefaultfilecon): If selabel_lookup fails
due to either ENOTSUP or ENODATA, don’t diagnose the issue.
Problem reported by Kamil Dudka in:
https://lists.gnu.org/r/coreutils/2020-11/msg00050.html

src/install.c

index eb6e403e790debae5e5e0533c3cbc8114e0e8a8b..dce29dbe1f8f86c29c4c402f70f1e62a0b5abf6f 100644 (file)
@@ -339,7 +339,7 @@ setdefaultfilecon (char const *file)
     return;
   if (selabel_lookup (hnd, &scontext, file, st.st_mode) != 0)
     {
-      if (errno != ENOENT)
+      if (errno != ENOENT && ! ignorable_ctx_err (errno))
         error (0, errno, _("warning: %s: context lookup failed"),
                quotef (file));
       return;