OSDN Git Service

selinux: move debug functions into debug configuration
authorChristian Göttsche <cgzones@googlemail.com>
Fri, 28 Jul 2023 15:19:31 +0000 (17:19 +0200)
committerPaul Moore <paul@paul-moore.com>
Fri, 28 Jul 2023 18:09:24 +0000 (14:09 -0400)
commitf01dd5904519574017a4938ffb4424b31ba79cf3
tree687f311a9ca609cabea34daf570bdc90c4edd7d7
parent19c5b015d1b9122393151134879dcfcf0ae6057a
selinux: move debug functions into debug configuration

avtab_hash_eval() and hashtab_stat() are only used in policydb.c when
the configuration SECURITY_SELINUX_DEBUG is enabled.

Move the function definitions under that configuration as well and
provide empty definitions in case SECURITY_SELINUX_DEBUG is disabled, to
avoid using #ifdef in the callers.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/avtab.c
security/selinux/ss/avtab.h
security/selinux/ss/hashtab.c
security/selinux/ss/hashtab.h
security/selinux/ss/policydb.c