diff --git a/coreutils-selinux.patch b/coreutils-selinux.patch index baba88a..c221d1e 100644 --- a/coreutils-selinux.patch +++ b/coreutils-selinux.patch @@ -2223,18 +2223,32 @@ +#endif case_GETOPT_HELP_CHAR; case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); - default: -@@ -523,6 +613,10 @@ + default: +@@ -503,6 +591,7 @@ + static bool + change_attributes (char const *name) + { ++ bool ok = false; + /* chown must precede chmod because on some systems, + chown clears the set[ug]id bits for non-superusers, + resulting in incorrect permissions. +@@ -521,9 +610,14 @@ + else if (chmod (name, mode) != 0) + error (0, errno, _("cannot change permissions of %s"), quote (name)); else - return true; - +- return true; ++ ok = true; ++ +#ifdef WITH_SELINUX + if (use_default_selinux_context) -+ setdefaultfilecon(name); ++ setdefaultfilecon (name); +#endif - return false; + +- return false; ++ return ok; } + /* Set the timestamps of file TO to match those of file FROM. @@ -687,6 +781,11 @@ -T, --no-target-directory treat DEST as a normal file\n\ -v, --verbose print the name of each directory as it is created\n\ diff --git a/coreutils.spec b/coreutils.spec index 388f347..dd210de 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: The GNU core utilities: a set of tools commonly used in shell scripts Name: coreutils Version: 6.9 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -287,6 +287,10 @@ fi /sbin/runuser %changelog +* Tue Nov 13 2007 Ondrej Vasik - 6.9-13 +- fixed bug in selinux patch which caused bad preserving + of security context in install(#319231) + * Fri Nov 02 2007 Ondrej Vasik - 6.9-12 - added some upstream supported dircolors TERMs(#239266) - fixed du output for unaccesible dirs(#250089)