s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_chkpath_send().
authorJeremy Allison <jra@samba.org>
Thu, 18 Aug 2016 21:05:33 +0000 (14:05 -0700)
committerStefan Metzmacher <metze@samba.org>
Sun, 28 Aug 2016 16:12:11 +0000 (18:12 +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>
(cherry picked from commit e2d70551e1ba13119d53afaa00f05e70897484f0)

source3/libsmb/clifile.c

index 826691a03b6606c6a7df1e60390da8193bff0c09..ddaff53cda511f331a45f6e9f45959cbd5aced5c 100644 (file)
@@ -4158,6 +4158,7 @@ struct tevent_req *cli_chkpath_send(TALLOC_CTX *mem_ctx,
        struct tevent_req *req = NULL, *subreq = NULL;
        struct cli_chkpath_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_chkpath_state);
@@ -4177,8 +4178,13 @@ struct tevent_req *cli_chkpath_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBcheckpath, additional_flags, 0,
-                             0, NULL, talloc_get_size(bytes), bytes);
+       if (clistr_is_previous_version_path(fname)) {
+               additional_flags2 = FLAGS2_REPARSE_PATH;
+       }
+
+       subreq = cli_smb_send(state, ev, cli, SMBcheckpath, additional_flags,
+                       additional_flags2,
+                       0, NULL, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }