ksmbd: return unsupported error on smb1 mount
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 23 Mar 2023 12:15:52 +0000 (21:15 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:47:58 +0000 (12:47 +0200)
commit51a8534c0f35c0401e45f1055f914729cad98bf9
tree6539841e544eb4addbc60323c93fb769d6790d4c
parent496e186bc005fa4a4d9cf14e0662ae00b60e1362
ksmbd: return unsupported error on smb1 mount

commit 39b291b86b5988bf8753c3874d5c773399d09b96 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/connection.c
fs/ksmbd/smb_common.c
fs/ksmbd/smb_common.h