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_smb2_hardlink_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 4bdbe3c2fc
)
This commit is contained in:
parent
62ce0c8f55
commit
9612286959
@ -1682,12 +1682,26 @@ static struct tevent_req *cli_smb2_hardlink_send(
|
|||||||
{
|
{
|
||||||
struct tevent_req *req = NULL, *subreq = NULL;
|
struct tevent_req *req = NULL, *subreq = NULL;
|
||||||
struct cli_smb2_hardlink_state *state = NULL;
|
struct cli_smb2_hardlink_state *state = NULL;
|
||||||
|
NTSTATUS status;
|
||||||
|
|
||||||
req = tevent_req_create(
|
req = tevent_req_create(
|
||||||
mem_ctx, &state, struct cli_smb2_hardlink_state);
|
mem_ctx, &state, struct cli_smb2_hardlink_state);
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
return NULL;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
state->ev = ev;
|
state->ev = ev;
|
||||||
state->cli = cli;
|
state->cli = cli;
|
||||||
state->fname_dst = fname_dst;
|
state->fname_dst = fname_dst;
|
||||||
|
Loading…
Reference in New Issue
Block a user