[apparmor] PATCH [3/6] - allow error= field to return negative error codes
Steve Beattie
steve at nxnw.org
Fri Sep 10 01:07:06 BST 2010
Sigh, one last question:
On Thu, Sep 09, 2010 at 08:36:32AM -0700, John Johansen wrote:
> The kernel can return negative error codes for error=
>
> Index: libapparmor/src/grammar.y
> ===================================================================
> --- libapparmor.orig/src/grammar.y 2010-09-09 07:56:50.534193401 -0700
> +++ libapparmor/src/grammar.y 2010-09-09 07:59:37.364193121 -0700
> @@ -92,6 +92,7 @@
>
> %token TOK_EQUALS
> %token TOK_COLON
> +%token TOK_MINUS
> %token TOK_OPEN_PAREN
> %token TOK_CLOSE_PAREN
> %token TOK_PERIOD
> @@ -434,6 +435,8 @@
> { ret_record->event = lookup_aa_event($3);}
> | TOK_KEY_ERROR TOK_EQUALS TOK_DIGITS
> { ret_record->error_code = $3;}
> + | TOK_KEY_ERROR TOK_EQUALS TOK_MINUS TOK_DIGITS
> + { ret_record->error_code = $4;}
The result of this is that it ends up returning just the numeric
component of the error code in the error_code field. Is that intended,
or should it include the negative sign?
(It's unclear to me what these negative values are here, though I do see
the change_hat error values being returned.)
--
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/93235e87/attachment.pgp
More information about the AppArmor
mailing list