[apparmor] [PATCH 04/10] From 34e17974b97355313e84feb74e92e5e3a91ef5e9 Mon Sep 17 00:00:00 2001 From: John Johansen <john.johansen at canonical.com> Date: Sat, 27 Oct 2012 04:50:11 -0700 Subject: [PATCH 04/10] Refactor policydb entry processing

Seth Arnold seth.arnold at canonical.com
Thu Jul 25 01:35:54 UTC 2013


On Sun, Jul 21, 2013 at 10:32:47PM -0700, John Johansen wrote:
> Refactor policydb entry processing so that post_process_policydb_ents is
> just a driver for rule specific routines.
> 
> Signed-off-by: John Johansen <john.johansen at canonical.com>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  parser/parser_regex.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/parser/parser_regex.c b/parser/parser_regex.c
> index 0ba8114..30a86cc 100644
> --- a/parser/parser_regex.c
> +++ b/parser/parser_regex.c
> @@ -1041,7 +1041,7 @@ fail:
>  }
>  
>  
> -int post_process_policydb_ents(struct codomain *cod)
> +int post_process_mnt_ents(struct codomain *cod)
>  {
>  	int ret = TRUE;
>  	int count = 0;
> @@ -1058,10 +1058,19 @@ int post_process_policydb_ents(struct codomain *cod)
>  	} else if (cod->mnt_ents && !kernel_supports_mount)
>  		pwarn("profile %s mount rules not enforced\n", cod->name);
>  
> -	cod->policy_rule_count = count;
> +	cod->policy_rule_count += count;
> +
>  	return ret;
>  }
>  
> +int post_process_policydb_ents(struct codomain *cod)
> +{
> +	if (!post_process_mnt_ents(cod))
> +		return FALSE;
> +
> +	return TRUE;
> +}
> +
>  int process_policydb(struct codomain *cod)
>  {
>  	int error = -1;
> -- 
> 1.8.1.2
> 
> 
> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130724/d56ea634/attachment-0001.pgp>


More information about the AppArmor mailing list