Re: [PATCH] ksmbd: return only the control flags of the parts in a query reply

From: Namjae Jeon

Date: Mon Nov 23 2026 - 18:10:23 EST


On Mon, Nov 23, 2026 at 1:02 AM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> build_sec_desc() copies the stored control flags into the query reply
> and clears only the DACL flags when the DACL is not requested. A
> SET_INFO without DACL_PRESENT stores the control word as the client
> sent it. Its other flags then appear in every reply, such as
> OWNER_DEFAULTED in a reply without the owner, and SACL_PRESENT
> although ksmbd refuses to query the SACL.
>
> Copy a stored control flag into the reply only when the part it goes
> with is in the reply. OWNER_DEFAULTED goes with the owner and
> GROUP_DEFAULTED with the group. DACL_PRESENT, DACL_DEFAULTED,
> DACL_AUTO_INHERITED and DACL_PROTECTED go with the DACL. The SACL
> flags and the other stored bits, such as SERVER_SECURITY and
> RM_CONTROL_VALID, are not copied.
>
> Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks!