1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

libcli/smb: there's no PID field in the SMB2/3 header anymore

It's a reserved field...

metze
This commit is contained in:
Stefan Metzmacher 2012-07-25 10:58:34 +02:00
parent 7de4ae7f9f
commit 56aa419d87
14 changed files with 4 additions and 27 deletions

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CLOSE,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View File

@ -140,7 +140,6 @@ struct tevent_req *smb2cli_create_send(
subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CREATE, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CREATE,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_FLUSH,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_IOCTL,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_FIND,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_GETINFO,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_READ,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View File

@ -99,7 +99,6 @@ struct tevent_req *smb2cli_session_setup_send(TALLOC_CTX *mem_ctx,
conn, SMB2_OP_SESSSETUP, conn, SMB2_OP_SESSSETUP,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF,
NULL, /* tcon */ NULL, /* tcon */
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),
@ -256,7 +255,6 @@ struct tevent_req *smb2cli_logoff_send(TALLOC_CTX *mem_ctx,
conn, SMB2_OP_LOGOFF, conn, SMB2_OP_LOGOFF,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
NULL, /* tcon */ NULL, /* tcon */
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_SETINFO,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View 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, subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_WRITE,
0, 0, /* flags */ 0, 0, /* flags */
timeout_msec, timeout_msec,
0xFEFF, /* pid */
tcon, tcon,
session, session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View File

@ -2365,7 +2365,6 @@ static bool smb2cli_req_cancel(struct tevent_req *req)
tevent_req_data(req, tevent_req_data(req,
struct smbXcli_req_state); struct smbXcli_req_state);
uint32_t flags = IVAL(state->smb2.hdr, SMB2_HDR_FLAGS); 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 mid = BVAL(state->smb2.hdr, SMB2_HDR_MESSAGE_ID);
uint64_t aid = BVAL(state->smb2.hdr, SMB2_HDR_ASYNC_ID); uint64_t aid = BVAL(state->smb2.hdr, SMB2_HDR_ASYNC_ID);
struct smbXcli_tcon *tcon = state->tcon; struct smbXcli_tcon *tcon = state->tcon;
@ -2384,7 +2383,7 @@ static bool smb2cli_req_cancel(struct tevent_req *req)
SMB2_OP_CANCEL, SMB2_OP_CANCEL,
flags, 0, flags, 0,
0, /* timeout */ 0, /* timeout */
pid, tcon, session, tcon, session,
fixed, fixed_len, fixed, fixed_len,
NULL, 0); NULL, 0);
if (subreq == NULL) { 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_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_MESSAGE_ID, mid);
SBVAL(substate->smb2.hdr, SMB2_HDR_ASYNC_ID, aid); 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 additional_flags,
uint32_t clear_flags, uint32_t clear_flags,
uint32_t timeout_msec, uint32_t timeout_msec,
uint32_t pid,
struct smbXcli_tcon *tcon, struct smbXcli_tcon *tcon,
struct smbXcli_session *session, struct smbXcli_session *session,
const uint8_t *fixed, 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_LENGTH, SMB2_HDR_BODY);
SSVAL(state->smb2.hdr, SMB2_HDR_OPCODE, cmd); SSVAL(state->smb2.hdr, SMB2_HDR_OPCODE, cmd);
SIVAL(state->smb2.hdr, SMB2_HDR_FLAGS, flags); 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); SIVAL(state->smb2.hdr, SMB2_HDR_TID, tid);
SBVAL(state->smb2.hdr, SMB2_HDR_SESSION_ID, uid); 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 additional_flags,
uint32_t clear_flags, uint32_t clear_flags,
uint32_t timeout_msec, uint32_t timeout_msec,
uint32_t pid,
struct smbXcli_tcon *tcon, struct smbXcli_tcon *tcon,
struct smbXcli_session *session, struct smbXcli_session *session,
const uint8_t *fixed, 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, req = smb2cli_req_create(mem_ctx, ev, conn, cmd,
additional_flags, clear_flags, additional_flags, clear_flags,
timeout_msec, timeout_msec,
pid, tcon, session, tcon, session,
fixed, fixed_len, dyn, dyn_len); fixed, fixed_len, dyn, dyn_len);
if (req == NULL) { if (req == NULL) {
return NULL; return NULL;
@ -4004,7 +4000,7 @@ static struct tevent_req *smbXcli_negprot_smb2_subreq(struct smbXcli_negprot_sta
state->conn, SMB2_OP_NEGPROT, state->conn, SMB2_OP_NEGPROT,
0, 0, /* flags */ 0, 0, /* flags */
state->timeout_msec, state->timeout_msec,
0xFEFF, NULL, NULL, /* pid, tcon, session */ NULL, NULL, /* tcon, session */
state->smb2.fixed, sizeof(state->smb2.fixed), state->smb2.fixed, sizeof(state->smb2.fixed),
state->smb2.dyn, dialect_count*2); state->smb2.dyn, dialect_count*2);
} }

