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

John Johansen john.johansen at canonical.com
Wed Sep 29 23:08:57 UTC 2010


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





More information about the kernel-team mailing list