Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp342578lqg; Fri, 1 Mar 2024 06:54:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVNPqDEvvidO3TbTF+dIMJgQT09KxNyI+p7y7ZcsRh5SFW/xWgWwHGWnoBqvJkT7Ohq/0dEoG7eYjGiO8lj82BdmiJxHyjxN1kwcR4Prw== X-Google-Smtp-Source: AGHT+IGeP9t6YsSjD5b8GrSWP1ecvXRsQoXd0ZqHnYshpgaZtJTDKeZsKIQ0rtzFEY+QL+I+UvdF X-Received: by 2002:a05:6870:ab10:b0:220:8b57:7324 with SMTP id gu16-20020a056870ab1000b002208b577324mr1935259oab.36.1709304854732; Fri, 01 Mar 2024 06:54:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709304854; cv=pass; d=google.com; s=arc-20160816; b=YeeSCdhflkW1AlCtBqd6e/g+exXKfCMYqbKXCSvhou+WKMSh8652G36rmO6psK4phd Lm9UF/JbTWuhSUzDe1/ETz5eTi1a1lv1I8kIydYBcRUbCljSSC/Ew+ZNK61bsFLM70n3 2J4bmWfcqhKxUA3QHwobWAPuRqldQLd9xDDlIR9b+MJfJsw6Xagu38BIg5dvCohcB5rZ 3YaU9S17Sx1IYr2Q+q1zFX9Jq0EY444CHJsB2eOGGNHkLA9s0kEZ8UbCo4b9PQ3dH/2V mu1DMTldmplhPisYTqa371dLRNa/2R9c84h0Q0IBtqbDJG+ABKIfEJGIC8ZrImkHjIVl ubJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:mail-followup-to:message-id:subject:cc:to:from :date; bh=1QIyvYZfKtiPqI5AFnFIb7YN3zlGFCyEvVIA2mbCsio=; fh=SKXdgWCbuyy1WS3b3HdCp5j83hWXfHGWs/LBN0BEaPc=; b=jyN5N7LDwVXnpWX3XQNzWEvm3/IU+bHrU6A6OlJB4X1W2p++/LhE3A+CSqJP7jiy+Y vs1vfs4UWxenF0ZaETc6lSrGrrG8hPRX/nnXZBZTHotSx0wHl2nbXYFK3J1fTykpKkwv zv0q2QJBivmCivB+VWW3eS3oqG3kZDXunY3EBKElWtMuiD2dsylrCbm0n1UwP0Y5wjGh WjkmFJCZaQafo8EZG2/X14qMeqTsX5pOajC7xiXXcSjHysAfpSKhE/nDI8aNFGiVjrOP K3sG++gAu2ap3nUX5nYpVAckqz0WL1YhujoEBtoNSMKXDxiw1n1SYrPmj6CYP2sBIbdL 3p0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=astralinux.ru); spf=pass (google.com: domain of linux-kernel+bounces-88587-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88587-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f6-20020a05620a15a600b00787d78dd622si3742428qkk.457.2024.03.01.06.54.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 06:54:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88587-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=astralinux.ru); spf=pass (google.com: domain of linux-kernel+bounces-88587-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88587-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4C2D01C22E79 for ; Fri, 1 Mar 2024 14:54:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3653B3A8DE; Fri, 1 Mar 2024 14:54:08 +0000 (UTC) Received: from new-mail.astralinux.ru (new-mail.astralinux.ru [51.250.53.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBC143987D; Fri, 1 Mar 2024 14:53:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.250.53.244 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709304847; cv=none; b=AVGOlTVGtKopB6VpGjx+qUdY3eQ5jdanPwySeyVUV8hDu1fCdOz7hSN/uYobmVcnRWC4vzJyEVKlHKrq1CtQg7Tf9zCT7ZJMeWqTV9JBx+1PFFyn0Ir1w2a8Ay722wbw6UpMQVZXvmngHQ1wuJChaMylFKAlYLbLMtJP1CAymKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709304847; c=relaxed/simple; bh=hSEvV1uGXnbUmk4BJckyjC9QO5qiJ5UDBiW72C1lb3o=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=tLEDj2Cw/5HOHi9qvRFNHmTzWaJDHnjz782m1fS5BinPnZPYLMp2e28ycv6r/ukkIvu7FCHQr1zuOFfFjFKExk5qZKVyXKotKbx+AL03pbU10E0aDS2lySObLfdGhzLwBXuqYuOOSRyT7KlWre9ThwaPEYznt4luIIfkSyAwrQw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=astralinux.ru; spf=pass smtp.mailfrom=astralinux.ru; arc=none smtp.client-ip=51.250.53.244 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=astralinux.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=astralinux.ru Received: from debian-BULLSEYE-live-builder-AMD64 (unknown [192.168.32.68]) by new-mail.astralinux.ru (Postfix) with ESMTPA id 4TmWLl1X1bzlVv2; Fri, 1 Mar 2024 17:53:51 +0300 (MSK) Date: Fri, 1 Mar 2024 17:53:44 +0300 From: Eugene Korenevsky To: linux-cifs@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] cifs: open_cached_dir(): add FILE_READ_EA to desired access Message-ID: Mail-Followup-To: Eugene Korenevsky , linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-DrWeb-SpamScore: 0 X-DrWeb-SpamState: legit X-DrWeb-SpamDetail: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehuddgtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfftfghgfeunecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkgggtugesthdtredttddtvdenucfhrhhomhepgfhughgvnhgvucfmohhrvghnvghvshhkhicuoegvkhhorhgvnhgvvhhskhihsegrshhtrhgrlhhinhhugidrrhhuqeenucggtffrrghtthgvrhhnpeehteefudduuddtjeffffeigedutdekteffkeetieffueefudffhfdugfffleekudenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduledvrdduieekrdefvddrieeknecurfgrrhgrmhephhgvlhhopeguvggsihgrnhdquegfnffnuffgjgfgqdhlihhvvgdqsghuihhluggvrhdqtefoffeigedpihhnvghtpeduledvrdduieekrdefvddrieekmeehkeeivdeipdhmrghilhhfrhhomhepvghkohhrvghnvghvshhkhiesrghsthhrrghlihhnuhigrdhruhdpnhgspghrtghpthhtohepvddprhgtphhtthhopehlihhnuhigqdgtihhfshesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DrWeb-SpamVersion: Vade Retro 01.423.251#02 AS+AV+AP Profile: DRWEB; Bailout: 300 X-AntiVirus: Checked by Dr.Web [MailD: 11.1.19.2307031128, SE: 11.1.12.2210241838, Core engine: 7.00.62.01180, Virus records: 12439106, Updated: 2024-Mar-01 12:56:39 UTC] Since smb2_query_eas() reads EA and uses cached directory, open_cached_dir() should request FILE_READ_EA access. Otherwise listxattr() and getxattr() will fail with EACCES (0xc0000022 STATUS_ACCESS_DENIED SMB status). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=218543 Signed-off-by: Eugene Korenevsky --- fs/smb/client/cached_dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 3de5047a7ff9..a0017724d523 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -239,7 +239,8 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, .tcon = tcon, .path = path, .create_options = cifs_create_options(cifs_sb, CREATE_NOT_FILE), - .desired_access = FILE_READ_DATA | FILE_READ_ATTRIBUTES, + .desired_access = FILE_READ_DATA | FILE_READ_ATTRIBUTES | + FILE_READ_EA, .disposition = FILE_OPEN, .fid = pfid, .replay = !!(retries), -- 2.30.2