mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-19 11:06:53 +00:00
libselinux: selinux_status_open: return 1 in fallback mode
In case of a recurring call to `selinux_status_open(3)`, which
previously has been opened in fallback mode, return `1` according to its
documentation.
Fixes: c5a699046f
("libselinux: make selinux_status_open(3) reentrant")
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
d8b90f8ad1
commit
ed2e4db2f9
@ -283,7 +283,7 @@ int selinux_status_open(int fallback)
|
||||
uint32_t seqno;
|
||||
|
||||
if (selinux_status != NULL) {
|
||||
return 0;
|
||||
return (selinux_status == MAP_FAILED) ? 1 : 0;
|
||||
}
|
||||
|
||||
if (!selinux_mnt) {
|
||||
|
Loading…
Reference in New Issue
Block a user