aboutsummaryrefslogtreecommitdiff
path: root/fs/ksmbd/ksmbd_netlink.h
diff options
context:
space:
mode:
authorGravatar Atte Heikkilä <atteh.mailbox@gmail.com> 2022-10-03 02:09:34 +0300
committerGravatar Steve French <stfrench@microsoft.com> 2022-10-05 01:15:44 -0500
commitf5ba1cdaf5eb380e148183bda06d4844b457d095 (patch)
tree7dcec37b1ed5813e6bfc437b279cc9caf6b1a58c /fs/ksmbd/ksmbd_netlink.h
parentksmbd: call ib_drain_qp when disconnected (diff)
downloadlinux-f5ba1cdaf5eb380e148183bda06d4844b457d095.tar.gz
linux-f5ba1cdaf5eb380e148183bda06d4844b457d095.tar.bz2
linux-f5ba1cdaf5eb380e148183bda06d4844b457d095.zip
ksmbd: validate share name from share config response
Share config response may contain the share name without casefolding as it is known to the user space daemon. When it is present, casefold and compare it to the share name the share config request was made with. If they differ, we have a share config which is incompatible with the way share config caching is done. This is the case when CONFIG_UNICODE is not set, the share name contains non-ASCII characters, and those non- ASCII characters do not match those in the share name known to user space. In other words, when CONFIG_UNICODE is not set, UTF-8 share names now work but are only case-insensitive in the ASCII range. Signed-off-by: Atte Heikkilä <atteh.mailbox@gmail.com> Acked-by: Tom Talpey <tom@talpey.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/ksmbd_netlink.h')
-rw-r--r--fs/ksmbd/ksmbd_netlink.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ksmbd/ksmbd_netlink.h b/fs/ksmbd/ksmbd_netlink.h
index e0cbcfa98c7e..ff07c67f4565 100644
--- a/fs/ksmbd/ksmbd_netlink.h
+++ b/fs/ksmbd/ksmbd_netlink.h
@@ -163,7 +163,8 @@ struct ksmbd_share_config_response {
__u16 force_directory_mode;
__u16 force_uid;
__u16 force_gid;
- __u32 reserved[128]; /* Reserved room */
+ __s8 share_name[KSMBD_REQ_MAX_SHARE_NAME];
+ __u32 reserved[112]; /* Reserved room */
__u32 veto_list_sz;
__s8 ____payload[];
};