Bug 112670 - is_selinux_enabled() has changed in fedora to return -1 on error. This currently leads to problems.
is_selinux_enabled() has changed in fedora to return -1 on error. This curren...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-27 07:30 EST by Arkadiusz Miskiewicz
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-11 09:11:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Arkadiusz Miskiewicz 2003-12-27 07:30:24 EST
is_selinux_enabled() in original libselinux returns 1 if selinux was 
enabled and 0 is selinux was disabled or checking if it's 
enabled/disabled failed. For example if we don't have /proc mounted 
then original is_selinux_enabled() will return 0.

In fedora erros checking has been added and now if we don't have proc 
is_selinux_enabled() returns -1 which causes serious problems with 
almost every selinux enabled apps in fedora because current 
is_selinux_enabled is:

if (is_selinux_enabled()) {
  do something
}

so in case of error (-1) that part of code will be executed (even if 
in reality we do not have selinux support in our custom kernel).

I should rather submit this for each selinux package which uses 
is_selinux_enabled in way described above but...
Comment 1 Daniel Walsh 2004-02-11 09:11:44 EST
All of these should be fixed now.

Note You need to log in before you can comment on or make changes to this bug.