Bug 782634

Summary: audit2allow crashes with errors
Product: [Fedora] Fedora Reporter: Randy Berry <randyn3lrx>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-24 20:54:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Randy Berry 2012-01-18 01:09:34 UTC
Description of problem:
Audit2allow crashes with errors when executed and no problems found.

Version-Release number of selected component (if applicable):


How reproducible:
ausearch -m avc -ts recent |audit2allow -M mypol

Happens every time.

  
Actual results:
ausearch -m avc -ts recent |audit2allow -M mypol
<no matches>
compilation failed:
mypol.te:6:ERROR 'syntax error' at token '' on line 6:


/usr/bin/checkmodule:  error(s) encountered while parsing configuration
/usr/bin/checkmodule:  loading policy configuration from mypol.te


Expected results:
If no problems are found audit2allow should exit cleanly.

Comment 1 Randy Berry 2012-01-18 01:13:55 UTC
(In reply to comment #0)
> Description of problem:
> Audit2allow crashes with errors when executed and no problems found.
> 
> Version-Release number of selected component (if applicable):
> 
policycoreutils-python-2.1.4-13.fc16.i686
> 
> How reproducible:
> ausearch -m avc -ts recent |audit2allow -M mypol
> 
> Happens every time.
> 
> 
> Actual results:
> ausearch -m avc -ts recent |audit2allow -M mypol
> <no matches>
> compilation failed:
> mypol.te:6:ERROR 'syntax error' at token '' on line 6:
> 
> 
> /usr/bin/checkmodule:  error(s) encountered while parsing configuration
> /usr/bin/checkmodule:  loading policy configuration from mypol.te
> 
> 
> Expected results:
> If no problems are found audit2allow should exit cleanly.

Forgot version.

Comment 2 Miroslav Grepl 2012-01-18 12:15:50 UTC
Yes, you are right. This doesn't work. Also for example

$ echo "" |audit2allow -M test

I think we should exit in these cases.

Dan,
I sent you a patch for this.

Comment 3 Miroslav Grepl 2012-01-19 08:47:49 UTC
Fixed in policycoreutils-2.1.4-15.fc16

Comment 4 Randy Berry 2012-05-24 20:54:13 UTC
This bug has long since been fixed. Closing.