SELinux: put name based create rules in a hashtable
authorEric Paris <eparis@redhat.com>
Thu, 28 Apr 2011 19:11:21 +0000 (15:11 -0400)
committerEric Paris <eparis@redhat.com>
Thu, 28 Apr 2011 19:15:53 +0000 (15:15 -0400)
commit2463c26d50adc282d19317013ba0ff473823ca47
treee92438150bb380c0dc0867b00f1ae89f73646b2a
parent3f058ef7787e1b48720622346de9a5317aeb749a
SELinux: put name based create rules in a hashtable

To shorten the list we need to run if filename trans rules exist for the type
of the given parent directory I put them in a hashtable.  Given the policy we
are expecting to use in Fedora this takes the worst case list run from about
5,000 entries to 17.

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
security/selinux/ss/policydb.c
security/selinux/ss/policydb.h
security/selinux/ss/services.c