From 9389e191f19d40ce2ac56b3a8d04e2474e335075 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Apr 29 2009 16:39:13 +0000 Subject: - Fixed operation when SELinux is disabled (bug #498102). Patch from Jan Kratochvil. --- diff --git a/patch-selinux.patch b/patch-selinux.patch index 9fa6969..2f354f9 100644 --- a/patch-selinux.patch +++ b/patch-selinux.patch @@ -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", diff --git a/patch.spec b/patch.spec index 9f0666d..a5e2f1e 100644 --- a/patch.spec +++ b/patch.spec @@ -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 2.5.4-39 +- Fixed operation when SELinux is disabled (bug #498102). Patch from + Jan Kratochvil. + * Thu Feb 26 2009 Fedora Release Engineering - 2.5.4-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild