[libselinux] Handle substitutions for /
Daniel J Walsh
dwalsh at fedoraproject.org
Wed Apr 17 22:07:54 UTC 2013
commit def21535587332000efc0d2b66b589f0296bdbdd
Author: Dan Walsh <dwalsh at redhat.com>
Date: Wed Apr 17 18:07:46 2013 -0400
Handle substitutions for /
- semanage fcontext -a -e / /opt/rh/devtoolset-2/root
libselinux-rhat.patch | 14 ++++++++++++++
libselinux.spec | 6 +++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch
index 5042570..6907a8f 100644
--- a/libselinux-rhat.patch
+++ b/libselinux-rhat.patch
@@ -652,6 +652,20 @@ index b9e8002..355730a 100644
}
hidden_def(get_ordered_context_list)
+diff --git a/libselinux/src/label.c b/libselinux/src/label.c
+index 11f6e96..9bf79c5 100644
+--- a/libselinux/src/label.c
++++ b/libselinux/src/label.c
+@@ -48,6 +48,9 @@ static char *selabel_sub(struct selabel_sub *ptr, const char *src)
+ if (strncmp(src, ptr->src, ptr->slen) == 0 ) {
+ if (src[ptr->slen] == '/' ||
+ src[ptr->slen] == 0) {
++ if ((src[ptr->slen] == '/') &&
++ (strcmp(ptr->dst, "/") == 0))
++ ptr->slen++;
+ if (asprintf(&dst, "%s%s", ptr->dst, &src[ptr->slen]) < 0)
+ return NULL;
+ return dst;
diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
index 5f697f3..9b0d6b0 100644
--- a/libselinux/src/label_file.c
diff --git a/libselinux.spec b/libselinux.spec
index 4a78de5..4d31a4a 100644
--- a/libselinux.spec
+++ b/libselinux.spec
@@ -10,7 +10,7 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.1.13
-Release: 13%{?dist}
+Release: 14%{?dist}
License: Public Domain
Group: System Environment/Libraries
Source: %{name}-%{version}.tgz
@@ -241,6 +241,10 @@ rm -rf %{buildroot}
%{ruby_sitearch}/selinux.so
%changelog
+* Wed Apr 17 2013 Dan Walsh <dwalsh at redhat.com> - 2.1.13-14
+- Handle substitutions for /
+- semanage fcontext -a -e / /opt/rh/devtoolset-2/root
+
* Tue Apr 9 2013 Dan Walsh <dwalsh at redhat.com> - 2.1.13-13
- Add Eric Paris patch to fix procattr calls after a fork.
More information about the scm-commits
mailing list