diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2020-07-08 13:24:45 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-07-08 20:21:43 -0400 |
commit | 237389e3015e0f4ceac7cf00c70a59746150561d (patch) | |
tree | 624f2bf3c6c63457c43775ae16c6c656b3b24ae1 /security/selinux/ss/symtab.c | |
parent | 2c3d8dfecedd7f5e24e09730a992b59b1c6f956e (diff) | |
download | linux-237389e3015e0f4ceac7cf00c70a59746150561d.tar.gz linux-237389e3015e0f4ceac7cf00c70a59746150561d.tar.bz2 linux-237389e3015e0f4ceac7cf00c70a59746150561d.zip |
selinux: specialize symtab insert and search functions
This encapsulates symtab a little better and will help with further
refactoring later.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/symtab.c')
-rw-r--r-- | security/selinux/ss/symtab.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c index 92d7a948070e..48f523ef93aa 100644 --- a/security/selinux/ss/symtab.c +++ b/security/selinux/ss/symtab.c @@ -39,3 +39,12 @@ int symtab_init(struct symtab *s, unsigned int size) return hashtab_init(&s->table, symhash, symcmp, size); } +int symtab_insert(struct symtab *s, char *name, void *datum) +{ + return hashtab_insert(&s->table, name, datum); +} + +void *symtab_search(struct symtab *s, const char *name) +{ + return hashtab_search(&s->table, name); +} |