[apparmor] [PATCH 1/6] parser: Copy the named transition when copying a cod_entry

John Johansen john.johansen at canonical.com
Fri Mar 4 16:23:44 UTC 2016


On 03/04/2016 12:16 AM, Tyler Hicks wrote:
> The copy_cod_entry() function was not copying the nt_name field of the
> cod_entry struct.
> 
> This was discovered during code review and I'm not certain if it causes
> any real world bugs.
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>

Acked-by: John Johansen <john.johansen at canonical.com>

> ---
>  parser/parser_misc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/parser/parser_misc.c b/parser/parser_misc.c
> index a13f71c..2348189 100644
> --- a/parser/parser_misc.c
> +++ b/parser/parser_misc.c
> @@ -663,6 +663,7 @@ struct cod_entry *copy_cod_entry(struct cod_entry *orig)
>  	DUP_STRING(orig, entry, ns, err);
>  	DUP_STRING(orig, entry, name, err);
>  	DUP_STRING(orig, entry, link_name, err);
> +	DUP_STRING(orig, entry, nt_name, err);
>  	entry->mode = orig->mode;
>  	entry->audit = orig->audit;
>  	entry->deny = orig->deny;
> 




More information about the AppArmor mailing list