summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-08-18 13:59:52 -0700
committerUri Simchoni <uri@samba.org>2016-08-19 20:03:12 +0200
commit47c1314429cdf516358d5e00ca24c313ddab67b0 (patch)
treeb05fa6e1bad9883cab7e3fbe39f7c629bb82a59e /source3/libsmb/clifile.c
parentd7ee917b165da2695433b7b115363223f2bd214f (diff)
downloadsamba-47c1314429cdf516358d5e00ca24c313ddab67b0.tar.gz
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_openx_create().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r--source3/libsmb/clifile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index d994157ee98..593cdea78c8 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -2440,6 +2440,7 @@ struct tevent_req *cli_openx_create(TALLOC_CTX *mem_ctx,
unsigned openfn;
unsigned accessmode;
uint8_t additional_flags;
+ uint16_t additional_flags2 = 0;
uint8_t *bytes;
req = tevent_req_create(mem_ctx, &state, struct cli_openx_state);
@@ -2507,11 +2508,15 @@ struct tevent_req *cli_openx_create(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
+ if (clistr_is_previous_version_path(fname)) {
+ additional_flags2 = FLAGS2_REPARSE_PATH;
+ }
+
state->bytes.iov_base = (void *)bytes;
state->bytes.iov_len = talloc_get_size(bytes);
subreq = cli_smb_req_create(state, ev, cli, SMBopenX, additional_flags,
- 0, 15, state->vwv, 1, &state->bytes);
+ additional_flags2, 15, state->vwv, 1, &state->bytes);
if (subreq == NULL) {
TALLOC_FREE(req);
return NULL;