From patchwork Thu Oct 1 17:40:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Johansen X-Patchwork-Id: 525203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id DD32F140D6D; Fri, 2 Oct 2015 03:41:12 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1Zhhqs-0003YU-EK; Thu, 01 Oct 2015 17:41:06 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1Zhhqm-0003X8-50 for kernel-team@lists.ubuntu.com; Thu, 01 Oct 2015 17:41:00 +0000 Received: from static-50-53-43-17.bvtn.or.frontiernet.net ([50.53.43.17] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1Zhhql-0004fu-Pt for kernel-team@lists.ubuntu.com; Thu, 01 Oct 2015 17:41:00 +0000 From: John Johansen To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: SAUCE: (no-up) apparmor: fix mount not handling disconnected paths Date: Thu, 1 Oct 2015 10:40:57 -0700 Message-Id: <1443721257-10203-1-git-send-email-john.johansen@canonical.com> X-Mailer: git-send-email 2.1.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com upstream: No. This is a fix to an out of tree apparmor 3 patch BugLink: http://bugs.launchpad.net/bugs/1496430 Mount rules are not honoring the attach_disconnected flag, causing apparmor to deny mounts for lxc and docker even when the appropriate rule exists in the profile. Signed-off-by: John Johansen --- security/apparmor/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c index ee6229d..b2d3354 100644 --- a/security/apparmor/mount.c +++ b/security/apparmor/mount.c @@ -332,7 +332,7 @@ audit: static int path_flags(struct aa_profile *profile, struct path *path) { return profile->path_flags | - S_ISDIR(path->dentry->d_inode->i_mode) ? PATH_IS_DIR : 0; + (S_ISDIR(path->dentry->d_inode->i_mode) ? PATH_IS_DIR : 0); } int aa_remount(struct aa_label *label, struct path *path, unsigned long flags,