Re: [apparmor] [patch 03/26] fix failure paths around policy that can result in a crash

2014-04-15 Thread Seth Arnold
On Tue, Apr 15, 2014 at 05:11:10PM -0700, John Johansen wrote: > we could do > > if (prof->policy.count > 0) { > prof->policy.dfa = aare_create_dfa(prof->policy.rules, > &prof->policy.size, >

Re: [apparmor] [patch 03/26] fix failure paths around policy that can result in a crash

2014-04-15 Thread John Johansen
On 04/15/2014 04:48 PM, Seth Arnold wrote: > On Tue, Apr 15, 2014 at 10:22:10AM -0700, john.johan...@canonical.com wrote: >> Signed-off-by: John Johansen >> Acked-by: Steve Beattie >> > > There's a lot of extra code duplication here. I don't particularly like > the way this thing turned out.. it

Re: [apparmor] [patch 03/26] fix failure paths around policy that can result in a crash

2014-04-15 Thread Seth Arnold
On Tue, Apr 15, 2014 at 10:22:10AM -0700, john.johan...@canonical.com wrote: > Signed-off-by: John Johansen > Acked-by: Steve Beattie > There's a lot of extra code duplication here. I don't particularly like the way this thing turned out.. it's more obvious with the full code, I'll paste it in

[apparmor] [patch 03/26] fix failure paths around policy that can result in a crash

2014-04-15 Thread john . johansen
Signed-off-by: John Johansen Acked-by: Steve Beattie --- parser/parser_regex.c |6 ++ 1 file changed, 6 insertions(+) --- 2.9-test.orig/parser/parser_regex.c +++ 2.9-test/parser/parser_regex.c @@ -712,6 +712,9 @@ prof->policy.rules = NULL; if (!prof->pol