Bug 112670 - is_selinux_enabled() has changed in fedora to return -1 on error. This currently leads to problems.
Summary: is_selinux_enabled() has changed in fedora to return -1 on error. This curren...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libselinux
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-27 12:30 UTC by Arkadiusz Miskiewicz
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-02-11 14:11:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Arkadiusz Miskiewicz 2003-12-27 12:30:24 UTC
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 14:11:44 UTC
All of these should be fixed now.


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