Re: [RFC PATCH 2/6] ksmbd: keep named ACL entries effective when a DACL sets a POSIX ACL

From: Ian Bridges

Date: Wed Nov 11 2026 - 11:03:01 EST


Hi Jan,

On Tue, Nov 10, 2026 at 09:02:33AM +0000, Jan Koester wrote:
> + fattr->cf_mode = (fattr->cf_mode & ~0070) |
> + (acl_state.mask.allow << 3);

set_info_sec() seems to only log a failed set_posix_acl() and carry
on, after ksmbd_vfs_remove_acl_xattrs() has removed the old ACL. With
this change, would the chmod that follows then set the group bits to
rwx on a file that has no ACL left, giving the owning group rwx in the
file system?

Could the mode be set first, with the owning group's permissions in
cf_mode rather than the mask? A successful set_posix_acl() would then
set the group bits from the mask entry. Should a failed
set_posix_acl() also be returned rather than only logged?

Thanks,
Ian