mirror of
https://github.com/samba-team/samba.git
synced 2025-02-01 05:47:28 +03:00
s3: smbd: reply_copy(), is_visible_file() -> is_visible_fsp().
Offtopic, the function reply_copy() is insane and should be removed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
5987fab76f
commit
12cb13691e
@ -8972,15 +8972,6 @@ void reply_copy(struct smb_request *req)
|
||||
continue;
|
||||
}
|
||||
|
||||
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);
|
||||
@ -9025,6 +9016,23 @@ void reply_copy(struct smb_request *req)
|
||||
TALLOC_FREE(smb_fname_dst->base_name);
|
||||
smb_fname_dst->base_name = destname;
|
||||
|
||||
ZERO_STRUCT(smb_fname_src->st);
|
||||
vfs_stat(conn, smb_fname_src);
|
||||
|
||||
status = openat_pathref_fsp(conn->cwd_fsp,
|
||||
smb_fname_src);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DBG_INFO("openat_pathref_fsp [%s] failed: %s\n",
|
||||
smb_fname_str_dbg(smb_fname_src),
|
||||
nt_errstr(status));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!is_visible_fsp(smb_fname_src->fsp, false)) {
|
||||
TALLOC_FREE(talloced);
|
||||
continue;
|
||||
}
|
||||
|
||||
status = check_name(conn, smb_fname_src);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(dir_hnd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user