From patchwork Wed Sep 29 23:08:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Johansen X-Patchwork-Id: 66102 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id E6C5FB70A5 for ; Thu, 30 Sep 2010 09:09:09 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P15ll-0005cC-TY; Thu, 30 Sep 2010 00:09:01 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P15lj-0005bX-PL for kernel-team@lists.ubuntu.com; Thu, 30 Sep 2010 00:08:59 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P15lj-0005Nc-NA for ; Thu, 30 Sep 2010 00:08:59 +0100 Received: from [192.102.209.5] (helo=[10.251.5.194]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P15lj-0008Or-GU for kernel-team@lists.ubuntu.com; Thu, 30 Sep 2010 00:08:59 +0100 Message-ID: <4CA3C709.6020601@canonical.com> Date: Wed, 29 Sep 2010 16:08:57 -0700 From: John Johansen Organization: Canonical User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100916 Thunderbird/3.1.4 MIME-Version: 1.0 To: Kernel team list Subject: [Maverick] SRU: AppArmor return correct error code for mediated network connections X-Enigmail-Version: 1.1.2 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: John Johansen 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 Acked-by: Steve Conklin --- 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];