rpms/coreutils/devel coreutils-selinux.patch, 1.59, 1.60 coreutils.spec, 1.281, 1.282

Ondrej Vasik ovasik at fedoraproject.org
Mon Oct 5 07:06:39 UTC 2009


Author: ovasik

Update of /cvs/extras/rpms/coreutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29497

Modified Files:
	coreutils-selinux.patch coreutils.spec 
Log Message:
chcon no longer aborts on a selinux disabled system(#527142)

coreutils-selinux.patch:
 configure.ac       |    7 ++
 man/chcon.x        |    2 
 man/runcon.x       |    2 
 src/chcon.c        |    6 +
 src/copy.c         |    2 
 src/copy.h         |    3 
 src/cp.c           |   39 ++++++++++++
 src/id.c           |    2 
 src/install.c      |   13 +++-
 src/ls.c           |  161 +++++++++++++++++++++++++++++++++++++++++++----------
 src/mkdir.c        |    1 
 src/mknod.c        |    2 
 src/mv.c           |    1 
 src/runcon.c       |    2 
 src/stat.c         |   85 +++++++++++++++++++--------
 tests/misc/selinux |    2 
 16 files changed, 263 insertions(+), 67 deletions(-)

Index: coreutils-selinux.patch
===================================================================
RCS file: /cvs/extras/rpms/coreutils/devel/coreutils-selinux.patch,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -p -r1.59 -r1.60
--- coreutils-selinux.patch	12 Sep 2009 09:28:49 -0000	1.59
+++ coreutils-selinux.patch	5 Oct 2009 07:06:38 -0000	1.60
@@ -162,6 +162,17 @@ diff -urNp coreutils-7.1-orig/src/chcon.
  With --reference, change the security context of each FILE to that of RFILE.\n\
  \n\
    -h, --no-dereference   affect symbolic links instead of any referenced file\n\
+@@ -519,6 +519,10 @@ main (int argc, char **argv)
+       usage (EXIT_FAILURE);
+     }
+ 
++  if (is_selinux_enabled () != 1)
++    error (EXIT_FAILURE, 0,
++           _("%s may be used only on a SELinux kernel"), program_name);
++
+   if (reference_file)
+     {
+       if (getfilecon (reference_file, &ref_context) < 0)
 diff -urNp coreutils-7.1-orig/src/id.c coreutils-7.1/src/id.c
 --- coreutils-7.1-orig/src/id.c	2009-02-16 15:57:44.000000000 +0100
 +++ coreutils-7.1/src/id.c	2009-02-24 13:47:15.000000000 +0100


Index: coreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/coreutils/devel/coreutils.spec,v
retrieving revision 1.281
retrieving revision 1.282
diff -u -p -r1.281 -r1.282
--- coreutils.spec	2 Oct 2009 15:06:06 -0000	1.281
+++ coreutils.spec	5 Oct 2009 07:06:38 -0000	1.282
@@ -1,7 +1,7 @@
 Summary: A set of basic GNU tools commonly used in shell scripts
 Name:    coreutils
 Version: 7.6
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv3+
 Group:   System Environment/Base
 Url:     http://www.gnu.org/software/coreutils/
@@ -333,6 +333,10 @@ fi
 %{_libdir}/coreutils
 
 %changelog
+* Mon Oct 05 2009 Ondrej Vasik <ovasik at redhat.com> - 7.6-7
+- chcon no longer aborts on a selinux disabled system
+  (#527142)
+
 * Fri Oct 02 2009 Ondrej Vasik <ovasik at redhat.com> - 7.6-6
 - ls -LR exits with status 2, not 0, when it encounters
   a cycle(#525402)




More information about the scm-commits mailing list