s3: smbd: Posix ACLs. Now we know we have a handle, always use VFS_FCHMOD instead...
authorJeremy Allison <jra@samba.org>
Thu, 20 Jun 2019 18:43:17 +0000 (11:43 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 24 Jun 2019 18:49:10 +0000 (18:49 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/posix_acls.c

index 4393ef72de4f54cd54f8c57ca9a764011379f772..e0df84bc3f04c372aa1711826053017c2be7aee9 100644 (file)
@@ -3952,8 +3952,7 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct
                        if (set_acl_as_root) {
                                become_root();
                        }
-                       sret = SMB_VFS_CHMOD(conn, fsp->fsp_name,
-                                            posix_perms);
+                       sret = SMB_VFS_FCHMOD(fsp, posix_perms);
                        if (set_acl_as_root) {
                                unbecome_root();
                        }
@@ -3966,9 +3965,7 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct
                                                 fsp_str_dbg(fsp)));
 
                                        become_root();
-                                       sret = SMB_VFS_CHMOD(conn,
-                                           fsp->fsp_name,
-                                           posix_perms);
+                                       sret = SMB_VFS_FCHMOD(fsp, posix_perms);
                                        unbecome_root();
                                }