Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4321807pxb; Mon, 21 Feb 2022 17:56:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoiCmWU44IUwumhOoZ4BnsctXxMsa2xtfehQ/PsDC6eHaooIUIFpbB/93SElJcgESTu584 X-Received: by 2002:a17:906:d0c5:b0:6cd:f8fe:2f2e with SMTP id bq5-20020a170906d0c500b006cdf8fe2f2emr18297248ejb.395.1645494976475; Mon, 21 Feb 2022 17:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645494976; cv=none; d=google.com; s=arc-20160816; b=C0yvoeg9U5si+0wcOUlZZ/d2mNVGvL2LvJAA2u4GcsJ0m058zzjcFZDu4dsxGTVUji yUGcDwasOF1XRt8+ZtbpECFMR7NCRsDa+5hYx7LhouUHnaj8G3oMB1ywqq4Qot385cDe xw2LgiVk8EcsVHgvxq4OGtJ3ksK7PPnuTVVn6XnQUd5ygrKHTSF1ZO6/29HemlKvZBRa cNzbr7aODIG3uaRIlfTuXt7Z2FS9zZJ9xJekGS3GD1IOFWZe1aTnr0lq02Oqn1CZQX7J 4soS/onKUsDHyYRAMiZeMKTWa1KmjrI5ufM/Lr8QGDCcajLu7yxGmViQA4tOutm3Kd2h EBsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N7wYp/ILfDy79r2OLnhBWV7IhuGcpEukYd8ZB8ucIpA=; b=vuKDe1xaofb6PFsyOSgMBUZbwHU5UD3jpNap2WsO0pRMNEzgrvGUANeN7rrVHlVX/y db/HBsB1bYlcEg9uDspzm4rpSCY6vnFKgXMygkD5yOePVYT7qkh5jrOhMWP1ze7QEnlv Jn4gNGVc9BBpJ+ujJX1ossyCJSQGz1DDwD4LqdunIVe+ujZnFLdzGt9K/WhACkBHMuNC mcUdcT7xaCqU+vKLS72P3eReAA6BK3NcpLRVbFXShhowmLQtCUT01OuITaFV+KWOyd5t //KyyccnFTMdgUXYniQad71OtxPEvFEOyciBC7tXCfFe3M19gMzChYAizUjE0Bm/9Fvo DdHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2ZjXzs5L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r24si11073338edo.24.2022.02.21.17.55.54; Mon, 21 Feb 2022 17:56:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2ZjXzs5L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350853AbiBUJlh (ORCPT + 99 others); Mon, 21 Feb 2022 04:41:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350686AbiBUJeo (ORCPT ); Mon, 21 Feb 2022 04:34:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1929C2AE30; Mon, 21 Feb 2022 01:14:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 486FD60B1E; Mon, 21 Feb 2022 09:14:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B34AC340E9; Mon, 21 Feb 2022 09:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645434848; bh=BG1NpXKssJw3yavqv33fIVlY8+0FkZSDOgF69ULv2oo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2ZjXzs5LNQ6vdJL+0Ur1TQ4Y63e+TUM255Vi0XyxMh09LgxuPP9U56pdinttuk2z1 DD5oCHSxH7YcLgetew+CULR367n/C59+xAONycTl3io1Z9CU8dv96kZkNeuwqrqAOH 84Bk549kOXhCoLYcZ/olEicUVYU04NcebsWsbXys= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Amir Goldstein , Steve French Subject: [PATCH 5.15 120/196] cifs: fix set of group SID via NTSD xattrs Date: Mon, 21 Feb 2022 09:49:12 +0100 Message-Id: <20220221084934.949460961@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084930.872957717@linuxfoundation.org> References: <20220221084930.872957717@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amir Goldstein commit dd5a927e411836eaef44eb9b00fece615e82e242 upstream. 'setcifsacl -g ' silently fails to set the group SID on server. Actually, the bug existed since commit 438471b67963 ("CIFS: Add support for setting owner info, dos attributes, and create time"), but this fix will not apply cleanly to kernel versions <= v5.10. Fixes: 3970acf7ddb9 ("SMB3: Add support for getting and setting SACLs") Cc: stable@vger.kernel.org # 5.11+ Signed-off-by: Amir Goldstein Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/xattr.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c @@ -175,11 +175,13 @@ static int cifs_xattr_set(const struct x switch (handler->flags) { case XATTR_CIFS_NTSD_FULL: aclflags = (CIFS_ACL_OWNER | + CIFS_ACL_GROUP | CIFS_ACL_DACL | CIFS_ACL_SACL); break; case XATTR_CIFS_NTSD: aclflags = (CIFS_ACL_OWNER | + CIFS_ACL_GROUP | CIFS_ACL_DACL); break; case XATTR_CIFS_ACL: