]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/selinux-util: rework switching of the getenforce() function
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 22 Jun 2021 08:32:30 +0000 (10:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Jun 2021 08:20:29 +0000 (10:20 +0200)
commitc3b8bacd7bdf5ca3fcd5d4df6b3f2987e9e820c9
tree725a585778140609fe2b3d759ac80b73b993c044
parentcd503dbb6b4a6a6d505ce3ba2d449e418e5c415c
shared/selinux-util: rework switching of the getenforce() function

The approach with function pointer was neat, but it gets in the way
when we want to resolve the symbol dynamically: static initialization
is not possible. It also makes the code more complicated than necessary.
In this case, a simple boolean is sufficient.
src/shared/selinux-util.c