Merge commit '99813aab598de70ab744fe5b7478db92425c9d33' into f20

Conflicts:
	libselinux-rhat.patch
	libselinux.spec
This commit is contained in:
Adam Williamson 2013-12-27 11:51:27 -08:00
commit eb4be25feb
2 changed files with 23 additions and 1 deletions

View File

@ -520,6 +520,25 @@ index e419f1a..fdeca93 100644
/* Runtime disable of SELinux. */
rc = security_disable();
if (rc == 0) {
diff --git a/libselinux/src/lsetfilecon.c b/libselinux/src/lsetfilecon.c
index fd9bb26..932fc62 100644
--- a/libselinux/src/lsetfilecon.c
+++ b/libselinux/src/lsetfilecon.c
@@ -9,7 +9,13 @@
int lsetfilecon_raw(const char *path, const security_context_t context)
{
- int rc = lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1,
+ int rc;
+ if (! context) {
+ errno=EINVAL;
+ return -1;
+ }
+
+ rc = lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1,
0);
if (rc < 0 && errno == ENOTSUP) {
security_context_t ccontext = NULL;
diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c
index 2d7369e..2a00807 100644
--- a/libselinux/src/matchpathcon.c

View File

@ -10,7 +10,7 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.2.1
Release: 4%{?dist}
Release: 5%{?dist}
License: Public Domain
Group: System Environment/Libraries
Source: %{name}-%{version}.tgz
@ -243,6 +243,9 @@ rm -rf %{buildroot}
%{ruby_sitearch}/selinux.so
%changelog
* Mon Dec 23 2013 Dan Walsh <dwalsh@redhat.com> - 2.2.1-5
- Verify context is not null when passed into lsetfilecon_raw
* Wed Dec 18 2013 Dan Walsh <dwalsh@redhat.com> - 2.2.1-4
- Mv selinux.go to /usr/share/gocode/src/selinux