summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-08-18 13:37:22 -0700
committerUri Simchoni <uri@samba.org>2016-08-19 20:03:12 +0200
commitcd4a60bb1f84891763617f96de148068e0492773 (patch)
treecdfb9aff87211f32f0a97299d21f842092e8a7e1 /source3/libsmb/clifile.c
parent17d1f19eda2c735fcb10a389c3681ccd385bb9c7 (diff)
downloadsamba-cd4a60bb1f84891763617f96de148068e0492773.tar.gz
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntcreate1_send().
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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 2907a6f5866..b63d43a7469 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1943,6 +1943,7 @@ static struct tevent_req *cli_ntcreate1_send(TALLOC_CTX *mem_ctx,
uint16_t *vwv;
uint8_t *bytes;
size_t converted_len;
+ uint16_t additional_flags2 = 0;
req = tevent_req_create(mem_ctx, &state, struct cli_ntcreate1_state);
if (req == NULL) {
@@ -1977,6 +1978,10 @@ static struct tevent_req *cli_ntcreate1_send(TALLOC_CTX *mem_ctx,
fname, strlen(fname)+1,
&converted_len);
+ if (clistr_is_previous_version_path(fname)) {
+ additional_flags2 = FLAGS2_REPARSE_PATH;
+ }
+
/* sigh. this copes with broken netapp filer behaviour */
bytes = smb_bytes_push_str(bytes, smbXcli_conn_use_unicode(cli->conn), "", 1, NULL);
@@ -1986,8 +1991,9 @@ static struct tevent_req *cli_ntcreate1_send(TALLOC_CTX *mem_ctx,
SSVAL(vwv+2, 1, converted_len);
- subreq = cli_smb_send(state, ev, cli, SMBntcreateX, 0, 0, 24, vwv,
- talloc_get_size(bytes), bytes);
+ subreq = cli_smb_send(state, ev, cli, SMBntcreateX, 0,
+ additional_flags2, 24, vwv,
+ talloc_get_size(bytes), bytes);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}