This is a note to let you know that I've just added the patch titled ksmbd: set FILE_NAMED_STREAMS attribute in FS_ATTRIBUTE_INFORMATION to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ksmbd-set-file_named_streams-attribute-in-fs_attribute_information.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 728f14c72b71a19623df329c1c7c9d1452e56f1e Mon Sep 17 00:00:00 2001 From: Namjae Jeon <linkinjeon@xxxxxxxxxx> Date: Wed, 1 Mar 2023 00:02:30 +0900 Subject: ksmbd: set FILE_NAMED_STREAMS attribute in FS_ATTRIBUTE_INFORMATION From: Namjae Jeon <linkinjeon@xxxxxxxxxx> commit 728f14c72b71a19623df329c1c7c9d1452e56f1e upstream. If vfs objects = streams_xattr in ksmbd.conf FILE_NAMED_STREAMS should be set to Attributes in FS_ATTRIBUTE_INFORMATION. MacOS client show "Format: SMB (Unknown)" on faked NTFS and no streams support. Cc: stable@xxxxxxxxxxxxxxx Reported-by: Miao Lihua <441884205@xxxxxx> Tested-by: Miao Lihua <441884205@xxxxxx> Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ksmbd/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -4923,6 +4923,10 @@ static int smb2_get_info_filesystem(stru info->Attributes |= cpu_to_le32(server_conf.share_fake_fscaps); + if (test_share_config_flag(work->tcon->share_conf, + KSMBD_SHARE_FLAG_STREAMS)) + info->Attributes |= cpu_to_le32(FILE_NAMED_STREAMS); + info->MaxPathNameComponentLength = cpu_to_le32(stfs.f_namelen); len = smbConvertToUTF16((__le16 *)info->FileSystemName, "NTFS", PATH_MAX, conn->local_nls, 0); Patches currently in stable-queue which might be from linkinjeon@xxxxxxxxxx are queue-5.15/ksmbd-set-file_named_streams-attribute-in-fs_attribute_information.patch queue-5.15/ksmbd-add-low-bound-validation-to-fsctl_query_alloca.patch queue-5.15/ksmbd-fix-possible-refcount-leak-in-smb2_open.patch queue-5.15/ksmbd-return-status_not_supported-on-unsupported-smb2.0-dialect.patch queue-5.15/ksmbd-return-unsupported-error-on-smb1-mount.patch queue-5.15/ksmbd-add-low-bound-validation-to-fsctl_set_zero_dat.patch