selinux: also try the netlink-based fallback and continue on permission error
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 27 Oct 2020 18:47:26 +0000 (19:47 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 4 Nov 2020 08:49:53 +0000 (09:49 +0100)
commit961b341e8537a69455c130b98b50f51ed011e362
treec15b35269473145bfc10572a317a00366371e2dd
parentae5e9bf46f2abd2cca22dd5836e85bd93dc50193
selinux: also try the netlink-based fallback and continue on permission error

Fedora Rawhide still has the old policy, so selinux prevents our selinux code
from checking if selinux is enabled. But it seems smart to fall back to the old
API anyway.

Follow-up for fd5e402fa9377f2860e02bdb5b84d5f5942e73f4.

Both the reference policy [1] and Fedora selinux policy [2] needed to be
updated, so it's likely that this will impact other distros too.

[1] https://github.com/SELinuxProject/refpolicy/pull/308
[2] https://github.com/fedora-selinux/selinux-policy/pull/464
src/basic/selinux-util.c