Bug 1398882 - audit2allow crashes on run
Summary: audit2allow crashes on run
Keywords:
Status: CLOSED DUPLICATE of bug 1358487
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-27 00:32 UTC by bystones92
Modified: 2016-12-02 15:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-02 15:31:25 UTC
Type: ---


Attachments (Terms of Use)

Description bystones92 2016-11-27 00:32:39 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier: 

Trying to run audit2allow results in an error:

[root@nas ~]# audit2allow
Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 25, in <module>
    import sepolgen.audit as audit
  File "/usr/lib64/python3.5/site-packages/sepolgen/audit.py", line 23, in <module>
    from . import refpolicy
  File "/usr/lib64/python3.5/site-packages/sepolgen/refpolicy.py", line 21, in <module>
    import selinux
  File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 1441, in <module>
    selinux_snapperd_contexts_path = _selinux.selinux_snapperd_contexts_path
AttributeError: module '_selinux' has no attribute 'selinux_snapperd_contexts_path'


Reproducible: Always

Steps to Reproduce:
1. Run audit2allow

Actual Results:  
Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 25, in <module>
    import sepolgen.audit as audit
  File "/usr/lib64/python3.5/site-packages/sepolgen/audit.py", line 23, in <module>
    from . import refpolicy
  File "/usr/lib64/python3.5/site-packages/sepolgen/refpolicy.py", line 21, in <module>
    import selinux
  File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 1441, in <module>
    selinux_snapperd_contexts_path = _selinux.selinux_snapperd_contexts_path
AttributeError: module '_selinux' has no attribute 'selinux_snapperd_contexts_path'



Running Fedora Server 24 all packages up to date.

Comment 1 Vit Mojzis 2016-12-02 15:31:25 UTC
So far it seems that the issue is caused by having multiple versions of libselinux-python in your system, or by incomplete dnf transaction.
eg. both: 
    libselinux-python-2.5-9.fc24.x86_64
    libselinux-python-2.5-3.fc24.x86_64

Removing older versions or reinstallining libselinux package (in case only 1 version is present) should fix the issue.

*** This bug has been marked as a duplicate of bug 1358487 ***


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