selinux: use separate table for initial SID lookup
authorOndrej Mosnacek <omosnace@redhat.com>
Fri, 30 Nov 2018 15:24:07 +0000 (16:24 +0100)
committerPaul Moore <paul@paul-moore.com>
Wed, 5 Dec 2018 20:36:12 +0000 (15:36 -0500)
commit24ed7fdae669feda4c5e0dadba2467c4c0d297d3
treea26c76596744dab9c762d6d5915e9dc67b20e906
parent89f5bebcf0401dac470756869587a50dd72ff7b5
selinux: use separate table for initial SID lookup

This moves handling of initial SIDs into a separate table. Note that the
SIDs stored in the main table are now shifted by SECINITSID_NUM and
converted to/from the actual SIDs transparently by helper functions.

This change doesn't make much sense on its own, but it simplifies
further sidtab overhaul in a succeeding patch.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Reviewed-by: Stephen Smalley <sds@tycho.nsa.gov>
[PM: fixed some checkpatch warnings on line length, whitespace]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/policydb.c
security/selinux/ss/services.c
security/selinux/ss/services.h
security/selinux/ss/sidtab.c
security/selinux/ss/sidtab.h