Bug 217369

Summary: checkmodule 'syntax error' when given module name with a dash (from audit2allow)
Product: [Fedora] Fedora Reporter: Will Woods <wwoods>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: dwalsh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-21 15:42:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Will Woods 2006-11-27 15:36:25 UTC
[root@metroid local]# rpm -qf $(which audit2allow)
policycoreutils-1.33.2-2.fc6

[root@metroid local]# grep nethack /var/log/audit/audit.log | tail -n1  |
audit2allow -M nethack-prelink
Generating type enforcment file: nethack-prelink.te
Compiling policy
checkmodule -M -m -o nethack-prelink.mod nethack-prelink.te
/usr/bin/audit2allow: (unknown source)::ERROR 'syntax error' at token
'nethack-prelink' on line 1:


checkmodule:  error(s) encountered while parsing configuration
checkmodule:  loading policy configuration from nethack-prelink.te

Using "nethack_prelink" instead works fine.

A more useful error message for checkmodule would suggest using a different
filename. Also, audit2allow should probably refuse to create a module with a
dash in the name.

Comment 1 Daniel Walsh 2006-11-27 18:41:32 UTC
I have changed audit2allow to generate an error on an invalid module name.

Fixed in policycoreutils-1.33.4-2.fc6