selinux: do preprocessor check only in selinux-access.c
authorMichal Sekletár <msekleta@redhat.com>
Fri, 3 Apr 2020 07:13:59 +0000 (09:13 +0200)
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>
Tue, 23 Jun 2020 12:50:50 +0000 (14:50 +0200)
commit7301b170b266225f091e95ff52b3a95ff9776d13
treeb8de0a281af479ef32139468cfbeeaf23428f06d
parent41346615264e01c6ff6118e09cf3ac4b4c71e89d
selinux: do preprocessor check only in selinux-access.c

This has the advantage that mac_selinux_access_check() can be used as a
function in all contexts. For example, parameters passed to it won't be
reported as unused if the "function" call is replaced with 0 on SELinux
disabled builds.

(cherry picked from commit 08deac6e3e9119aeb966375f94695e4aa14ffb1c)

Related: #1830861
src/core/selinux-access.h