View File

@ -200,7 +200,6 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
uint32_t additional_flags, uint32_t additional_flags,
uint32_t clear_flags, uint32_t clear_flags,
uint32_t timeout_msec, uint32_t timeout_msec,
uint32_t pid,
struct smbXcli_tcon *tcon, struct smbXcli_tcon *tcon,
struct smbXcli_session *session, struct smbXcli_session *session,
const uint8_t *fixed, const uint8_t *fixed,
@ -224,7 +223,6 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
uint32_t additional_flags, uint32_t additional_flags,
uint32_t clear_flags, uint32_t clear_flags,
uint32_t timeout_msec, uint32_t timeout_msec,
uint32_t pid,
struct smbXcli_tcon *tcon, struct smbXcli_tcon *tcon,
struct smbXcli_session *session, struct smbXcli_session *session,
const uint8_t *fixed, const uint8_t *fixed,

View 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, subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TCON,
0, 0, /* flags */ 0, 0, /* flags */
cli->timeout, cli->timeout,
cli->smb2.pid,
NULL, /* tcon */ NULL, /* tcon */
cli->smb2.session, cli->smb2.session,
state->fixed, sizeof(state->fixed), 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, subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TDIS,
0, 0, /* flags */ 0, 0, /* flags */
cli->timeout, cli->timeout,
cli->smb2.pid,
cli->smb2.tcon, cli->smb2.tcon,
cli->smb2.session, cli->smb2.session,
state->fixed, sizeof(state->fixed), state->fixed, sizeof(state->fixed),

View File

@ -115,7 +115,6 @@ void smb2_transport_send(struct smb2_request *req)
uint16_t cmd = SVAL(req->out.hdr, SMB2_HDR_OPCODE); uint16_t cmd = SVAL(req->out.hdr, SMB2_HDR_OPCODE);
uint32_t additional_flags = IVAL(req->out.hdr, SMB2_HDR_FLAGS); uint32_t additional_flags = IVAL(req->out.hdr, SMB2_HDR_FLAGS);
uint32_t clear_flags = 0; uint32_t clear_flags = 0;
uint32_t pid = IVAL(req->out.hdr, SMB2_HDR_PID);
struct smbXcli_tcon *tcon = NULL; struct smbXcli_tcon *tcon = NULL;
struct smbXcli_session *session = NULL; struct smbXcli_session *session = NULL;
bool need_pending_break = false; bool need_pending_break = false;
@ -147,7 +146,6 @@ void smb2_transport_send(struct smb2_request *req)
0, /* additional_flags */ 0, /* additional_flags */
0, /*clear_flags */ 0, /*clear_flags */
0, /* timeout_msec */ 0, /* timeout_msec */
0, /* pid */
NULL, /* tcon */ NULL, /* tcon */
NULL, /* session */ NULL, /* session */
NULL, /* body */ NULL, /* body */
@ -189,7 +187,6 @@ void smb2_transport_send(struct smb2_request *req)
additional_flags, additional_flags,
clear_flags, clear_flags,
timeout_msec, timeout_msec,
pid,
tcon, tcon,
session, session,
body.data, body.length, body.data, body.length,
@ -345,7 +342,6 @@ static void smb2_transport_break_handler(struct tevent_req *subreq)
0, /* additional_flags */ 0, /* additional_flags */
0, /*clear_flags */ 0, /*clear_flags */
0, /* timeout_msec */ 0, /* timeout_msec */
0, /* pid */
NULL, /* tcon */ NULL, /* tcon */
NULL, /* session */ NULL, /* session */
NULL, /* body */ NULL, /* body */