[apparmor] [PATCH 10/20] Fix: link rules to accept a variable

Seth Arnold seth.arnold at canonical.com
Fri Jun 5 02:01:58 UTC 2015


On Fri, May 29, 2015 at 01:39:16AM -0700, John Johansen wrote:
> 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>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150604/66e4b614/attachment.pgp>


More information about the AppArmor mailing list