[patch/f12/master] Fixed interpretation of return value from getfilecon().
Tim Waugh
twaugh at fedoraproject.org
Fri Aug 6 16:21:24 UTC 2010
commit 35f37f091cb45f231668881f894d83aa9bd9eaff
Author: Tim Waugh <twaugh at redhat.com>
Date: Fri Aug 6 16:59:40 2010 +0100
Fixed interpretation of return value from getfilecon().
patch-selinux.patch | 2 +-
patch.spec | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
---
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 <twaugh at redhat.com> 2.6.1-3
+- Fixed interpretation of return value from getfilecon().
- Fixed argument type for --get (bug #553624).
* Fri Aug 6 2010 Tim Waugh <twaugh at redhat.com>
More information about the scm-commits
mailing list