[apparmor] [PATCH 10/20] Fix: link rules to accept a variable
John Johansen
john.johansen at canonical.com
Fri May 29 08:39:16 UTC 2015
currently
link @{foo} -> /bar,
link /bar -> @{foo}
link @{foo} -> @{bar},
all fail due to illegal TOK_SET_VAR
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
parser/parser_yacc.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parser/parser_yacc.y b/parser/parser_yacc.y
index e466023..3ebaed4 100644
--- a/parser/parser_yacc.y
+++ b/parser/parser_yacc.y
@@ -1120,7 +1120,7 @@ file_rule_tail: opt_unsafe id_or_var file_mode id_or_var
yyerror(_("missing an end of line character? (entry: %s)"), $2);
};
-link_rule: TOK_LINK opt_subset_flag TOK_ID TOK_ARROW TOK_ID TOK_END_OF_RULE
+link_rule: TOK_LINK opt_subset_flag id_or_var TOK_ARROW id_or_var TOK_END_OF_RULE
{
struct cod_entry *entry;
PDEBUG("Matched: link tok_id (%s) -> (%s)\n", $3, $5);
--
2.1.4
More information about the AppArmor
mailing list