mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
s3: libsmb: Call cli_dfs_target_check() from cli_ntrename_internal_send().
Currently we don't pass MSDFS names as targets here, but a caller
may erroneously do this later, and for non-DFS names this is a no-op.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14169
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
(cherry picked from commit cf3e572442
)
This commit is contained in:
parent
fdd645fa70
commit
9de91537f3
@ -1518,6 +1518,7 @@ static struct tevent_req *cli_ntrename_internal_send(TALLOC_CTX *mem_ctx,
|
||||
uint8_t additional_flags = 0;
|
||||
uint16_t additional_flags2 = 0;
|
||||
uint8_t *bytes = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
req = tevent_req_create(mem_ctx, &state,
|
||||
struct cli_ntrename_internal_state);
|
||||
@ -1525,6 +1526,18 @@ static struct tevent_req *cli_ntrename_internal_send(TALLOC_CTX *mem_ctx,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Strip a MSDFS path from fname_dst if we were given one.
|
||||
*/
|
||||
status = cli_dfs_target_check(state,
|
||||
cli,
|
||||
fname_src,
|
||||
fname_dst,
|
||||
&fname_dst);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
|
||||
SSVAL(state->vwv+0, 0 ,FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY);
|
||||
SSVAL(state->vwv+1, 0, rename_flag);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user