From patchwork Thu Aug 13 17:44:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 1344374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=A29Iym1n; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BSDTt5GCFz9sTH for ; Fri, 14 Aug 2020 03:44:34 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726334AbgHMRoc (ORCPT ); Thu, 13 Aug 2020 13:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbgHMRoc (ORCPT ); Thu, 13 Aug 2020 13:44:32 -0400 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25CEBC061757 for ; Thu, 13 Aug 2020 10:44:32 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id t4so6274082iln.1 for ; Thu, 13 Aug 2020 10:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0NvUBAxpwY9jLqU7UP+ur67fA7ah0X6B2GiOdMW3lvs=; b=A29Iym1nZAv1N0AnlyFviset6wr+pizwAZ7n2FJZYNTXP3/FarUZnZ+QtIjCV3rAbM 9r8uvJ4fZpY+pzMVYc4hLDXgG7WHfHFQv9V68yTrPmHJHtN/bQqJFsRouGshWjyy+yrT t4i17zqyjNy0cZEHY18y5bQeSFWezvt3Lotq0HSTcjHBfQrqQUrr9RNU1lbwPD4tuRKN 6gcTnXr5mv8H4UKjXtMNILgbHlqMajvAfCi6tf4ZHYKWgj6Alsyd1R8hqFNcnbcyVTq5 GbxEn3tsCIkFAV+TEdWZDyWFsTIIcjTjWbPGrXTB5Vu4lU0t3aBZ0SKv5z6rdq4Yp+sj o44Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0NvUBAxpwY9jLqU7UP+ur67fA7ah0X6B2GiOdMW3lvs=; b=mGkSbkUeQfb3ljNqeUuMzzcmmmxreqgL3W45vVXXUN0qd0B5c5XnLUbbHcxW1AzmDT SKgncn8XK+0EttzCaGNiamvpSX73h1n1n/B/QfzMUcz7L1VkwMlU/DG2r6Lpi930d8bV k4MbyAWDvHwqVheoniRe4mhQdv9XeJ29stQ8p8jVEWMkLkhfHD5h8Oh5hRF+//ZIAO48 bEWy5D6idYyzSRxFc61vvWXh4+QNhw7JzdFyDNEJaOR3Z6z55Q7kuwo7TCd2yzql/+xF jH76ZSb2ednI5BUUNzQwVu4gLAvPLiMSOvUZhbjIoqrE0DmUhabAaPUu/x2f1oNoYPGP ITrw== X-Gm-Message-State: AOAM5332xsFgJRrZJiUX8DjdRmDsDTdiIBRSZe6dUhoJd9MwTLruEdiL WLCd2NI/F9ITcknFtZYakXwxKt/XcWPEMUYvGPwTlB3K174= X-Google-Smtp-Source: ABdhPJx9O+uNkcRXuqaO6e0CjTRygVnuHCo+ykmVbA9ji8j0h/Gh5pIWi/sEiDqi4UjQfPKjdbsT/XNuFyRG9dvvz5E= X-Received: by 2002:a92:849b:: with SMTP id y27mr5944654ilk.173.1597340670126; Thu, 13 Aug 2020 10:44:30 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Thu, 13 Aug 2020 12:44:19 -0500 Message-ID: Subject: [PATCH][SMB3] Fix mkdir when idsfromsid configured on mount To: CIFS Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org mkdir uses a compounded create operation which was not setting the security descriptor on create of a directory. Fix so mkdir now sets the mode and owner info properly when idsfromsid and modefromsid are configured on the mount. Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Pavel Shilovsky From c8e2d959ddac89ee44f170b2f2549e749581ec55 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 13 Aug 2020 12:38:08 -0500 Subject: [PATCH] SMB3: Fix mkdir when idsfromsid configured on mount mkdir uses a compounded create operation which was not setting the security descriptor on create of a directory. Fix so mkdir now sets the mode and owner info properly when idsfromsid and modefromsid are configured on the mount. Signed-off-by: Steve French CC: Stable # v5.8 --- fs/cifs/smb2inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c index b9db73687eaa..eba01d0908dd 100644 --- a/fs/cifs/smb2inode.c +++ b/fs/cifs/smb2inode.c @@ -115,6 +115,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon, vars->oparms.fid = &fid; vars->oparms.reconnect = false; vars->oparms.mode = mode; + vars->oparms.cifs_sb = cifs_sb; rqst[num_rqst].rq_iov = &vars->open_iov[0]; rqst[num_rqst].rq_nvec = SMB2_CREATE_IOV_SIZE; -- 2.25.1