[Maverick] SRU: AppArmor return correct error code for mediated network connections

Steve Conklin sconklin at canonical.com
Thu Sep 30 14:17:45 UTC 2010


On Wed, 2010-09-29 at 16:08 -0700, John Johansen wrote:
> From: John Johansen <john.johansen at canonical.com>
> Date: Wed, 29 Sep 2010 15:39:36 -0700
> Subject: [PATCH] UBUNTU: SAUCE: Return correct error code for mediated network connections
> 
> Fix AppArmor portion of Bug #647071 which is a bug in the ubuntu sauce
> AppArmor network compatibility patch.  All network mediation was failing
> to be applied because the correct error code was not being set in the
> audit structure resulting in a return code of 0 always being returned.
> 
> BugLink: http://bugs.launchpad.net/bugs/647071
> 
> Signed-off-by: John Johansen <john.johansen at canonical.com>
> ---
>  security/apparmor/net.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/security/apparmor/net.c b/security/apparmor/net.c
> index 7c36e82..1765901 100644
> --- a/security/apparmor/net.c
> +++ b/security/apparmor/net.c
> @@ -85,6 +85,7 @@ static int audit_net(struct aa_profile *profile, int op, u16 family, int type,
>  	sa.u.net.sk = sk;
>  	sa.aad.net.type = type;
>  	sa.aad.net.protocol = protocol;
> +	sa.aad.error = error;
>  
>  	if (likely(!sa.aad.error)) {
>  		u16 audit_mask = profile->net.audit[sa.u.net.family];
> -- 
> 1.7.1
> 
> 
Acked-by: Steve Conklin <sconklin at canonical.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20100930/a8f664d7/attachment.sig>


More information about the kernel-team mailing list