[apparmor] [PATCH] update parser match string for 2.6.36

Steve Beattie steve at nxnw.org
Thu Aug 26 17:36:09 BST 2010


On Thu, Aug 26, 2010 at 09:09:02AM -0700, John Johansen wrote:
> The upstream 2.6.36 version of apparmor is missing the match file,
> so the parser doesn't set matching options correctly.
> 
> Set minimal defaults with that will allow the parser to load policy,
> on 2.6.36 kernels.

ACK from me. 2.5.1 worthy?

> ---
>  parser/parser_main.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> --- master-new.orig/parser/parser_main.c
> +++ master-new/parser/parser_main.c
> @@ -593,7 +593,7 @@
>  
>  	ms = fopen(MATCH_STRING, "r");
>  	if (!ms)
> -		return;
> +		goto out;
>  
>  	match_string = malloc(1000);
>  	if (!match_string) {
> @@ -612,6 +612,12 @@
>  
>  		if (strstr(match_string, " perms=c"))
>  			perms_create = 1;
> +	} else {
> +		/* no match string default to 2.6.36 version which doesn't
> +		 * have a match string
> +		 */
> +		regex_type = AARE_DFA;
> +		perms_create = 1;
>  	}
>  
>  	if (ms)

> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor


-- 
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/20100826/c7d01e1b/attachment.pgp 


More information about the AppArmor mailing list