Bug 919611 - [abrt] policycoreutils-devel-2.1.13-55.fc18: __init__.py:954:<module>:AttributeError: 'module' object has no attribute 'PASSWD__CRONTAB'
Summary: [abrt] policycoreutils-devel-2.1.13-55.fc18: __init__.py:954:<module>:Attribu...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 18
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:666607b27bd1ca57f8a48323c1b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-08 22:04 UTC by M J
Modified: 2013-03-11 15:04 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-08 23:17:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (22.05 KB, text/plain)
2013-03-08 22:04 UTC, M J
no flags Details
File: core_backtrace (411 bytes, text/plain)
2013-03-08 22:04 UTC, M J
no flags Details
File: dso_list (85 bytes, text/plain)
2013-03-08 22:04 UTC, M J
no flags Details
File: environ (2.09 KB, text/plain)
2013-03-08 22:04 UTC, M J
no flags Details

Description M J 2013-03-08 22:04:02 UTC
Description of problem:
This bug occurred while using audit2allow on the grep'd audit.log file for a permission denial of read access to /dev/sr0 (the cdrom) by a Xen HVM guest.

1. Start an HVM guest that requires an install cd (here Windows 8) on Fedora 18 under Xen / virt-manager.
2. Selinux will deny the given permission.
3. Use: 
> grep removable_device_t /var/log/audit.log | head -1 | audit2allow -R

...and you get the stack trace:

Traceback (most recent call last):
  File "/bin/audit2allow", line 23, in <module>
    import sepolgen.audit as audit
  File "/usr/lib64/python2.7/site-packages/sepolgen/audit.py", line 20, in <module>
    import refpolicy
  File "/usr/lib64/python2.7/site-packages/sepolgen/refpolicy.py", line 22, in <module>
    import selinux
  File "/usr/lib64/python2.7/site-packages/selinux/__init__.py", line 954, in <module>
    PASSWD__CRONTAB = _selinux.PASSWD__CRONTAB
AttributeError: 'module' object has no attribute 'PASSWD__CRONTAB'


Version-Release number of selected component:
policycoreutils-devel-2.1.13-55.fc18

Additional info:
cmdline:        /usr/bin/python -Es /bin/audit2allow -R
executable:     /bin/audit2allow
kernel:         3.8.1-201.fc18.x86_64
uid:            0

Comment 1 M J 2013-03-08 22:04:05 UTC
Created attachment 707228 [details]
File: backtrace

Comment 2 M J 2013-03-08 22:04:06 UTC
Created attachment 707229 [details]
File: core_backtrace

Comment 3 M J 2013-03-08 22:04:08 UTC
Created attachment 707230 [details]
File: dso_list

Comment 4 M J 2013-03-08 22:04:10 UTC
Created attachment 707231 [details]
File: environ

Comment 5 M J 2013-03-08 23:12:38 UTC
A temporary fix: there is a bug in the selinux python wrapper at:
/usr/lib64/python2.7/site-packages/selinux/__init__.py:954

PASSWD_CRONTAB = selinux.PASSWD_CRONTAB

This file is generated by SWiG and it seems the underlying field does not exist. Comment out this line and audit2allow will work properly:

# PASSWD_CRONTAB = selinux.PASSWD_CRONTAB

Comment 6 Daniel Walsh 2013-03-11 15:04:07 UTC
So this was never a bug?

PASSWD_CRONTAB = _selinux.PASSWD_CRONTAB

Is what I see?


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