Skip to content

Commit

Permalink
ksmbd: set FILE_NAMED_STREAMS attribute in FS_ATTRIBUTE_INFORMATION
Browse files Browse the repository at this point in the history
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: [email protected]
Reported-by: Miao Lihua <[email protected]>
Tested-by: Miao Lihua <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
namjaejeon authored and Steve French committed Mar 22, 2023
1 parent 7a891d4 commit 728f14c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/ksmbd/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4934,6 +4934,10 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,

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);
Expand Down

0 comments on commit 728f14c

Please sign in to comment.