[apparmor] [patch 02/26] Fix mount rule initializers
john.johansen at canonical.com
john.johansen at canonical.com
Thu Mar 27 15:45:15 UTC 2014
Valgrind is offering complaints like the following when dealing with
profiles with mount rules:
==27919== Conditional jump or move depends on uninitialised value(s)
==27919== at 0x805CDC1: mnt_rule::mnt_rule(cond_entry*, char*, cond_entry*, char*, int) (mount.c:436)
==27919== by 0x805674E: do_mnt_rule(cond_entry*, char*, cond_entry*, char*, int) (parser_yacc.y:1389)
==27919== by 0x8057937: yyparse() (parser_yacc.y:1133)
==27919== by 0x8053916: process_profile(int, char const*) (parser_main.c:1003)
==27919== by 0x804B20E: main (parser_main.c:1340)
Doing this consistently with the other initializers for the mount
class instead:
Signed-off-by: Steve Beattie <steve at nxnw.org>
Acked-by: John Johansen <john.johansen at canonical.com>
Index: apparmor/parser/mount.c
===================================================================
--- apparmor.orig/parser/mount.c 2014-03-24 15:24:19.000000000 -0700
+++ apparmor/parser/mount.c 2014-03-24 16:05:06.227815297 -0700
@@ -397,7 +397,7 @@
struct cond_entry *dst_conds __unused, char *mnt_point_p,
int allow_p):
mnt_point(mnt_point_p), device(device_p), trans(NULL), opts(NULL),
- audit(0), deny(0)
+ flags(0), inv_flags(0), audit(0), deny(0)
{
/* FIXME: dst_conds are ignored atm */
aa_class = AA_CLASS_MOUNT;
More information about the AppArmor
mailing list