Hello,
On Mon, Oct 20, 2014 at 12:49 AM, Christian Boltz <[email protected]> wrote: > Hello, > > match_net_includes() in aa.py gets "nettype" as parameter, but then uses > "type" when calling valid_include(). "type" is a global variable, but not > what we want to use here ;-) > > I noticed this while debugging > https://bugs.launchpad.net/apparmor/+bug/1380368 > (but this patch does not fix it, at least not alone) > > <rant>That's why I like PHP - it would have required an explicit > "global type" statement - or, without it, print an "undefined variable 'type'" > warning.</rant> > Really. I'm getting more inclined to statically typed languages. > > === modified file 'utils/apparmor/aa.py' > --- utils/apparmor/aa.py 2014-10-16 20:03:42 +0000 > +++ utils/apparmor/aa.py 2014-10-19 19:09:49 +0000 > @@ -2225,8 +2225,8 @@ > def match_net_includes(profile, family, nettype): > newincludes = [] > for incname in include.keys(): > > - if valid_include(profile, incname) and match_net_include(incname, > family, type): > + if valid_include(profile, incname) and match_net_include(incname, > family, nettype): > newincludes.append(incname) > > return newincludes > > Thanks. Acked-by: Kshitij Gupta <[email protected]>. Regards, Kshitij Gupta > > Regards, > > Christian Boltz > -- > [IP-Adresse von ppp0 mit system() ermitteln] > Dazu Perl zu verwenden, ähnelt sicherlich ein wenig der Spatzenjagd > mit großkalibrigen Langrohrgeschützen...;-) > [Christian Schmidt in suse-linux] > > > -- > AppArmor mailing list > [email protected] > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/apparmor -- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
