ksmbd: return unsupported error on smb1 mount
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 23 Mar 2023 12:15:52 +0000 (21:15 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 24 Mar 2023 05:23:13 +0000 (00:23 -0500)
commit39b291b86b5988bf8753c3874d5c773399d09b96
tree2c9f27b43829a45a665f0548defaeedf7dc44bb9
parentb53e8cfec30b93c120623232ba27c041b1ef8f1a
ksmbd: return unsupported error on smb1 mount

ksmbd disconnect connection when mounting with vers=smb1.
ksmbd should send smb1 negotiate response to client for correct
unsupported error return. This patch add needed SMB1 macros and fill
NegProt part of the response for smb1 negotiate response.

Cc: stable@vger.kernel.org
Reported-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/connection.c
fs/ksmbd/smb_common.c
fs/ksmbd/smb_common.h