s3: smbd: rename_internals(), is_visible_file() -> is_visible_fsp().
authorJeremy Allison <jra@samba.org>
Thu, 3 Jun 2021 19:28:37 +0000 (12:28 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/reply.c

index 8027a868706f39c67f52e8dd6d326c564a54e14e..73e9146a969b5d4472883c85c29eb13c7366a5a5 100644 (file)
@@ -8185,15 +8185,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
                        }
                }
 
-               if (!is_visible_file(conn,
-                               dir_hnd,
-                               dname,
-                               &smb_fname_src->st,
-                               false)) {
-                       TALLOC_FREE(talloced);
-                       continue;
-               }
-
                if(!mask_match(dname, fname_src_mask, conn->case_sensitive)) {
                        TALLOC_FREE(talloced);
                        continue;
@@ -8248,6 +8239,11 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
                        break;
                }
 
+               if (!is_visible_fsp(smb_fname_src->fsp, false)) {
+                       TALLOC_FREE(talloced);
+                       continue;
+               }
+
                create_options = 0;
 
                if (S_ISDIR(smb_fname_src->st.st_ex_mode)) {