Re: [PATCH v2] ksmbd: omit the DACL flags when the query omits the DACL
From: Namjae Jeon
Date: Thu Nov 19 2026 - 06:27:53 EST
On Thu, Nov 19, 2026 at 3:57 PM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> A client can query a file's owner or group without requesting its
> DACL. ksmbd leaves the DACL out of that reply but copies the control
> flags from the stored security descriptor.
>
> The reply then has DACL_PRESENT set with a zero DACL offset. That
> combination describes a NULL DACL, rather than saying that the client
> did not request DACL information. The reply can also claim that the
> omitted DACL is protected or auto-inherited. These flags are wrong only
> in the reply. The server still enforces the file's stored DACL.
>
> When the query omits the DACL, clear DACL_PRESENT,
> DACL_AUTO_INHERITED and DACL_PROTECTED from the copied flags. Preserve
> the other control bits, including those describing the owner or group.
>
> 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!