s3: libsmb: Add uint16_t additional_flags2 arg to cli_smb_send().
authorJeremy Allison <jra@samba.org>
Thu, 18 Aug 2016 19:20:25 +0000 (12:20 -0700)
committerUri Simchoni <uri@samba.org>
Fri, 19 Aug 2016 18:03:11 +0000 (20:03 +0200)
Not yet used.

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/include/async_smb.h
source3/libsmb/async_smb.c
source3/libsmb/cliconnect.c
source3/libsmb/clientgen.c
source3/libsmb/clifile.c
source3/libsmb/clilist.c
source3/libsmb/climessage.c
source3/libsmb/clioplock.c

index 00c2313b697506e963dc7e9bf03ddef52bc60e9a..676574972825f2b103b4221a41f1d0586e7d86d2 100644 (file)
@@ -32,7 +32,9 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx,
                                      struct iovec *bytes_iov);
 struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                                struct cli_state *cli,
-                               uint8_t smb_command, uint8_t additional_flags,
+                               uint8_t smb_command,
+                               uint8_t additional_flags,
+                               uint16_t additional_flags2,
                                uint8_t wct, uint16_t *vwv,
                                uint32_t num_bytes,
                                const uint8_t *bytes);
index 8d5c3d4b264f25fb7e1919e0662291e3bd49bdb3..5d9cce12272b380275d71f5a441890ea0741c0a1 100644 (file)
@@ -101,13 +101,13 @@ struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx,
                                struct cli_state *cli,
                                uint8_t smb_command,
                                uint8_t additional_flags,
+                               uint16_t additional_flags2,
                                uint8_t wct, uint16_t *vwv,
                                uint32_t num_bytes,
                                const uint8_t *bytes)
 {
        struct cli_smb_req_state *state;
        uint8_t clear_flags = 0;
-       uint16_t additional_flags2 = 0;
        uint16_t clear_flags2 = 0;
 
        state = talloc_zero(mem_ctx, struct cli_smb_req_state);
index 33759d9d87b52825ee025c1bd8fef088537be6f4..4635cf8cad678349d1c4230ae7fd6ca238d26f31 100644 (file)
@@ -204,7 +204,7 @@ static struct tevent_req *cli_session_setup_lanman2_send(
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBsesssetupX, 0, 10, vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBsesssetupX, 0, 0, 10, vwv,
                              talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -569,7 +569,7 @@ static struct tevent_req *cli_session_setup_plain_send(
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBsesssetupX, 0, 13, vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBsesssetupX, 0, 0, 13, vwv,
                              talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -880,7 +880,7 @@ static struct tevent_req *cli_session_setup_nt1_send(
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBsesssetupX, 0, 13, vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBsesssetupX, 0, 0, 13, vwv,
                              talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -1111,7 +1111,7 @@ static bool cli_sesssetup_blob_next(struct cli_sesssetup_blob_state *state,
        if (state->buf == NULL) {
                return false;
        }
-       subreq = cli_smb_send(state, state->ev, state->cli, SMBsesssetupX, 0,
+       subreq = cli_smb_send(state, state->ev, state->cli, SMBsesssetupX, 0, 0,
                              12, state->vwv,
                              talloc_get_size(state->buf), state->buf);
        if (subreq == NULL) {
@@ -2331,7 +2331,7 @@ static struct tevent_req *cli_ulogoff_send(TALLOC_CTX *mem_ctx,
        SCVAL(state->vwv+1, 0, 0);
        SSVAL(state->vwv+2, 0, 0);
 
-       subreq = cli_smb_send(state, ev, cli, SMBulogoffX, 0, 2, state->vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBulogoffX, 0, 0, 2, state->vwv,
                              0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -2877,7 +2877,7 @@ static struct tevent_req *cli_tdis_send(TALLOC_CTX *mem_ctx,
        }
        state->cli = cli;
 
-       subreq = cli_smb_send(state, ev, cli, SMBtdis, 0, 0, NULL, 0, NULL);
+       subreq = cli_smb_send(state, ev, cli, SMBtdis, 0, 0, 0, NULL, 0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }
@@ -3594,7 +3594,7 @@ static struct tevent_req *cli_raw_tcon_send(
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBtcon, 0, 0, NULL,
+       subreq = cli_smb_send(state, ev, cli, SMBtcon, 0, 0, 0, NULL,
                              talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
index bf31bb17a5705948c45bc50904f7bee8dcb9ecc8..bc5c1b1ce3cd79347a991586c1311f7dc6aa3b0f 100644 (file)
@@ -592,7 +592,7 @@ NTSTATUS cli_smb(TALLOC_CTX *mem_ctx, struct cli_state *cli,
         if (ev == NULL) {
                 goto fail;
         }
-        req = cli_smb_send(mem_ctx, ev, cli, smb_command, additional_flags,
+        req = cli_smb_send(mem_ctx, ev, cli, smb_command, additional_flags, 0,
                           wct, vwv, num_bytes, bytes);
         if (req == NULL) {
                 goto fail;
index 684f26386b6d109e541f8b96e36a52b390b728ff..54d93a73d1e933931e6b1d7db1d0fd277a7b9b10 100644 (file)
@@ -1160,7 +1160,7 @@ struct tevent_req *cli_rename_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBmv, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBmv, additional_flags, 0,
                              1, state->vwv, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -1289,7 +1289,7 @@ static struct tevent_req *cli_ntrename_internal_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBntrename, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBntrename, additional_flags, 0,
                              4, state->vwv, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -1475,7 +1475,7 @@ struct tevent_req *cli_unlink_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBunlink, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBunlink, additional_flags, 0,
                                1, state->vwv, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -1584,7 +1584,7 @@ struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBmkdir, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBmkdir, additional_flags, 0,
                              0, NULL, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -1693,7 +1693,7 @@ struct tevent_req *cli_rmdir_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBrmdir, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBrmdir, additional_flags, 0,
                              0, NULL, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -1948,7 +1948,7 @@ 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, 24, vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBntcreateX, 0, 0, 24, vwv,
                              talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -3032,7 +3032,7 @@ struct tevent_req *cli_unlock_send(TALLOC_CTX *mem_ctx,
        SIVAL(state->data, 2, offset);
        SIVAL(state->data, 6, len);
 
-       subreq = cli_smb_send(state, ev, cli, SMBlockingX, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBlockingX, additional_flags, 0,
                                8, state->vwv, 10, state->data);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -3196,7 +3196,7 @@ struct tevent_req *cli_unlock64_send(TALLOC_CTX *mem_ctx,
        SOFF_T_R(state->data, 4, offset);
        SOFF_T_R(state->data, 12, len);
 
-       subreq = cli_smb_send(state, ev, cli, SMBlockingX, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBlockingX, additional_flags, 0,
                                8, state->vwv, 20, state->data);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -3536,7 +3536,7 @@ struct tevent_req *cli_getattrE_send(TALLOC_CTX *mem_ctx,
        state->zone_offset = smb1cli_conn_server_time_zone(cli->conn);
        SSVAL(state->vwv+0,0,fnum);
 
-       subreq = cli_smb_send(state, ev, cli, SMBgetattrE, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBgetattrE, additional_flags, 0,
                              1, state->vwv, 0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -3706,7 +3706,7 @@ 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,
+       subreq = cli_smb_send(state, ev, cli, SMBgetatr, additional_flags, 0,
                              0, NULL, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -3853,7 +3853,7 @@ struct tevent_req *cli_setattrE_send(TALLOC_CTX *mem_ctx,
        push_dos_date2((uint8_t *)&state->vwv[5], 0, write_time,
                       smb1cli_conn_server_time_zone(cli->conn));
 
-       subreq = cli_smb_send(state, ev, cli, SMBsetattrE, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBsetattrE, additional_flags, 0,
                              7, state->vwv, 0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -3992,7 +3992,7 @@ struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBsetatr, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBsetatr, additional_flags, 0,
                              8, state->vwv, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -4107,7 +4107,7 @@ 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,
+       subreq = cli_smb_send(state, ev, cli, SMBcheckpath, additional_flags, 0,
                              0, NULL, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -4213,7 +4213,7 @@ struct tevent_req *cli_dskattr_send(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBdskattr, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBdskattr, additional_flags, 0,
                              0, NULL, 0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -4412,7 +4412,7 @@ struct tevent_req *cli_ctemp_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, ev, cli, SMBctemp, additional_flags,
+       subreq = cli_smb_send(state, ev, cli, SMBctemp, additional_flags, 0,
                              3, state->vwv, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -5814,7 +5814,7 @@ struct tevent_req *cli_flush_send(TALLOC_CTX *mem_ctx,
        }
        SSVAL(state->vwv + 0, 0, fnum);
 
-       subreq = cli_smb_send(state, ev, cli, SMBflush, 0, 1, state->vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBflush, 0, 0, 1, state->vwv,
                              0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
index 6438d3bce89ba8a23dd7efb1a950acab0b466e48..5f9f89e088f19d238703fd3d2586c7498b6c9de4 100644 (file)
@@ -334,8 +334,8 @@ static struct tevent_req *cli_list_old_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = cli_smb_send(state, state->ev, state->cli, SMBsearch,
-                             0, 2, state->vwv, talloc_get_size(bytes), bytes);
+       subreq = cli_smb_send(state, state->ev, state->cli, SMBsearch, 0, 0,
+                       2, state->vwv, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }
@@ -437,7 +437,7 @@ static void cli_list_old_done(struct tevent_req *subreq)
        if (tevent_req_nomem(bytes, req)) {
                return;
        }
-       subreq = cli_smb_send(state, state->ev, state->cli, cmd, 0,
+       subreq = cli_smb_send(state, state->ev, state->cli, cmd, 0, 0,
                              2, state->vwv, talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return;
index 34fcc1a8076b30e7556afe0de4450779f811fae2..5db010241838074e6290feabc06fc63dcbf0b6b6 100644 (file)
@@ -74,7 +74,7 @@ static struct tevent_req *cli_message_start_send(TALLOC_CTX *mem_ctx,
        TALLOC_FREE(htmp);
        TALLOC_FREE(utmp);
 
-       subreq = cli_smb_send(state, ev, cli, SMBsendstrt, 0, 0, NULL,
+       subreq = cli_smb_send(state, ev, cli, SMBsendstrt, 0, 0, 0, NULL,
                              talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -175,7 +175,7 @@ static struct tevent_req *cli_message_text_send(TALLOC_CTX *mem_ctx,
        memcpy(bytes+3, msg, msglen);
        TALLOC_FREE(tmp);
 
-       subreq = cli_smb_send(state, ev, cli, SMBsendtxt, 0, 1, &state->vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBsendtxt, 0, 0, 1, &state->vwv,
                              talloc_get_size(bytes), bytes);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -226,7 +226,7 @@ static struct tevent_req *cli_message_end_send(TALLOC_CTX *mem_ctx,
 
        SSVAL(&state->vwv, 0, grp);
 
-       subreq = cli_smb_send(state, ev, cli, SMBsendend, 0, 1, &state->vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBsendend, 0, 0, 1, &state->vwv,
                              0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
index 0b19748bf6e4ae691be59927a575ee0c7b60353f..fec40c0c156c6c81765ab56a90349b7c45e0a1a5 100644 (file)
@@ -146,7 +146,7 @@ struct tevent_req *cli_oplock_ack_send(TALLOC_CTX *mem_ctx,
        SSVAL(state->vwv+6, 0, 0); /* unlockcount */
        SSVAL(state->vwv+7, 0, 0); /* lockcount */
 
-       subreq = cli_smb_send(state, ev, cli, SMBlockingX, 0, 8, state->vwv,
+       subreq = cli_smb_send(state, ev, cli, SMBlockingX, 0, 0, 8, state->vwv,
                              0, NULL);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);