From patchwork Mon Dec 7 21:21:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 7791501 Return-Path: X-Original-To: patchwork-selinux@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 646D4BEEE1 for ; Mon, 7 Dec 2015 22:09:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B5F520570 for ; Mon, 7 Dec 2015 22:09:17 +0000 (UTC) Received: from emvm-gh1-uea08.nsa.gov (emvm-gh1-uea08.nsa.gov [63.239.67.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FD0D2056E for ; Mon, 7 Dec 2015 22:09:16 +0000 (UTC) X-TM-IMSS-Message-ID: <3e7722d300028dec@nsa.gov> Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by nsa.gov ([10.208.42.193]) with ESMTP (TREND IMSS SMTP Service 7.1) id 3e7722d300028dec ; Mon, 7 Dec 2015 17:07:44 -0500 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id tB7M7PxY005490; Mon, 7 Dec 2015 17:07:32 -0500 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id tB7LQXn4263202 for ; Mon, 7 Dec 2015 16:26:33 -0500 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id tB7LNOqK001405 for ; Mon, 7 Dec 2015 16:26:33 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1CeBABD9WVW/7PVVdFeGQEBAQEPAQEBAYRLuxeEFoYOAoITAQEBAQEBhUABAQEDEi4BATcBD1E0AQUBHAYBEiKIDaJHgTE+MYpXhVQBBYt1AQEBAQEBBAIBGgYKhDqCEI44jS52iEKWTZIPNoEXY4IEDR2BdVMBhW4BAQE X-IPAS-Result: A1CeBABD9WVW/7PVVdFeGQEBAQEPAQEBAYRLuxeEFoYOAoITAQEBAQEBhUABAQEDEi4BATcBD1E0AQUBHAYBEiKIDaJHgTE+MYpXhVQBBYt1AQEBAQEBBAIBGgYKhDqCEI44jS52iEKWTZIPNoEXY4IEDR2BdVMBhW4BAQE X-IronPort-AV: E=Sophos;i="5.20,396,1444708800"; d="scan'208";a="5004915" Received: from emvm-gh1-uea08.nsa.gov ([10.208.42.193]) by goalie.tycho.ncsc.mil with ESMTP; 07 Dec 2015 16:23:48 -0500 X-TM-IMSS-Message-ID: <3e4eda2f00028039@nsa.gov> Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com [209.85.213.179]) by nsa.gov ([10.208.42.193]) with ESMTP (TREND IMSS SMTP Service 7.1; TLSv1/SSLv3 AES128-SHA (128/128)) id 3e4eda2f00028039 ; Mon, 7 Dec 2015 16:23:44 -0500 Received: by igl9 with SMTP id 9so83279984igl.0 for ; Mon, 07 Dec 2015 13:23:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=V9f5csuSCjWl9AnUtgVNOUexbWooD0z/+rwSox7xHLs=; b=dbz1JTmbi3G5F3lljH1s737+bIbnlyebyNTnwvLSak355MDGNx5DUl7nO49AMUnZOA p2L9LUbefjihvhgxaZdLNs5iIxxSXjgIQZjpmEWSum2lQSmJSP525gc1k81SA7xTgOdI kxIC7E5konsrskDSGMPqbr1zb+hOfXuw7FRwpb0GDbKrjmsKwEJ+8nS5hRx68ZRn9oKV sk0IMtLMBHeeqS50/swibsu2Db73a8B2+ZwV4SlzdnKE3EMJeXMYkq3kCo3YAPFPWnJ3 TFjLVvsViH5eYbzsOIQDuJTnVN2WjRDPWZJyD+d3aCyDb1kNMLsSDjUWI2EozpWPpm4I labA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V9f5csuSCjWl9AnUtgVNOUexbWooD0z/+rwSox7xHLs=; b=AC2u9aOt4vh31idMpL66r9Kig1LXW51iVlGj0TA9MSiTwgkI/mrG2prvIOv+Gn8qvP La9rQlOnOFKK0+/1yMwJpD+/Kvild0KaDYJ4oRVYZx/YqnsvDUjWrIjc2uimtzQwlUB7 URiE3RML+GPwRhxFdYLrcAyRAOa/mRu5EEkJ9yaLIF5/RyvQ7jekjuZ5PiyQn07lcsNW v0sJR46zrwKl7blnKWjmnyBFk0yIqR/CA5y6VnoYOUVStMzcYDEyjPFIkLceeB+OXkUG fqqC8Z/5VBz6/KgjOdDBLrt36YEHZZH+FaFthADB9sF35wWCjvgp8FeT41soHEP12ATk J89Q== X-Gm-Message-State: ALoCoQl598cNAJo1mT6NgU2aPQLtaN5ejjiUP/FaqM+hbP7po483O1W4jrkaGFA9MQOmddutaAcGojP3ebXAPWShQRGaiTV0dg== X-Received: by 10.50.25.198 with SMTP id e6mr18991352igg.15.1449523425852; Mon, 07 Dec 2015 13:23:45 -0800 (PST) Received: from localhost (199-87-125-144.dyn.kc.surewest.net. [199.87.125.144]) by smtp.gmail.com with ESMTPSA id ue2sm7910875igb.0.2015.12.07.13.23.45 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 07 Dec 2015 13:23:45 -0800 (PST) From: Seth Forshee To: "Eric W. Biederman" , Miklos Szeredi Subject: [PATCH v2 18/18] fuse: Allow user namespace mounts Date: Mon, 7 Dec 2015 15:21:27 -0600 Message-Id: <1449523289-144238-19-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449523289-144238-1-git-send-email-seth.forshee@canonical.com> References: <1449523289-144238-1-git-send-email-seth.forshee@canonical.com> X-TM-AS-MML: disable X-Mailman-Approved-At: Mon, 07 Dec 2015 16:44:28 -0500 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Cc: Serge Hallyn , Seth Forshee , dm-devel@redhat.com, linux-security-module@vger.kernel.org, Richard Weinberger , linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, fuse-devel@lists.sourceforge.net, Austin S Hemmelgarn , linux-mtd@lists.infradead.org, Alexander Viro , selinux@tycho.nsa.gov, linux-fsdevel@vger.kernel.org MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Seth Forshee --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index b7bdfdac3521..2fd338c199ce 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1201,7 +1201,7 @@ static void fuse_kill_sb_anon(struct super_block *sb) static struct file_system_type fuse_fs_type = { .owner = THIS_MODULE, .name = "fuse", - .fs_flags = FS_HAS_SUBTYPE, + .fs_flags = FS_HAS_SUBTYPE | FS_USERNS_MOUNT, .mount = fuse_mount, .kill_sb = fuse_kill_sb_anon, }; @@ -1233,7 +1233,7 @@ static struct file_system_type fuseblk_fs_type = { .name = "fuseblk", .mount = fuse_mount_blk, .kill_sb = fuse_kill_sb_blk, - .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE, + .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE | FS_USERNS_MOUNT, }; MODULE_ALIAS_FS("fuseblk");