s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_openx_create().
authorJeremy Allison <jra@samba.org>
Thu, 18 Aug 2016 20:59:52 +0000 (13:59 -0700)
committerUri Simchoni <uri@samba.org>
Fri, 19 Aug 2016 18:03:12 +0000 (20:03 +0200)
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>
source3/libsmb/clifile.c

index d994157ee98e5dd96fae73ee09f91e80499c26e9..593cdea78c8403cb1555ac724068fd3de27938a1 100644 (file)
@@ -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;