[libselinux/f19] Fix reseting the policy root in matchpathcon

Daniel J Walsh dwalsh at fedoraproject.org
Wed Mar 20 01:39:49 UTC 2013


commit 4d3d01948c553fdeec0baa25e65eb22779d9a7ec
Author: Dan Walsh <dwalsh at redhat.com>
Date:   Tue Mar 19 21:39:46 2013 -0400

    Fix reseting the policy root in matchpathcon

 libselinux-rhat.patch |    4 ++--
 libselinux.spec       |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch
index 34b06c8..9123aeb 100644
--- a/libselinux-rhat.patch
+++ b/libselinux-rhat.patch
@@ -523,7 +523,7 @@ index 6c5b45a..0a0dd3e 100644
  		return 0;
  	}
 diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c
-index 296f357..0040524 100644
+index 296f357..9aee32f 100644
 --- a/libselinux/src/selinux_config.c
 +++ b/libselinux/src/selinux_config.c
 @@ -8,6 +8,8 @@
@@ -556,7 +556,7 @@ index 296f357..0040524 100644
 +int selinux_set_policy_root(const char *path)
 +{
 +	int i;
-+	char *policy_type = strchr(selinux_policyroot, '/');
++	char *policy_type = strrchr(path, '/');
 +	if (!policy_type) {
 +		errno = EINVAL;
 +		return -1;
diff --git a/libselinux.spec b/libselinux.spec
index bf190bd..ce1f641 100644
--- a/libselinux.spec
+++ b/libselinux.spec
@@ -10,7 +10,7 @@
 Summary: SELinux library and simple utilities
 Name: libselinux
 Version: 2.1.13
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: Public Domain
 Group: System Environment/Libraries
 Source: %{name}-%{version}.tgz
@@ -241,6 +241,9 @@ rm -rf %{buildroot}
 %{ruby_sitearch}/selinux.so
 
 %changelog
+* Tue Mar 19 2013 Dan Walsh <dwalsh at redhat.com> - 2.1.13-10
+- Fix reseting the policy root in matchpathcon
+
 * Wed Mar 6 2013 Dan Walsh <dwalsh at redhat.com> - 2.1.13-9
 - Cleanup setfcontext_compile atomic patch
 - Add matchpathcon -P /etc/selinux/mls support by allowing users to set alternate root


More information about the scm-commits mailing list