On Sat, Jul 06, 2013 at 12:37:20PM -0500, Jamie Strandboge wrote:
> > There's a race condition here; well, maybe not -race-, but
> > self.template is updated before the sanity checks are performed. If
> > either of those exceptions gets ignored in callers, the template is
> > set to unsafe values.
> > 
> Hmmm, I can fix it, but if a caller chooses to use a try clause and
> then ignore it, I'm kinda thinking that is the caller's problem, no? I
> mean, that is why I'm raising the exception here.

Yes, it would be the caller's problem, but I like to think that in the
event of an exeption or error there should be as few side-effects as
possible.

Unexpected side-effects are a common source of problems, which is why I
mentioned this. It was likely fine, as it was, but who knows where it'll
be used in the future...

> I don't like how I am mixing and matching checking template and
> self.template though, so I'll change that right away.

Woo :) thanks.

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to