Message ID | 1653063037-2461-2-git-send-email-xuyang2018.jy@fujitsu.com |
---|---|
State | New |
Headers | show
Return-Path: <ceph-devel-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27890C4332F for <ceph-devel@archiver.kernel.org>; Fri, 20 May 2022 15:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343812AbiETPKb (ORCPT <rfc822;ceph-devel@archiver.kernel.org>); Fri, 20 May 2022 11:10:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241781AbiETPKY (ORCPT <rfc822;ceph-devel@vger.kernel.org>); Fri, 20 May 2022 11:10:24 -0400 Received: from mail1.bemta36.messagelabs.com (mail1.bemta36.messagelabs.com [85.158.142.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED58117706D; Fri, 20 May 2022 08:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.com; s=170520fj; t=1653059420; i=@fujitsu.com; bh=lKY9yswoHVpDbGbLhaeMQH9R5j0Sb+KVNk4RxWU9pOY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Re2la0jQBih2kCHYP7KntPHO6JK/c4nOGBslI7Whb21ofNHmcNHpJv9vB9bmhl+wB xosG8cbBOHSfzVZSy5tvvOJameMsUTqmA7yhgwYpgBDuwt28ROQQ7nyTNQvKr7Vb28 0dvCekYTXLXIFIbs4+kKhuQkClf93MJbqrI/rVOH2uWvCEQKl4bK3qUS9mEu2FF18J JAJn0G3iR2yrxtmV4UplUV6HlS/xpS9Es39sWaiZXVdONqENwfzn0JEiMZkOw3FTvf B22O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g6L9BX7ZMxX23Nxt7HJX oEVw1R2L+MfM/RvX1uXlvK88EhL67wxLzL9u1U/MZlEnluttSV27j2G557G3Zx9wPKvMztrb8 Eck8L7Asxsal88klblMrErZpMRSnJFoqMVcVJwIAGaXw+2ZAwAA X-Env-Sender: xuyang2018.jy@fujitsu.com X-Msg-Ref: server-3.tower-532.messagelabs.com!1653059418!259556!1 X-Originating-IP: [62.60.8.146] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.86.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6613 invoked from network); 20 May 2022 15:10:19 -0000 Received: from unknown (HELO n03ukasimr02.n03.fujitsu.local) (62.60.8.146) by server-3.tower-532.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 20 May 2022 15:10:19 -0000 Received: from n03ukasimr02.n03.fujitsu.local (localhost [127.0.0.1]) by n03ukasimr02.n03.fujitsu.local (Postfix) with ESMTP id BA175100445; Fri, 20 May 2022 16:10:18 +0100 (BST) Received: from R01UKEXCASM126.r01.fujitsu.local (unknown [10.183.43.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by n03ukasimr02.n03.fujitsu.local (Postfix) with ESMTPS id AD180100331; Fri, 20 May 2022 16:10:18 +0100 (BST) Received: from localhost.localdomain (10.167.220.84) by R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 20 May 2022 16:10:07 +0100 From: Yang Xu <xuyang2018.jy@fujitsu.com> To: <linux-fsdevel@vger.kernel.org>, <ceph-devel@vger.kernel.org> CC: <viro@zeniv.linux.org.uk>, <david@fromorbit.com>, <djwong@kernel.org>, <brauner@kernel.org>, <willy@infradead.org>, <jlayton@kernel.org>, Yang Xu <xuyang2018.jy@fujitsu.com>, <stable@vger.kernel.org> Subject: [PATCH v9 2/4] fs: Add missing umask strip in vfs_tmpfile Date: Sat, 21 May 2022 00:10:35 +0800 Message-ID: <1653063037-2461-2-git-send-email-xuyang2018.jy@fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1653063037-2461-1-git-send-email-xuyang2018.jy@fujitsu.com> References: <1653063037-2461-1-git-send-email-xuyang2018.jy@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.220.84] X-ClientProxiedBy: G08CNEXCHPEKD08.g08.fujitsu.local (10.167.33.83) To R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: <ceph-devel.vger.kernel.org> X-Mailing-List: ceph-devel@vger.kernel.org |
Series |
[v9,1/4] fs: add mode_strip_sgid() helper
|
expand
|
diff --git a/fs/namei.c b/fs/namei.c index 509657fdf4f5..73646e28fae0 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3521,6 +3521,8 @@ struct dentry *vfs_tmpfile(struct user_namespace *mnt_userns, child = d_alloc(dentry, &slash_name); if (unlikely(!child)) goto out_err; + if (!IS_POSIXACL(dir)) + mode &= ~current_umask(); error = dir->i_op->tmpfile(mnt_userns, dir, child, mode); if (error) goto out_err;