Re: [PATCH v3] ksmbd: grant a caller what its groups and OWNER RIGHTS ACEs allow
From: Namjae Jeon
Date: Wed Nov 04 2026 - 03:44:49 EST
> @@ -1531,7 +1557,12 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
> goto err_out;
> }
>
> - if (*pdaccess & FILE_MAXIMAL_ACCESS_LE) {
> + /*
> + * Evaluate the DACL in order (MS-DTYP 2.5.3.2). MAXIMUM_ALLOWED takes
> + * its result, and so does a caller that only group or OWNER RIGHTS
> + * ACEs name.
> + */
> + {
Please remove the redundant braces and unindent this block, as there
are no local declarations requiring a separate scope.
The rest looks good.
Thanks.
> ace = (struct smb_ace *)((char *)pdacl + sizeof(struct smb_acl));
> aces_size = pdacl_size - sizeof(struct smb_acl);
> for (i = 0; i < le16_to_cpu(pdacl->num_aces); i++) {