Only call dups check within selabel/matchpathcon if you are validating the
context This seems to speed the loading of labels by 4 times.
This commit is contained in:
parent
2c3aaeae1e
commit
076f35f59b
@ -361,6 +361,19 @@ index a948920..dd03559 100644
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
free(buf);
|
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
|
diff --git a/libselinux/src/load_policy.c b/libselinux/src/load_policy.c
|
||||||
index 83d2143..0961912 100644
|
index 83d2143..0961912 100644
|
||||||
--- a/libselinux/src/load_policy.c
|
--- a/libselinux/src/load_policy.c
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: SELinux library and simple utilities
|
Summary: SELinux library and simple utilities
|
||||||
Name: libselinux
|
Name: libselinux
|
||||||
Version: 2.0.102
|
Version: 2.0.102
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz
|
Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz
|
||||||
@ -237,6 +237,11 @@ exit 0
|
|||||||
%{ruby_sitearch}/selinux.so
|
%{ruby_sitearch}/selinux.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 13 2011 Dan Walsh <dwalsh@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@redhat.com> - 2.0.102-5
|
* Fri Apr 29 2011 Dan Walsh <dwalsh@redhat.com> - 2.0.102-5
|
||||||
- Move /selinux to /sys/fs/selinux
|
- Move /selinux to /sys/fs/selinux
|
||||||
- Add selinuxexeccon
|
- Add selinuxexeccon
|
||||||
|
Loading…
Reference in New Issue
Block a user