import coreutils-8.30-6.el8_1.1

This commit is contained in:
CentOS Sources 2020-04-07 05:15:24 -04:00 committed by Andrew Lukoshko
parent 65b8ce6c2d
commit d1439a42d8
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,42 @@
From 5d6c2c9b3869938592025ce169659f0c7e9970fc Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 2 Dec 2019 14:02:02 +0100
Subject: [PATCH] chcon: do not validate security context if SELinux is
disabled
* src/chcon.c (main): Skip call of security_check_context()
in case SELinux is disabled to avoid unnecessary failure.
Bug: https://bugzilla.redhat.com/1777831
Upstream-commit: 5118a2e392c8cffb3c26eaffbb75e2b1ef7607f9
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
src/chcon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/chcon.c b/src/chcon.c
index 6414406..eea4235 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <getopt.h>
+#include <selinux/selinux.h>
#include "system.h"
#include "dev-ino.h"
@@ -557,7 +558,8 @@ main (int argc, char **argv)
else
{
specified_context = argv[optind++];
- if (security_check_context (se_const (specified_context)) < 0)
+ if (0 < is_selinux_enabled ()
+ && security_check_context (se_const (specified_context)) < 0)
die (EXIT_FAILURE, errno, _("invalid context: %s"),
quote (specified_context));
}
--
2.21.1

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils Name: coreutils
Version: 8.30 Version: 8.30
Release: 6%{?dist} Release: 6%{?dist}.1
License: GPLv3+ License: GPLv3+
Group: System Environment/Base Group: System Environment/Base
Url: https://www.gnu.org/software/coreutils/ Url: https://www.gnu.org/software/coreutils/
@ -26,6 +26,9 @@ Patch3: coreutils-8.30-fsync-fallback.patch
# cp --preserve=xattr: preserve NFSv4 ACL extended attributes (#1646985) # cp --preserve=xattr: preserve NFSv4 ACL extended attributes (#1646985)
Patch4: coreutils-8.30-cp-preserve-xattr-NFSv4-ACL.patch Patch4: coreutils-8.30-cp-preserve-xattr-NFSv4-ACL.patch
# chcon: do not validate security context if SELinux is disabled (#1777831)
Patch5: coreutils-8.30-chcon-invalid-context.patch
# disable the test-lock gnulib test prone to deadlock # disable the test-lock gnulib test prone to deadlock
Patch100: coreutils-8.26-test-lock.patch Patch100: coreutils-8.26-test-lock.patch
@ -261,6 +264,9 @@ fi
%license COPYING %license COPYING
%changelog %changelog
* Wed Jan 29 2020 Kamil Dudka <kdudka@redhat.com> - 8.30-6.el8_1.1
- chcon: do not validate security context if SELinux is disabled (#1777831)
* Fri Jan 11 2019 Kamil Dudka <kdudka@redhat.com> - 8.30-6 * Fri Jan 11 2019 Kamil Dudka <kdudka@redhat.com> - 8.30-6
- cp --preserve=xattr: preserve NFSv4 ACL extended attributes (#1646985) - cp --preserve=xattr: preserve NFSv4 ACL extended attributes (#1646985)