From eb4be25febbc904d9d6a5156a5022883f9cb1263 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Dec 27 2013 19:51:27 +0000 Subject: Merge commit '99813aab598de70ab744fe5b7478db92425c9d33' into f20 Conflicts: libselinux-rhat.patch libselinux.spec --- diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index bf75861..89dd991 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -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 diff --git a/libselinux.spec b/libselinux.spec index ce9b775..9c86123 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -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 - 2.2.1-5 +- Verify context is not null when passed into lsetfilecon_raw + * Wed Dec 18 2013 Dan Walsh - 2.2.1-4 - Mv selinux.go to /usr/share/gocode/src/selinux