Fix reseting the policy root in matchpathcon
This commit is contained in:
parent
cc9c7ddcf7
commit
58f9722469
@ -523,7 +523,7 @@ index 6c5b45a..0a0dd3e 100644
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c
|
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
|
--- a/libselinux/src/selinux_config.c
|
||||||
+++ b/libselinux/src/selinux_config.c
|
+++ b/libselinux/src/selinux_config.c
|
||||||
@@ -8,6 +8,8 @@
|
@@ -8,6 +8,8 @@
|
||||||
@ -556,7 +556,7 @@ index 296f357..0040524 100644
|
|||||||
+int selinux_set_policy_root(const char *path)
|
+int selinux_set_policy_root(const char *path)
|
||||||
+{
|
+{
|
||||||
+ int i;
|
+ int i;
|
||||||
+ char *policy_type = strchr(selinux_policyroot, '/');
|
+ char *policy_type = strrchr(path, '/');
|
||||||
+ if (!policy_type) {
|
+ if (!policy_type) {
|
||||||
+ errno = EINVAL;
|
+ errno = EINVAL;
|
||||||
+ return -1;
|
+ return -1;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
Summary: SELinux library and simple utilities
|
Summary: SELinux library and simple utilities
|
||||||
Name: libselinux
|
Name: libselinux
|
||||||
Version: 2.1.13
|
Version: 2.1.13
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: %{name}-%{version}.tgz
|
Source: %{name}-%{version}.tgz
|
||||||
@ -241,6 +241,9 @@ rm -rf %{buildroot}
|
|||||||
%{ruby_sitearch}/selinux.so
|
%{ruby_sitearch}/selinux.so
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Mar 6 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.13-9
|
||||||
- Cleanup setfcontext_compile atomic patch
|
- Cleanup setfcontext_compile atomic patch
|
||||||
- Add matchpathcon -P /etc/selinux/mls support by allowing users to set alternate root
|
- Add matchpathcon -P /etc/selinux/mls support by allowing users to set alternate root
|
||||||
|
Loading…
Reference in New Issue
Block a user