[libselinux] Only call dups check within selabel/matchpathcon if you are validating the context This seems to spe
Daniel J Walsh
dwalsh at fedoraproject.org
Mon Jun 13 15:29:27 UTC 2011
commit 076f35f59b2e19fd5cee4c7b6c0d369e30228586
Author: Dan Walsh <dwalsh at redhat.com>
Date: Mon Jun 13 11:29:06 2011 -0400
Only call dups check within selabel/matchpathcon if you are validating the
context
This seems to speed the loading of labels by 4 times.
libselinux-rhat.patch | 13 +++++++++++++
libselinux.spec | 7 ++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch
index 52ceb43..c4a846e 100644
--- a/libselinux-rhat.patch
+++ b/libselinux-rhat.patch
@@ -361,6 +361,19 @@ index a948920..dd03559 100644
out:
free(buf);
+diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
+index 937e509..112af1f 100644
+--- a/libselinux/src/label_file.c
++++ b/libselinux/src/label_file.c
+@@ -473,7 +473,7 @@ static int init(struct selabel_handle *rec, struct selinux_opt *opts,
+ pass, ++lineno) != 0)
+ goto finish;
+ }
+- if (pass == 1) {
++ if (pass == 1 && rec->validating) {
+ status = nodups_specs(data, path);
+ if (status)
+ goto finish;
diff --git a/libselinux/src/load_policy.c b/libselinux/src/load_policy.c
index 83d2143..0961912 100644
--- a/libselinux/src/load_policy.c
diff --git a/libselinux.spec b/libselinux.spec
index 65df21a..d8e82a2 100644
--- a/libselinux.spec
+++ b/libselinux.spec
@@ -7,7 +7,7 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.0.102
-Release: 5%{?dist}
+Release: 6%{?dist}
License: Public Domain
Group: System Environment/Libraries
Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz
@@ -237,6 +237,11 @@ exit 0
%{ruby_sitearch}/selinux.so
%changelog
+* Mon Jun 13 2011 Dan Walsh <dwalsh at redhat.com> - 2.0.102-6
+- Only call dups check within selabel/matchpathcon if you are validating the
+context
+- This seems to speed the loading of labels by 4 times.
+
* Fri Apr 29 2011 Dan Walsh <dwalsh at redhat.com> - 2.0.102-5
- Move /selinux to /sys/fs/selinux
- Add selinuxexeccon
More information about the scm-commits
mailing list