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

Tyler Hicks tyhicks at canonical.com
Fri Mar 4 08:16:36 UTC 2016


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>
---
 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;
-- 
2.7.0




More information about the AppArmor mailing list