Bug 1278365

Summary: audit2allow -R ends with traceback
Product: [Fedora] Fedora Reporter: Vit Mojzis <vmojzis>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dwalsh, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-18 08:37:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vit Mojzis 2015-11-05 10:45:23 UTC
Description of problem:
audit2allow -R ends with traceback

Version-Release number of selected component (if applicable):
policycoreutils.x86_64                                             2.4-14.fc23
policycoreutils-devel.x86_64                                       2.4-14.fc23
policycoreutils-python-utils.x86_64                                2.4-14.fc23
policycoreutils-python3.x86_64                                     2.4-14.fc23

How reproducible:

Steps to Reproduce:
1. #cat avc
type=AVC msg=audit(1446718500.151:760): avc:  denied  { lock } for  pid=706 comm="systemd-logind" path="/run/utmp" dev="tmpfs" ino=14621 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file permissive=1

2. #audit2allow -i avc -R
Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 363, in <module>
    app.main()
  File "/usr/bin/audit2allow", line 351, in main
    self.__output()
  File "/usr/bin/audit2allow", line 308, in __output
    g.set_gen_refpol(ifs, perm_maps)
  File "/usr/lib64/python3.4/site-packages/sepolgen/policygen.py", line 101, in set_gen_refpol
    self.ifgen = InterfaceGenerator(if_set, perm_maps)
  File "/usr/lib64/python3.4/site-packages/sepolgen/policygen.py", line 353, in __init__
    self.hack_check_ifs(ifs)
  File "/usr/lib64/python3.4/site-packages/sepolgen/policygen.py", line 365, in hack_check_ifs
    params.sort(param_comp)
TypeError: must use keyword argument for key function

Actual results:
Traceback

Expected results:
Policy rule resolving given AVC

Additional info:

Comment 1 Petr Lautrbach 2015-11-18 08:37:20 UTC

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