]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nfs4_acl: Add comment for setting ACL as root
authorChristof Schmitt <cs@samba.org>
Tue, 29 Nov 2022 23:51:10 +0000 (16:51 -0700)
committerVolker Lendecke <vl@samba.org>
Fri, 2 Dec 2022 08:02:13 +0000 (08:02 +0000)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Dec  2 08:02:13 UTC 2022 on sn-devel-184

source3/modules/nfs4_acls.c

index 23449ccc35606aac5efb9af94c515511df62b8e0..2daae9900428cf907e373af1fd06cc1333a135f3 100644 (file)
@@ -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)) {