aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/policydb.c
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2020-04-17 10:11:57 +0200
committerPaul Moore <paul@paul-moore.com>2020-04-17 16:04:38 -0400
commit225621c9348d2a759db141024d5986d48e8c50dc (patch)
tree6817cce46a05f752ad0ed5dcae4d2493f611c136 /security/selinux/ss/policydb.c
parentselinux: hash context structure directly (diff)
downloadlinux-dev-225621c9348d2a759db141024d5986d48e8c50dc.tar.xz
linux-dev-225621c9348d2a759db141024d5986d48e8c50dc.zip
selinux: move context hashing under sidtab
Now that context hash computation no longer depends on policydb, we can simplify things by moving the context hashing completely under sidtab. The hash is still cached in sidtab entries, but not for the in-flight context structures. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/policydb.c')
-rw-r--r--security/selinux/ss/policydb.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 2849bc362828..dc6729860bd6 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -862,8 +862,6 @@ int policydb_load_isids(struct policydb *p, struct sidtab *s)
if (!name)
continue;
- context_add_hash(&c->context[0]);
-
rc = sidtab_set_initial(s, sid, &c->context[0]);
if (rc) {
pr_err("SELinux: unable to load initial SID %s.\n",