fix of wrong preserving of security context in install - by
upstream(#319231)
This commit is contained in:
parent
13c6ce058c
commit
40985b1e0d
@ -2224,17 +2224,31 @@
|
|||||||
case_GETOPT_HELP_CHAR;
|
case_GETOPT_HELP_CHAR;
|
||||||
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
|
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
|
||||||
default:
|
default:
|
||||||
@@ -523,6 +613,10 @@
|
@@ -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
|
else
|
||||||
return true;
|
- return true;
|
||||||
|
+ ok = true;
|
||||||
|
+
|
||||||
+#ifdef WITH_SELINUX
|
+#ifdef WITH_SELINUX
|
||||||
+ if (use_default_selinux_context)
|
+ if (use_default_selinux_context)
|
||||||
+ setdefaultfilecon (name);
|
+ setdefaultfilecon (name);
|
||||||
+#endif
|
+#endif
|
||||||
return false;
|
|
||||||
|
- return false;
|
||||||
|
+ return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the timestamps of file TO to match those of file FROM.
|
||||||
@@ -687,6 +781,11 @@
|
@@ -687,6 +781,11 @@
|
||||||
-T, --no-target-directory treat DEST as a normal file\n\
|
-T, --no-target-directory treat DEST as a normal file\n\
|
||||||
-v, --verbose print the name of each directory as it is created\n\
|
-v, --verbose print the name of each directory as it is created\n\
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
|
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
|
||||||
Name: coreutils
|
Name: coreutils
|
||||||
Version: 6.9
|
Version: 6.9
|
||||||
Release: 12%{?dist}
|
Release: 13%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: http://www.gnu.org/software/coreutils/
|
Url: http://www.gnu.org/software/coreutils/
|
||||||
@ -287,6 +287,10 @@ fi
|
|||||||
/sbin/runuser
|
/sbin/runuser
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 13 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-13
|
||||||
|
- fixed bug in selinux patch which caused bad preserving
|
||||||
|
of security context in install(#319231)
|
||||||
|
|
||||||
* Fri Nov 02 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-12
|
* Fri Nov 02 2007 Ondrej Vasik <ovasik@redhat.com> - 6.9-12
|
||||||
- added some upstream supported dircolors TERMs(#239266)
|
- added some upstream supported dircolors TERMs(#239266)
|
||||||
- fixed du output for unaccesible dirs(#250089)
|
- fixed du output for unaccesible dirs(#250089)
|
||||||
|
Loading…
Reference in New Issue
Block a user