Allow ~ in a filename

This commit is contained in:
Dan Walsh 2011-11-14 11:35:35 -05:00
parent 1e7f3c93f0
commit e9ff6dfd95
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,16 @@
diff --git a/checkpolicy/policy_scan.l b/checkpolicy/policy_scan.l
index 5ee27f8..b4b9066 100644
--- a/checkpolicy/policy_scan.l
+++ b/checkpolicy/policy_scan.l
@@ -222,7 +222,7 @@ POLICYCAP { return(POLICYCAP); }
permissive |
PERMISSIVE { return(PERMISSIVE); }
"/"({alnum}|[_\.\-/])* { return(PATH); }
-\"({alnum}|[_\.\-])+\" { return(FILENAME); }
+\"({alnum}|[_\.\-\~])+\" { return(FILENAME); }
{letter}({alnum}|[_\-])*([\.]?({alnum}|[_\-]))* { return(IDENTIFIER); }
{alnum}*{letter}{alnum}* { return(FILESYSTEM); }
{digit}+|0x{hexval}+ { return(NUMBER); }
diff --git a/checkpolicy/test/Makefile b/checkpolicy/test/Makefile
index 65cf901..0731e89 100644
--- a/checkpolicy/test/Makefile

View File

@ -3,7 +3,7 @@
Summary: SELinux policy compiler
Name: checkpolicy
Version: 2.1.6
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
Group: Development/System
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@ -56,6 +56,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_bindir}/sedispol
%changelog
* Mon Nov 14 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.6-2
- Allow ~ in a filename
* Fri Nov 4 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.6-1
- Upgrade to upstream
* Revert "checkpolicy: Redo filename/filesystem syntax to support filename trans rules"