From 4d3d01948c553fdeec0baa25e65eb22779d9a7ec Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Mar 20 2013 01:39:46 +0000 Subject: Fix reseting the policy root in matchpathcon --- 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 - 2.1.13-10 +- Fix reseting the policy root in matchpathcon + * Wed Mar 6 2013 Dan Walsh - 2.1.13-9 - Cleanup setfcontext_compile atomic patch - Add matchpathcon -P /etc/selinux/mls support by allowing users to set alternate root