cifs: check all path components in resolved dfs target
authorPaulo Alcantara <pc@cjr.nz>
Wed, 24 Feb 2021 23:59:22 +0000 (20:59 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 25 Feb 2021 18:18:22 +0000 (12:18 -0600)
commitff2c54a04097dee0b8899c485360719844d923f8
treef1cfd04c820230763c4e078ece8df931fd221a3a
parent8513222b9ef2709ba40cbda07b55d5fbcfdd4bc7
cifs: check all path components in resolved dfs target

Handle the case where a resolved target share is like
//server/users/dir, and the user "foo" has no read permission to
access the parent folder "users" but has access to the final path
component "dir".

is_path_remote() already implements that, so call it directly.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Cc: stable@vger.kernel.org # 5.11
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c