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

libsmb: Remove smb2 branch from cli_qfileinfo_basic_send

cli_qfileinfo_send now does it

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2024-05-09 10:37:49 +02:00 committed by Jeremy Allison
parent 893e4f6ebf
commit 291a353b16

View File

@ -1307,7 +1307,6 @@ struct cli_qfileinfo_basic_state {
static void cli_qfileinfo_basic_done(struct tevent_req *subreq);
static void cli_qfileinfo_basic_doneE(struct tevent_req *subreq);
static void cli_qfileinfo_basic_done2(struct tevent_req *subreq);
struct tevent_req *cli_qfileinfo_basic_send(
TALLOC_CTX *mem_ctx,
@ -1349,26 +1348,6 @@ struct tevent_req *cli_qfileinfo_basic_send(
return req;
}
if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
subreq = cli_smb2_query_info_fnum_send(
state, /* mem_ctx */
ev, /* ev */
cli, /* cli */
fnum, /* fnum */
SMB2_0_INFO_FILE, /* in_info_type */
FSCC_FILE_ALL_INFORMATION, /* in_file_info_class */
0xFFFF, /* in_max_output_length */
NULL, /* in_input_buffer */
0, /* in_additional_info */
0); /* in_flags */
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
tevent_req_set_callback(
subreq, cli_qfileinfo_basic_done2, req);
return req;
}
subreq = cli_qfileinfo_send(state,
ev,
cli,
@ -1434,40 +1413,6 @@ static void cli_qfileinfo_basic_doneE(struct tevent_req *subreq)
tevent_req_done(req);
}
static void cli_qfileinfo_basic_done2(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
struct cli_qfileinfo_basic_state *state = tevent_req_data(
req, struct cli_qfileinfo_basic_state);
DATA_BLOB outbuf = {0};
NTSTATUS status;
status = cli_smb2_query_info_fnum_recv(subreq, state, &outbuf);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
}
/* Parse the reply. */
if (outbuf.length < 0x60) {
tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
return;
}
state->create_time = interpret_long_date(BVAL(outbuf.data, 0x0));
state->access_time = interpret_long_date(BVAL(outbuf.data, 0x8));
state->write_time = interpret_long_date(BVAL(outbuf.data, 0x10));
state->change_time = interpret_long_date(BVAL(outbuf.data, 0x18));
state->attr = IVAL(outbuf.data, 0x20);
state->size = BVAL(outbuf.data, 0x30);
state->ino = BVAL(outbuf.data, 0x40);
data_blob_free(&outbuf);
tevent_req_done(req);
}
NTSTATUS cli_qfileinfo_basic_recv(
struct tevent_req *req,
uint32_t *attr,