- Fixed operation when SELinux is disabled (bug #498102). Patch from Jan

Kratochvil.
This commit is contained in:
Tim Waugh 2009-04-29 16:39:13 +00:00
parent 1d18fb7541
commit 9389e191f1
2 changed files with 7 additions and 3 deletions

View File

@ -81,8 +81,8 @@ diff -up patch-2.5.4/patch.c.selinux patch-2.5.4/patch.c
quotearg (outname));
+ if (! inerrno && incontext) {
+ security_context_t outcontext;
+ getfilecon (outname, &outcontext);
+ if (strcmp(outcontext, incontext) &&
+ if (! getfilecon (outname, &outcontext) && outcontext &&
+ strcmp(outcontext, incontext) &&
+ setfilecon (outname, incontext) != 0) {
+ if (errno != ENOTSUP && errno != EPERM)
+ pfatal ("Can't set security context on file %s",

View File

@ -1,7 +1,7 @@
Summary: Utility for modifying/upgrading files
Name: patch
Version: 2.5.4
Release: 38%{?dist}
Release: 39%{?dist}
License: GPLv2+
URL: http://www.gnu.org/software/patch/patch.html
Group: Development/Tools
@ -68,6 +68,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/*
%changelog
* Wed Apr 29 2009 Tim Waugh <twaugh@redhat.com> 2.5.4-39
- Fixed operation when SELinux is disabled (bug #498102). Patch from
Jan Kratochvil.
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.4-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild