s3: modules: Fruit. Now we know we have a handle, always use VFS_FCHMOD instead of...
authorJeremy Allison <jra@samba.org>
Thu, 20 Jun 2019 18:42:42 +0000 (11:42 -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/modules/vfs_fruit.c

index d8e0dbe63e6ea79bb574554aa963d253a5d44f51..9916bd12f5a465a8717a4653690502df58be8fec 100644 (file)
@@ -6379,18 +6379,13 @@ static NTSTATUS fruit_fset_nt_acl(vfs_handle_struct *handle,
        }
 
        if (do_chmod) {
-               if (fsp->fh->fd != -1) {
-                       result = SMB_VFS_FCHMOD(fsp, ms_nfs_mode);
-               } else {
-                       result = SMB_VFS_CHMOD(fsp->conn,
-                                              fsp->fsp_name,
-                                              ms_nfs_mode);
-               }
-
+               result = SMB_VFS_FCHMOD(fsp, ms_nfs_mode);
                if (result != 0) {
-                       DEBUG(1, ("chmod: %s, result: %d, %04o error %s\n", fsp_str_dbg(fsp),
-                                 result, (unsigned)ms_nfs_mode,
-                                 strerror(errno)));
+                       DBG_WARNING("%s, result: %d, %04o error %s\n",
+                               fsp_str_dbg(fsp),
+                               result,
+                               (unsigned)ms_nfs_mode,
+                               strerror(errno));
                        status = map_nt_error_from_unix(errno);
                        TALLOC_FREE(psd);
                        return status;