diff --git a/checkpolicy/policy_scan.l b/checkpolicy/policy_scan.l index e767b5f2..143e797a 100644 --- a/checkpolicy/policy_scan.l +++ b/checkpolicy/policy_scan.l @@ -234,7 +234,7 @@ HIGH { return(HIGH); } low | LOW { return(LOW); } "/"({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/sepolgen/src/sepolgen/refparser.py b/sepolgen/src/sepolgen/refparser.py index 9a793402..a4adbd86 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