From 35f37f091cb45f231668881f894d83aa9bd9eaff Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Aug 06 2010 16:14:38 +0000 Subject: Fixed interpretation of return value from getfilecon(). --- diff --git a/patch-selinux.patch b/patch-selinux.patch index 3c2774f..d88e222 100644 --- a/patch-selinux.patch +++ b/patch-selinux.patch @@ -83,7 +83,7 @@ diff -up patch-2.6/src/patch.c.selinux patch-2.6/src/patch.c + if (! inerrno && incontext) + { + security_context_t outcontext; -+ if (! getfilecon (outname, &outcontext) && ++ if (getfilecon (outname, &outcontext) != -1 && + outcontext && + strcmp(outcontext, incontext) && + setfilecon (outname, incontext) != 0) diff --git a/patch.spec b/patch.spec index d1afe6a..ed6fb9a 100644 --- a/patch.spec +++ b/patch.spec @@ -62,6 +62,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Fri Aug 6 2010 Tim Waugh 2.6.1-3 +- Fixed interpretation of return value from getfilecon(). - Fixed argument type for --get (bug #553624). * Fri Aug 6 2010 Tim Waugh