[apparmor] [patch 05/26] cleanup/fix escape sequences in the backend and add support for \d

John Johansen john.johansen at canonical.com
Tue Apr 1 19:20:08 UTC 2014


On 04/01/2014 11:33 AM, Steve Beattie wrote:
> On Thu, Mar 27, 2014 at 08:45:18AM -0700, john.johansen at canonical.com wrote:
>> the octal escape sequence was broken, so that short escapes \0, \00 \xa,
>> didn't work and actually resulted in some encoding bugs.
>>
>> Also we were missing support for the decimal # conversion \d123
>>
>> Signed-off-by: John Johansen <john.johansen at canonical.com>
> 
> Acked-by: Steve Beattie <steve at nxnw.org> with two caveats:
> 
> 1) both processquoted() and processunquoted() attempt to do octal
> conversion (poorly) as well; I'm not entirely convinced an octal
> sequence will make it to parse.y for processing. Can we please unify
> these and/or only do this conversion in one location?
> 
yeah, though I will make that a separate patch

> 2) These kinds of conversion functions are both not too difficult to
> check with unit tests and unit tests would help to verify that the
> corner cases that we were incorrectly encoding have been fixed.
> 
> (Yes, the cheese ball unit test infrastructure I set up in the parser
> is not the easiest to use. We could look at converting to something
> like cunit if that would lower the hurdle to writing unit tests.)
> 
> 
heh I'll poke at it and see what falls out




More information about the AppArmor mailing list