]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: Fix querying and creating MF symlinks over SMB1
authorPali Rohár <pali@kernel.org>
Sat, 28 Dec 2024 20:09:54 +0000 (21:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:41:54 +0000 (14:41 +0200)
commitd50f7ce2fc32ad9e3c7c250740d5bf0b0da85cf8
treeb29b558e0f14d9f260b2d27192692cde17d7e430
parent18066188eb90cc0c798f3370a8078a79ddb73f70
cifs: Fix querying and creating MF symlinks over SMB1

[ Upstream commit 4236ac9fe5b8b42756070d4abfb76fed718e87c2 ]

Old SMB1 servers without CAP_NT_SMBS do not support CIFS_open() function
and instead SMBLegacyOpen() needs to be used. This logic is already handled
in cifs_open_file() function, which is server->ops->open callback function.

So for querying and creating MF symlinks use open callback function instead
of CIFS_open() function directly.

This change fixes querying and creating new MF symlinks on Windows 98.
Currently cifs_query_mf_symlink() is not able to detect MF symlink and
cifs_create_mf_symlink() is failing with EIO error.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/link.c