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
Created attachment 707228 [details] File: backtrace
Created attachment 707229 [details] File: core_backtrace
Created attachment 707230 [details] File: dso_list
Created attachment 707231 [details] File: environ
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
So this was never a bug? PASSWD_CRONTAB = _selinux.PASSWD_CRONTAB Is what I see?