Fix reseting the policy root in matchpathcon

This commit is contained in:
Dan Walsh 2013-03-19 21:38:02 -04:00
parent cc9c7ddcf7
commit 58f9722469
2 changed files with 6 additions and 3 deletions

View File

@ -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;

View File

@ -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@redhat.com> - 2.1.13-10
- Fix reseting the policy root in matchpathcon
* Wed Mar 6 2013 Dan Walsh <dwalsh@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