mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-06 04:42:58 +00:00
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:
parent
c00affcc3e
commit
a0af38a531
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user