s3/modules: nfs4acl_xattr_fset_nt_acl VFS_SMB_NEXT_CHMOD => VFS_SMB_NEXT_FCHMOD
authorNoel Power <noel.power@suse.com>
Thu, 8 Apr 2021 10:10:54 +0000 (11:10 +0100)
committerNoel Power <npower@samba.org>
Sun, 11 Apr 2021 22:27:34 +0000 (22:27 +0000)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_nfs4acl_xattr.c

index 6cd80018c70b7824ab65895a7ad1ec742d87bed2..e91269cd6898f4af9663f1f14c90ab6018dd765c 100644 (file)
@@ -421,15 +421,9 @@ static NTSTATUS nfs4acl_xattr_fset_nt_acl(vfs_handle_struct *handle,
 
                restored_mode = existing_mode | expected_mode;
 
-               if (fsp_get_io_fd(fsp) != -1) {
-                       ret = SMB_VFS_NEXT_FCHMOD(handle,
-                                                 fsp,
-                                                 restored_mode);
-               } else {
-                       ret = SMB_VFS_NEXT_CHMOD(handle,
-                                                fsp->fsp_name,
-                                                restored_mode);
-               }
+               ret = SMB_VFS_NEXT_FCHMOD(handle,
+                                         fsp,
+                                         restored_mode);
                if (ret != 0) {
                        DBG_ERR("Resetting POSIX mode on [%s] from [0%o]: %s\n",
                                fsp_str_dbg(fsp), existing_mode,