mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +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:
parent
7de4ae7f9f
commit
56aa419d87
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user