From: Christof Schmitt Date: Tue, 29 Nov 2022 23:51:10 +0000 (-0700) Subject: nfs4_acl: Add comment for setting ACL as root X-Git-Tag: talloc-2.4.0~420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cffe96ef6132966305c640a329ed91f0f9514452;p=thirdparty%2Fsamba.git 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 --- 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)) {