From cffe96ef6132966305c640a329ed91f0f9514452 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Tue, 29 Nov 2022 16:51:10 -0700 Subject: [PATCH] nfs4_acl: Add comment for setting ACL as root Signed-off-by: Christof Schmitt Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Dec 2 08:02:13 UTC 2022 on sn-devel-184 --- source3/modules/nfs4_acls.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 23449ccc356..2daae990042 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -1017,6 +1017,14 @@ NTSTATUS smb_set_nt_acl_nfs4(vfs_handle_struct *handle, files_struct *fsp, is_directory = S_ISDIR(fsp->fsp_name->st.st_ex_mode); if (pparams->do_chown) { + /* + * When the chown succeeds, the special entries in the + * file system ACL refer to the new owner. In order to + * apply the complete information from the DACL, + * setting the ACL then has to succeed. Track this + * case with set_acl_as_root and set the ACL as root + * accordingly. + */ status = chown_if_needed(fsp, security_info_sent, psd, &set_acl_as_root); if (!NT_STATUS_IS_OK(status)) { -- 2.11.4.GIT