Bug 562257 - semanage raises OSError when SELinux is disabled
Summary: semanage raises OSError when SELinux is disabled
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-05 18:54 UTC by Andrew McNabb
Modified: 2010-11-04 19:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-04 19:45:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrew McNabb 2010-02-05 18:54:52 UTC
I wanted to try to not hate SELinux, so I started reading some of the Fedora SELinux docs.  I tried to run "semanage boolean -l", which raised an OSError.  Since SELinux was disabled, I'm not shocked that there was an error, but this error was particularly unhelpful.  Here's the traceback:

Traceback (most recent call last):
  File "/usr/sbin/semanage", line 542, in <module>
    process_args(sys.argv[1:])
  File "/usr/sbin/semanage", line 370, in process_args
    OBJECT.list(heading, locallist, use_file)
  File "/usr/lib/python2.6/site-packages/seobject.py", line 1959, in list
    ddict = self.get_all(locallist)
  File "/usr/lib/python2.6/site-packages/seobject.py", line 1923, in get_all
    value.append(selinux.security_get_boolean_pending(name))
OSError: [Errno 2] No such file or directory

I hope this is helpful.  Thanks.

Comment 1 Daniel Walsh 2010-02-05 20:07:34 UTC
I you want to try out selinux you can run it in permissive mode and it will not block anything.

Fixed in policycoreutils-2.0.78-20.fc13.src.rpm

The library was trying to read /selinux/booleans for the list of booleans and since you are on a disabled machine these files do not exist.

Comment 2 Bug Zapper 2010-11-03 22:56:54 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Andrew McNabb 2010-11-04 19:45:14 UTC
This now gives a much better error message:

% semanage boolean -l
/usr/sbin/semanage: SELinux policy is not managed or store cannot be accessed.
%

So I'll close this bug.


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