[apparmor] PATCH [2/6] - Fix capability log parsing

Steve Beattie steve at nxnw.org
Fri Sep 10 00:45:16 BST 2010


On Thu, Sep 09, 2010 at 04:42:29PM -0700, John Johansen wrote:
> NAK I think this will be just as confusing, this thing is a mess, and I
> tried to do what I did to leave a little documentation.  The following
> patches applies on top, of the previous set and converts the second
> {key_capability} into a comment for the time being, while documenting
> why its there and what needs to be done in the future.
> 
> 
> Index: libapparmor/src/scanner.l
> ===================================================================
> --- libapparmor.orig/src/scanner.l	2010-09-09 08:41:10.504193401 -0700
> +++ libapparmor/src/scanner.l	2010-09-09 16:15:43.854193511 -0700
> @@ -347,9 +348,21 @@
>  {key_fsuid}		{ return(TOK_KEY_FSUID); }
>  {key_ouid}		{ return(TOK_KEY_OUID); }
>  {key_comm}		{ return(TOK_KEY_COMM); }
> -{key_capability}	{ return(TOK_KEY_CAPABILITY); }
> + /* This key_capability entry is here to document, what should be.
> +  * currently the capability token is handled by the old set of rules above
> +  * it should be handled here, but there is no good way to combine them
> +  * that doesn't require more work than it is worth atm because of the
> +  * switch to sub_id in the old scanner rules.
> +  * The switch to sub_id causes the new rule set in the grammar to need to
> +  * accept a TOK_ID instead of TOK_DIGITS, which it should be.
> +  * once the old rules and old scanning is ripped out this scanner rule
> +  * should be activated and the corresponding rule in the grammar should
> +  * be updated to use TOK_DIGITS
> +  * {key_capability}	{ return(TOK_KEY_CAPABILITY); }
> +  */
>  {key_capname}		{ return(TOK_KEY_CAPNAME); }
>  {key_offset}		{ return(TOK_KEY_OFFSET); }
>  {key_target}		{ return(TOK_KEY_TARGET); }

ACKed for trunk and 2.5.1. Thanks.

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/apparmor/attachments/20100909/8d9ec725/attachment.pgp 


More information about the AppArmor mailing list