-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7dHPUACgkQrlYvE4MpobOR9QCfbZgluxTmvTWJs1HlTjlWkgSF eowAnRFtYuqO20XxzqKeT/IKyx15Lo5J =BGUB -----END PGP SIGNATURE-----
>From 11474a478fb9232d457ed0c7479d18166ec19535 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Wed, 16 Nov 2011 11:23:35 -0500 Subject: [PATCH 32/48] sepolgen: Allow ~ as a file identifier We already allow this in policy, so allow it in sepolgen as well. Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- sepolgen/src/sepolgen/refparser.py | 2 +- sepolgen/src/sepolgen/yacc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sepolgen/src/sepolgen/refparser.py b/sepolgen/src/sepolgen/refparser.py index 955784d..9a79340 100644 --- a/sepolgen/src/sepolgen/refparser.py +++ b/sepolgen/src/sepolgen/refparser.py @@ -245,7 +245,7 @@ def t_refpolicywarn(t): t.lexer.lineno += 1 def t_IDENTIFIER(t): - r'[a-zA-Z_\$\"][a-zA-Z0-9_\-\.\$\*\"]*' + r'[a-zA-Z_\$\"][a-zA-Z0-9_\-\.\$\*\"~]*' # Handle any keywords t.type = reserved.get(t.value,'IDENTIFIER') return t diff --git a/sepolgen/src/sepolgen/yacc.py b/sepolgen/src/sepolgen/yacc.py index 58332de..2f3c09d 100644 --- a/sepolgen/src/sepolgen/yacc.py +++ b/sepolgen/src/sepolgen/yacc.py @@ -594,7 +594,7 @@ class MiniProduction: pass # regex matching identifiers -_is_identifier = re.compile(r'^[a-zA-Z0-9_-]+$') +_is_identifier = re.compile(r'^[a-zA-Z0-9_-~]+$') # ----------------------------------------------------------------------------- # add_production() -- 1.7.7.4