selinux: remove the sidtab context conversion indirect calls
authorPaul Moore <paul@paul-moore.com>
Tue, 8 Nov 2022 18:01:19 +0000 (13:01 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 9 Nov 2022 16:00:49 +0000 (11:00 -0500)
commit048be156491ff1aeb0fe5ff0862644d38cd39015
tree8201a4ebe4bcc2dbdf95eef34761db08e25f3132
parente0d8259355cb846f9cf2e38f6ba3430aecb9ebcc
selinux: remove the sidtab context conversion indirect calls

The sidtab conversion code has support for multiple context
conversion routines through the use of function pointers and
indirect calls.  However, the reality is that all current users rely
on the same conversion routine: convert_context().  This patch does
away with this extra complexity and replaces the indirect calls
with direct function calls; allowing us to remove a layer of
obfuscation and create cleaner, more maintainable code.

Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/services.c
security/selinux/ss/services.h
security/selinux/ss/sidtab.c
security/selinux/ss/sidtab.h