[apparmor] PATCH [4/6] - handle offset key
Steve Beattie
steve at nxnw.org
Thu Sep 9 22:57:43 BST 2010
On Thu, Sep 09, 2010 at 08:38:09AM -0700, John Johansen wrote:
> Status messages have and offset field used to debug why and where a policy
> load failed. For now just ignore it.
>
> Index: libapparmor/src/grammar.y
> ===================================================================
> --- libapparmor.orig/src/grammar.y 2010-09-09 08:01:10.524193402 -0700
> +++ libapparmor/src/grammar.y 2010-09-09 08:04:25.814193202 -0700
> @@ -163,6 +163,7 @@
> %token TOK_KEY_COMM
> %token TOK_KEY_CAPABILITY
> %token TOK_KEY_CAPNAME
> +%token TOK_KEY_OFFSET
>
> %token TOK_SYSLOG_KERNEL
>
> @@ -454,6 +455,11 @@
> { /* capname used to be reported in name */
> ret_record->name = $3;
> }
> + | TOK_KEY_OFFSET TOK_EQUALS TOK_DIGITS
> + { /* offset is used for reporting where an error occured unpacking
> + * loaded policy. We can just drop this currently
> + */
> + }
> ;
>
> apparmor_event:
> Index: libapparmor/src/scanner.l
> ===================================================================
> --- libapparmor.orig/src/scanner.l 2010-09-09 08:01:04.374193402 -0700
> +++ libapparmor/src/scanner.l 2010-09-09 08:04:03.974193401 -0700
> @@ -161,6 +161,7 @@
> key_comm "comm"
> key_capability "capability"
> key_capname "capname"
> +key_offset "offset"
> audit "audit"
>
> /* syslog tokens */
> @@ -348,6 +349,7 @@
> {key_comm} { return(TOK_KEY_COMM); }
> {key_capability} { return(TOK_KEY_CAPABILITY); }
> {key_capname} { return(TOK_KEY_CAPNAME); }
> +{key_offset} { return(TOK_KEY_OFFSET); }
>
> {syslog_kernel} { BEGIN(dmesg_timestamp); return(TOK_SYSLOG_KERNEL); }
> {syslog_month} { yylval->t_str = strdup(yytext); return(TOK_DATE_MONTH); }
ACKed from me for 2.5.1. Do you have a sample log message that can be
turned into a testcase?
--
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/6ee726a5/attachment.pgp
More information about the AppArmor
mailing list