diff --git a/src/parse.y b/src/parse.y index 03b7c56..62b85be 100644 --- a/src/parse.y +++ b/src/parse.y @@ -188,6 +188,7 @@ %type arg_list_item %type arg %type args +%type arg_m4_quoted %type mls_range %type mls_level %type mls_component @@ -801,14 +802,22 @@ arg_list_item: NUMBER ; +arg_m4_quoted: + QUOTED_STRING { $$ = sl_from_str_consume($1); } + | + mls_range { $$ = sl_from_str_consume($1); } + | + %empty { $$ = sl_from_str(""); } + | + BACKTICK arg_m4_quoted SINGLE_QUOTE { $$ = $2; } + ; + arg: arg_list | QUOTED_STRING { $$ = sl_from_str_consume($1); } | - BACKTICK mls_range SINGLE_QUOTE { $$ = sl_from_str_consume($2); } - | - BACKTICK SINGLE_QUOTE { $$ = sl_from_str(""); } + BACKTICK arg_m4_quoted SINGLE_QUOTE { $$ = $2; } ; args: diff --git a/tests/sample_policy_files/uncommon.te b/tests/sample_policy_files/uncommon.te index 6fb108b..0de4a00 100644 --- a/tests/sample_policy_files/uncommon.te +++ b/tests/sample_policy_files/uncommon.te @@ -158,3 +158,5 @@ optional_policy(` call_some_interface(foo_t) ') ') + +filetrans_pattern(foo_t, bar_run_t, baz_run_t, dir, ``"interface"'')