Bug 430209 - audit2why /audit2allow -w fails
audit2why /audit2allow -w fails
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
9
i386 Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-25 04:50 EST by Dominick Grift
Modified: 2008-09-09 13:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-09 13:32:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dominick Grift 2008-01-25 04:50:42 EST
Description of problem:
I tried the new audit2why and audit2allow -w functionality in policycoreutils

[root@localhost dgrift]# audit2allow -w -i /var/log/audit/audit.log 
Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 345, in <module>
    app.main()
  File "/usr/bin/audit2allow", line 339, in main
    self.__output()
  File "/usr/bin/audit2allow", line 286, in __output
    return self.__output_audit2why()
  File "/usr/bin/audit2allow", line 230, in __output_audit2why
    raise RuntimeError("Must call policy_init first")
RuntimeError: Must call policy_init first
[root@localhost dgrift]# man audit2allow
[root@localhost dgrift]# audit2why -i /var/log/audit/audit.log 
Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 345, in <module>
    app.main()
  File "/usr/bin/audit2allow", line 339, in main
    self.__output()
  File "/usr/bin/audit2allow", line 286, in __output
    return self.__output_audit2why()
  File "/usr/bin/audit2allow", line 230, in __output_audit2why
    raise RuntimeError("Must call policy_init first")
RuntimeError: Must call policy_init first

Version-Release number of selected component (if applicable):
policycoreutils-2.0.37-1.fc9

How reproducible:
audit2allow -w -i /var/log/audit/audit.log
audit2why -i /var/log/audit/audit.log
  
Actual results:


Expected results:


Additional info:
Comment 1 Daniel Walsh 2008-01-25 10:02:26 EST
That is strange.  Do you have selinux-policy installed and a policy file in
/etc/selinux/targeted/policy/?

Are you running with targeted policy?

Comment 2 Dominick Grift 2008-01-25 10:07:27 EST
[dgrift@localhost ~]$ ls -alZ /etc/selinux/targeted/policy
drwxr-xr-x  root root system_u:object_r:policy_config_t:s0 .
drwxr-xr-x  root root system_u:object_r:selinux_config_t:s0 ..
-rw-------  root root unconfined_u:object_r:policy_config_t:s0 policy.22
[dgrift@localhost ~]$ rpm -qa | grep selinux
libselinux-2.0.49-1.fc9
selinux-policy-targeted-3.2.5-18.fc9
libselinux-python-2.0.49-1.fc9
selinux-policy-3.2.5-18.fc9
selinux-policy-devel-3.2.5-18.fc9

SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 21
Policy from config file:        targeted

that is strange: sestatus reports policy.21, whilst policy.22 is installed in
/etc/selinux/targeted/policy
Comment 3 Bug Zapper 2008-05-14 00:53:07 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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