[apparmor] [PATCH] [parsers] allow for nested alternations expressions

John Johansen john.johansen at canonical.com
Tue Nov 5 20:29:56 UTC 2013


On 11/05/2013 11:33 AM, Steve Beattie wrote:
> On Mon, Nov 04, 2013 at 05:28:22PM -0800, John Johansen wrote:
>> On 11/04/2013 04:34 PM, Steve Beattie wrote:
>>> Well, part of the slowdown was me writing some unit tests for that
>>> function. Here's the patch that does that:
> [SNIP]
>>> +	//MY_REGEX_TEST("\\", "\\", ePatternBasic);
>>> +	MY_REGEX_TEST("\\\\", "\\\\", ePatternBasic);
>>> +	//MY_REGEX_TEST("\\blort", "\\blort", ePatternBasic);
>>> +	MY_REGEX_TEST("\\\\blort", "\\\\blort", ePatternBasic);
>>> +	//MY_REGEX_TEST("blort\\", "blort\\", ePatternBasic);
>> why are these 3 commented out?
> 
> Ah, right, I'd forgotten about these. They're commented out
> because as-is, they fail; however I wasn't sure if that was the
> correct expected output. Basically, what happens is that if whatever
> follows isn't expecting an escape character, then the escaping '\' is
> dropped. Thus, the current behavior is that '\\' becomes '' and both
> '\\blort' and 'blort\\' become 'blort'.
> 
> The question is, is this a bug? I think so... but I'm willing to hear
> countering arguments.
> 
O_o  Its a bug




More information about the AppArmor mailing list