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@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh 2011-11-16 11:23:35 -05:00 committed by Eric Paris
parent c00affcc3e
commit a0af38a531
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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()