Bug 1280418

Summary: `cat /var/log/audit/audit.log | audit2allow -R` fails with a "TypeError: must use keyword argument for key function"
Product: [Fedora] Fedora Reporter: Kashyap Chamarthy <kchamart>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dwalsh, mgrepl, plautrba, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: policycoreutils-2.4-17.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-22 02:23:19 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:
Attachments:
Description Flags
Output of `grep AVC /var/log/audit/audit.log` none

Description Kashyap Chamarthy 2015-11-11 17:15:00 UTC
Description of problem
----------------------

`audit2allow -R` seems to be broken on a Fedora 23 system:

    $ cat /var/log/audit/audit.log | audit2allow -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


Version
-------

    $ rpm -q policycoreutils-devel selinux-policy-devel; uname -r
    policycoreutils-devel-2.4-14.fc23.x86_64
    selinux-policy-devel-3.13.1-152.fc23.noarch
    4.2.5-300.fc23.x86_64


How reproducible: Consistently


Steps to Reproduce
------------------

Just run the below command on a Fedora 23 system (with the above 
package version)

    $ cat /var/log/audit/audit.log | audit2allow -R


Actual results
--------------

Refer Description


Expected results
----------------

`audit2allow -R` should successfully generate a reference policy

Comment 1 Kashyap Chamarthy 2015-11-11 17:17:18 UTC
Created attachment 1092805 [details]
Output of `grep AVC  /var/log/audit/audit.log`

Comment 2 Petr Lautrbach 2015-11-18 08:37:20 UTC
*** Bug 1278365 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2015-11-18 16:51:31 UTC
policycoreutils-2.4-17.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update policycoreutils'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-2d1eee0eb5

Comment 4 Fedora Update System 2015-11-22 02:23:12 UTC
policycoreutils-2.4-17.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.