Add "-" ass a file type

This commit is contained in:
Dan Walsh 2011-04-15 14:10:50 -04:00
parent 66140a0889
commit f530d30afa
2 changed files with 9 additions and 5 deletions

View File

@ -335,18 +335,19 @@ index 8c29e2b..8274d36 100644
;
avrules_block : avrule_decls avrule_user_defs
diff --git a/checkpolicy/policy_scan.l b/checkpolicy/policy_scan.l
index 48128a8..427c189 100644
index 48128a8..1331c04 100644
--- a/checkpolicy/policy_scan.l
+++ b/checkpolicy/policy_scan.l
@@ -218,9 +218,12 @@ PERMISSIVE { return(PERMISSIVE); }
@@ -218,9 +218,13 @@ PERMISSIVE { return(PERMISSIVE); }
"/"({alnum}|[_\.\-/])* { return(PATH); }
{letter}({alnum}|[_\-])*([\.]?({alnum}|[_\-]))* { return(IDENTIFIER); }
{digit}+|0x{hexval}+ { return(NUMBER); }
+{alnum}* { return(FILENAME); }
+\.({alnum}|[_\.\-])* { return(FILENAME); }
{digit}{1,3}(\.{digit}{1,3}){3} { return(IPV4_ADDR); }
{hexval}{0,4}":"{hexval}{0,4}":"({hexval}|[:.])* { return(IPV6_ADDR); }
{digit}+(\.({alnum}|[_.])*)? { return(VERSION_IDENTIFIER); }
+{alnum}+([_\.]|{alnum})+ { return(FILENAME); }
+{letter}+([-_\.]|{alnum})+ { return(FILENAME); }
+([_\.]){alnum}+ { return(FILENAME); }
#line[ ]1[ ]\"[^\n]*\" { set_source_file(yytext+9); }
#line[ ]{digit}+ { source_lineno = atoi(yytext+6)-1; }

View File

@ -2,7 +2,7 @@
Summary: SELinux policy compiler
Name: checkpolicy
Version: 2.0.24
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
Group: Development/System
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@ -55,7 +55,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_bindir}/sedispol
%changelog
* Tue Apr 29 2011 Dan Walsh <dwalsh@redhat.com> - 2.0.24-1
* Fri Apr 15 2011 Dan Walsh <dwalsh@redhat.com> - 2.0.24-2
- Add "-" ass a file type
* Tue Apr 12 2011 Dan Walsh <dwalsh@redhat.com> - 2.0.24-1
-Update to upstream
* Add new class field in role_transition by Harry Ciao.