From 028f1810357ae957bed2ebf332977d768eff89d8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Aug 2016 13:33:30 -0700 Subject: [PATCH] s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_mkdir_send(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni (cherry picked from commit 3081604734a9531cefa71d0417a6fbfee9a6a8b6) --- source3/libsmb/clifile.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index f5111f4e29f..faabaeba59a 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -1590,6 +1590,7 @@ struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx, struct tevent_req *req = NULL, *subreq = NULL; struct cli_mkdir_state *state = NULL; uint8_t additional_flags = 0; + uint16_t additional_flags2 = 0; uint8_t *bytes = NULL; req = tevent_req_create(mem_ctx, &state, struct cli_mkdir_state); @@ -1609,8 +1610,13 @@ struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - subreq = cli_smb_send(state, ev, cli, SMBmkdir, additional_flags, 0, - 0, NULL, talloc_get_size(bytes), bytes); + if (clistr_is_previous_version_path(dname)) { + additional_flags2 = FLAGS2_REPARSE_PATH; + } + + subreq = cli_smb_send(state, ev, cli, SMBmkdir, additional_flags, + additional_flags2, + 0, NULL, talloc_get_size(bytes), bytes); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } -- 2.11.4.GIT