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

Steve Beattie steve at nxnw.org
Tue Apr 1 18:33:10 UTC 2014


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?

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.)

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140401/8efb5a47/attachment.pgp>


More information about the AppArmor mailing list