Re: [PATCH v2] ksmbd: clear 'encrypted' on encrypt_resp() failure to send plaintext error
From: Namjae Jeon
Date: Sat Nov 08 2025 - 09:27:29 EST
On Thu, Nov 6, 2025 at 3:58 PM Qianchang Zhao <pioooooooooip@xxxxxxxxx> wrote:
>
> When encrypt_resp() fails in the send path, we set STATUS_DATA_ERROR but
> leave work->encrypted true. The send path then still assumes a valid
> transform buffer and tries to build/send an encrypted reply.
>
> Clear work->encrypted on failure to force a plaintext error reply.
ksmbd will send a plain text error reply regardless of the
work->encrypted value.
It doesn't seem to make any sense to set this to false.
Thanks.