s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_getatr_send().
authorJeremy Allison <jra@samba.org>
Thu, 18 Aug 2016 21:02:24 +0000 (14:02 -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 593cdea78c8403cb1555ac724068fd3de27938a1..cfe8856cd7458d9394efbb4f68308996a2098338 100644 (file)
@@ -3743,6 +3743,7 @@ struct tevent_req *cli_getatr_send(TALLOC_CTX *mem_ctx,
        struct tevent_req *req = NULL, *subreq = NULL;
        struct cli_getatr_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_getatr_state);
@@ -3764,8 +3765,13 @@ struct tevent_req *cli_getatr_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBgetatr, 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, SMBgetatr, additional_flags,
+                       additional_flags2,
+                       0, NULL, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }