libcli/smb: there's no PID field in the SMB2/3 header anymore
authorStefan Metzmacher <metze@samba.org>
Wed, 25 Jul 2012 08:58:34 +0000 (10:58 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 25 Jul 2012 10:15:05 +0000 (12:15 +0200)
It's a reserved field...

metze

14 files changed:
libcli/smb/smb2cli_close.c
libcli/smb/smb2cli_create.c
libcli/smb/smb2cli_flush.c
libcli/smb/smb2cli_ioctl.c
libcli/smb/smb2cli_query_directory.c
libcli/smb/smb2cli_query_info.c
libcli/smb/smb2cli_read.c
libcli/smb/smb2cli_session.c
libcli/smb/smb2cli_set_info.c
libcli/smb/smb2cli_write.c
libcli/smb/smbXcli_base.c
libcli/smb/smbXcli_base.h
source3/libsmb/smb2cli_tcon.c
source4/libcli/smb2/transport.c

index 05877702baacff328f1efc1399a8cd60bed14d8f..fbeee5514c0ef4991fc899cbf250b237b02f0740 100644 (file)
@@ -57,7 +57,6 @@ struct tevent_req *smb2cli_close_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CLOSE,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 350c2e508152d656352db7043fa987764ce826b6..4d264efb575a85db226c4e3f046607d975bb9cc9 100644 (file)
@@ -140,7 +140,6 @@ struct tevent_req *smb2cli_create_send(
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CREATE,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 60ae04da4019d71eafee5d4d35452ee6299bc77e..a280e15e13789db31eafa0bb6a6c5aeb2f52e568 100644 (file)
@@ -55,7 +55,6 @@ struct tevent_req *smb2cli_flush_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_FLUSH,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 751f26dacff34951620d789ca49eaabdfd73e879..687c9d5110b867bdb6a51e287d28445ed1264253 100644 (file)
@@ -136,7 +136,6 @@ struct tevent_req *smb2cli_ioctl_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_IOCTL,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 781efbd06640dfce87c5cc5f3d02035fa95583c1..327837835a87b2806c8eda85eec8a35cd6463159 100644 (file)
@@ -90,7 +90,6 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_FIND,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index b1664c15854f8508b4edf691827dc3405867fb38..80cec9c3cc9a066a600f168f23fece6b6c541249 100644 (file)
@@ -93,7 +93,6 @@ struct tevent_req *smb2cli_query_info_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_GETINFO,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 35298876bd4400c66855178baeb94decd97e7e36..e808b0ca1ed4c052ea4b97c9150780444e1504ea 100644 (file)
@@ -69,7 +69,6 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_READ,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 946e02cd4829074b7c7350b835fcc9bd670482a4..d34fbd4fe62b40fce5d42dc2d957eebb776058ef 100644 (file)
@@ -99,7 +99,6 @@ struct tevent_req *smb2cli_session_setup_send(TALLOC_CTX *mem_ctx,
                                  conn, SMB2_OP_SESSSETUP,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF,
                                  NULL, /* tcon */
                                  session,
                                  state->fixed, sizeof(state->fixed),
@@ -256,7 +255,6 @@ struct tevent_req *smb2cli_logoff_send(TALLOC_CTX *mem_ctx,
                                  conn, SMB2_OP_LOGOFF,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  NULL, /* tcon */
                                  session,
                                  state->fixed, sizeof(state->fixed),
index e7464e65e8a9a883d914f9e46c20cfab16b4702d..41fe83e211e6df5a759be3ae6a95633c5e1c5936 100644 (file)
@@ -85,7 +85,6 @@ struct tevent_req *smb2cli_set_info_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_SETINFO,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 60182c6c138b0f7fea8bb6059395f44a970e6343..a149924e573cf7d0549df86748c339a97845e2f1 100644 (file)
@@ -78,7 +78,6 @@ struct tevent_req *smb2cli_write_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_WRITE,
                                  0, 0, /* flags */
                                  timeout_msec,
-                                 0xFEFF, /* pid */
                                  tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
index 1b1b92aa0383290e78bc020895bdd121a67299e0..275dfed32c1f5889376edca648656801cbb5e040 100644 (file)
@@ -2365,7 +2365,6 @@ static bool smb2cli_req_cancel(struct tevent_req *req)
                tevent_req_data(req,
                struct smbXcli_req_state);
        uint32_t flags = IVAL(state->smb2.hdr, SMB2_HDR_FLAGS);
-       uint32_t pid = IVAL(state->smb2.hdr, SMB2_HDR_PID);
        uint64_t mid = BVAL(state->smb2.hdr, SMB2_HDR_MESSAGE_ID);
        uint64_t aid = BVAL(state->smb2.hdr, SMB2_HDR_ASYNC_ID);
        struct smbXcli_tcon *tcon = state->tcon;
@@ -2384,7 +2383,7 @@ static bool smb2cli_req_cancel(struct tevent_req *req)
                                    SMB2_OP_CANCEL,
                                    flags, 0,
                                    0, /* timeout */
-                                   pid, tcon, session,
+                                   tcon, session,
                                    fixed, fixed_len,
                                    NULL, 0);
        if (subreq == NULL) {
@@ -2397,7 +2396,6 @@ static bool smb2cli_req_cancel(struct tevent_req *req)
        }
 
        SIVAL(substate->smb2.hdr, SMB2_HDR_FLAGS, flags);
-       SIVAL(substate->smb2.hdr, SMB2_HDR_PID, pid);
        SBVAL(substate->smb2.hdr, SMB2_HDR_MESSAGE_ID, mid);
        SBVAL(substate->smb2.hdr, SMB2_HDR_ASYNC_ID, aid);
 
@@ -2425,7 +2423,6 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
                                      uint32_t additional_flags,
                                      uint32_t clear_flags,
                                      uint32_t timeout_msec,
-                                     uint32_t pid,
                                      struct smbXcli_tcon *tcon,
                                      struct smbXcli_session *session,
                                      const uint8_t *fixed,
@@ -2500,7 +2497,7 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
        SSVAL(state->smb2.hdr, SMB2_HDR_LENGTH,         SMB2_HDR_BODY);
        SSVAL(state->smb2.hdr, SMB2_HDR_OPCODE,         cmd);
        SIVAL(state->smb2.hdr, SMB2_HDR_FLAGS,          flags);
-       SIVAL(state->smb2.hdr, SMB2_HDR_PID,            pid);
+       SIVAL(state->smb2.hdr, SMB2_HDR_PID,            0); /* reserved */
        SIVAL(state->smb2.hdr, SMB2_HDR_TID,            tid);
        SBVAL(state->smb2.hdr, SMB2_HDR_SESSION_ID,     uid);
 
@@ -2799,7 +2796,6 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
                                    uint32_t additional_flags,
                                    uint32_t clear_flags,
                                    uint32_t timeout_msec,
-                                   uint32_t pid,
                                    struct smbXcli_tcon *tcon,
                                    struct smbXcli_session *session,
                                    const uint8_t *fixed,
@@ -2813,7 +2809,7 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
        req = smb2cli_req_create(mem_ctx, ev, conn, cmd,
                                 additional_flags, clear_flags,
                                 timeout_msec,
-                                pid, tcon, session,
+                                tcon, session,
                                 fixed, fixed_len, dyn, dyn_len);
        if (req == NULL) {
                return NULL;
@@ -4004,7 +4000,7 @@ static struct tevent_req *smbXcli_negprot_smb2_subreq(struct smbXcli_negprot_sta
                                state->conn, SMB2_OP_NEGPROT,
                                0, 0, /* flags */
                                state->timeout_msec,
-                               0xFEFF, NULL, NULL, /* pid, tcon, session */
+                               NULL, NULL, /* tcon, session */
                                state->smb2.fixed, sizeof(state->smb2.fixed),
                                state->smb2.dyn, dialect_count*2);
 }
index 0260ab64a7a8a53e6bc67811a2876a4e9a99bbbb..5c524b0ec862f0e68dcf5fafa03375b69fd2d9d9 100644 (file)
@@ -200,7 +200,6 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
                                      uint32_t additional_flags,
                                      uint32_t clear_flags,
                                      uint32_t timeout_msec,
-                                     uint32_t pid,
                                      struct smbXcli_tcon *tcon,
                                      struct smbXcli_session *session,
                                      const uint8_t *fixed,
@@ -224,7 +223,6 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
                                    uint32_t additional_flags,
                                    uint32_t clear_flags,
                                    uint32_t timeout_msec,
-                                   uint32_t pid,
                                    struct smbXcli_tcon *tcon,
                                    struct smbXcli_session *session,
                                    const uint8_t *fixed,
index d2607824ff1327856edad4eb8b2a2ca141b7704a..2a37088885fce0728d04df66c68f2063d7c22e1c 100644 (file)
@@ -84,7 +84,6 @@ struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TCON,
                                  0, 0, /* flags */
                                  cli->timeout,
-                                 cli->smb2.pid,
                                  NULL, /* tcon */
                                  cli->smb2.session,
                                  state->fixed, sizeof(state->fixed),
@@ -210,7 +209,6 @@ struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
        subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TDIS,
                                  0, 0, /* flags */
                                  cli->timeout,
-                                 cli->smb2.pid,
                                  cli->smb2.tcon,
                                  cli->smb2.session,
                                  state->fixed, sizeof(state->fixed),
index 423b634765971e0ff05c48dbda35f4d1410bfee8..b99299e31e4e7a539d71ebbad612d22618517976 100644 (file)
@@ -115,7 +115,6 @@ void smb2_transport_send(struct smb2_request *req)
        uint16_t cmd = SVAL(req->out.hdr, SMB2_HDR_OPCODE);
        uint32_t additional_flags = IVAL(req->out.hdr, SMB2_HDR_FLAGS);
        uint32_t clear_flags = 0;
-       uint32_t pid = IVAL(req->out.hdr, SMB2_HDR_PID);
        struct smbXcli_tcon *tcon = NULL;
        struct smbXcli_session *session = NULL;
        bool need_pending_break = false;
@@ -147,7 +146,6 @@ void smb2_transport_send(struct smb2_request *req)
                                            0, /* additional_flags */
                                            0, /*clear_flags */
                                            0, /* timeout_msec */
-                                           0, /* pid */
                                            NULL, /* tcon */
                                            NULL, /* session */
                                            NULL, /* body */
@@ -189,7 +187,6 @@ void smb2_transport_send(struct smb2_request *req)
                                         additional_flags,
                                         clear_flags,
                                         timeout_msec,
-                                        pid,
                                         tcon,
                                         session,
                                         body.data, body.length,
@@ -345,7 +342,6 @@ static void smb2_transport_break_handler(struct tevent_req *subreq)
                                    0, /* additional_flags */
                                    0, /*clear_flags */
                                    0, /* timeout_msec */
-                                   0, /* pid */
                                    NULL, /* tcon */
                                    NULL, /* session */
                                    NULL, /* body */