diff options
-rw-r--r-- | libcli/smb/smb2cli_query_info.c | 11 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 4 | ||||
-rw-r--r-- | source3/torture/test_smb2.c | 10 |
3 files changed, 15 insertions, 10 deletions
diff --git a/libcli/smb/smb2cli_query_info.c b/libcli/smb/smb2cli_query_info.c index 30766e4d4e..b5d9e791aa 100644 --- a/libcli/smb/smb2cli_query_info.c +++ b/libcli/smb/smb2cli_query_info.c @@ -38,7 +38,7 @@ struct tevent_req *smb2cli_query_info_send(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint8_t in_info_type, uint8_t in_file_info_class, uint32_t in_max_output_length, @@ -55,6 +55,7 @@ struct tevent_req *smb2cli_query_info_send(TALLOC_CTX *mem_ctx, size_t dyn_len; uint16_t input_buffer_offset = 0; uint32_t input_buffer_length = 0; + uint32_t tcon_id = 0; req = tevent_req_create(mem_ctx, &state, struct smb2cli_query_info_state); @@ -90,6 +91,10 @@ struct tevent_req *smb2cli_query_info_send(TALLOC_CTX *mem_ctx, dyn_len = sizeof(state->dyn_pad); } + if (tcon) { + tcon_id = smb2cli_tcon_current_id(tcon); + } + subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_GETINFO, 0, 0, /* flags */ timeout_msec, @@ -198,7 +203,7 @@ NTSTATUS smb2cli_query_info_recv(struct tevent_req *req, NTSTATUS smb2cli_query_info(struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint8_t in_info_type, uint8_t in_file_info_class, uint32_t in_max_output_length, @@ -228,7 +233,7 @@ NTSTATUS smb2cli_query_info(struct smbXcli_conn *conn, } req = smb2cli_query_info_send(frame, ev, conn, timeout_msec, - session, tcon_id, + session, tcon, in_info_type, in_file_info_class, in_max_output_length, diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index 67ffe1d746..75948be6fb 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -468,7 +468,7 @@ struct tevent_req *smb2cli_query_info_send(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint8_t in_info_type, uint8_t in_file_info_class, uint32_t in_max_output_length, @@ -483,7 +483,7 @@ NTSTATUS smb2cli_query_info_recv(struct tevent_req *req, NTSTATUS smb2cli_query_info(struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint8_t in_info_type, uint8_t in_file_info_class, uint32_t in_max_output_length, diff --git a/source3/torture/test_smb2.c b/source3/torture/test_smb2.c index a487beafb3..a03e1cf985 100644 --- a/source3/torture/test_smb2.c +++ b/source3/torture/test_smb2.c @@ -1627,7 +1627,7 @@ bool run_smb2_session_reauth(int dummy) status = smb2cli_query_info(cli->conn, cli->timeout, cli->smb2.session, - cli->smb2.tid, + cli->smb2.tcon, SMB2_GETINFO_SECURITY, 0, /* in_file_info_class */ 1024, /* in_max_output_length */ @@ -1647,7 +1647,7 @@ bool run_smb2_session_reauth(int dummy) status = smb2cli_query_info(cli->conn, cli->timeout, cli->smb2.session, - cli->smb2.tid, + cli->smb2.tcon, SMB2_GETINFO_FILE, in_file_info_class, 1024, /* in_max_output_length */ @@ -1764,7 +1764,7 @@ bool run_smb2_session_reauth(int dummy) status = smb2cli_query_info(cli->conn, cli->timeout, cli->smb2.session, - cli->smb2.tid, + cli->smb2.tcon, SMB2_GETINFO_SECURITY, 0, /* in_file_info_class */ 1024, /* in_max_output_length */ @@ -1784,7 +1784,7 @@ bool run_smb2_session_reauth(int dummy) status = smb2cli_query_info(cli->conn, cli->timeout, cli->smb2.session, - cli->smb2.tid, + cli->smb2.tcon, SMB2_GETINFO_FILE, in_file_info_class, 1024, /* in_max_output_length */ @@ -1823,7 +1823,7 @@ bool run_smb2_session_reauth(int dummy) status = smb2cli_query_info(cli->conn, cli->timeout, cli->smb2.session, - cli->smb2.tid, + cli->smb2.tcon, SMB2_GETINFO_FILE, in_file_info_class, 1024, /* in_max_output_length */ |