From: Stefan Metzmacher Date: Tue, 8 Jan 2019 14:52:35 +0000 (+0100) Subject: s4:libcli/smb2: align struct smb_ioctl.smb2 to [MS-SMB2] names X-Git-Tag: tdb-1.4.1~593 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97b4e6e220dc3f0b9d7c3f50ef3b867ff2f0b755;p=thirdparty%2Fsamba.git s4:libcli/smb2: align struct smb_ioctl.smb2 to [MS-SMB2] names BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index 43a53f834df..d44c451f650 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -2291,16 +2291,17 @@ union smb_ioctl { /* static body buffer 56 (0x38) bytes */ /* uint16_t buffer_code; 0x39 = 0x38 + 1 */ - uint16_t _pad; + uint16_t reserved; uint32_t function; /*struct smb2_handle handle;*/ /* uint32_t out_ofs; */ /* uint32_t out_size; */ - uint32_t unknown2; + uint32_t max_input_response; /* uint32_t in_ofs; */ /* uint32_t in_size; */ - uint32_t max_response_size; - uint64_t flags; + uint32_t max_output_response; + uint32_t flags; + uint32_t reserved2; /* dynamic body */ DATA_BLOB out; @@ -2311,15 +2312,15 @@ union smb_ioctl { /* static body buffer 48 (0x30) bytes */ /* uint16_t buffer_code; 0x31 = 0x30 + 1 */ - uint16_t _pad; + uint16_t reserved; uint32_t function; /* struct smb2_handle handle; */ /* uint32_t in_ofs; */ /* uint32_t in_size; */ /* uint32_t out_ofs; */ /* uint32_t out_size; */ - uint32_t unknown2; - uint32_t unknown3; + uint32_t flags; + uint32_t reserved2; /* dynamic body */ DATA_BLOB in; diff --git a/source4/libcli/smb2/ioctl.c b/source4/libcli/smb2/ioctl.c index c0a637eb1a7..b37f750f27d 100644 --- a/source4/libcli/smb2/ioctl.c +++ b/source4/libcli/smb2/ioctl.c @@ -46,7 +46,7 @@ struct smb2_request *smb2_ioctl_send(struct smb2_tree *tree, struct smb2_ioctl * return NULL; } - SIVAL(req->out.body, 0x20, io->in.unknown2); + SIVAL(req->out.body, 0x20, io->in.max_input_response); status = smb2_push_o32s32_blob(&req->out, 0x24, io->in.in); if (!NT_STATUS_IS_OK(status)) { @@ -54,7 +54,7 @@ struct smb2_request *smb2_ioctl_send(struct smb2_tree *tree, struct smb2_ioctl * return NULL; } - SIVAL(req->out.body, 0x2C, io->in.max_response_size); + SIVAL(req->out.body, 0x2C, io->in.max_output_response); SBVAL(req->out.body, 0x30, io->in.flags); smb2_transport_send(req); @@ -108,7 +108,7 @@ NTSTATUS smb2_ioctl_recv(struct smb2_request *req, SMB2_CHECK_PACKET_RECV(req, 0x30, true); - io->out._pad = SVAL(req->in.body, 0x02); + io->out.reserved = SVAL(req->in.body, 0x02); io->out.function = IVAL(req->in.body, 0x04); smb2_pull_handle(req->in.body+0x08, &io->out.file.handle); @@ -124,8 +124,8 @@ NTSTATUS smb2_ioctl_recv(struct smb2_request *req, return status; } - io->out.unknown2 = IVAL(req->in.body, 0x28); - io->out.unknown3 = IVAL(req->in.body, 0x2C); + io->out.flags = IVAL(req->in.body, 0x28); + io->out.reserved2 = IVAL(req->in.body, 0x2C); return smb2_request_destroy(req); } diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index ff45aafd676..37660ca0a1c 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -1177,12 +1177,12 @@ static NTSTATUS ipc_ioctl_smb2(struct ntvfs_module_context *ntvfs, state = talloc(req, struct ipc_ioctl_state); NT_STATUS_HAVE_NO_MEMORY(state); - io->smb2.out._pad = 0; + io->smb2.out.reserved = 0; io->smb2.out.function = io->smb2.in.function; - io->smb2.out.unknown2 = 0; - io->smb2.out.unknown3 = 0; + io->smb2.out.flags = 0; + io->smb2.out.reserved2 = 0; io->smb2.out.in = data_blob_null; - io->smb2.out.out = data_blob_talloc(req, NULL, io->smb2.in.max_response_size); + io->smb2.out.out = data_blob_talloc(req, NULL, io->smb2.in.max_output_response); NT_STATUS_HAVE_NO_MEMORY(io->smb2.out.out.data); state->ipriv = ipriv; diff --git a/source4/smb_server/smb2/fileio.c b/source4/smb_server/smb2/fileio.c index 92f148533e1..4153a42df0d 100644 --- a/source4/smb_server/smb2/fileio.c +++ b/source4/smb_server/smb2/fileio.c @@ -383,7 +383,7 @@ static void smb2srv_ioctl_send(struct ntvfs_request *ntvfs) SMB2SRV_CHECK_ASYNC_STATUS_ERR(io, union smb_ioctl); SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x30, true, 0)); - SSVAL(req->out.body, 0x02, io->smb2.out._pad); + SSVAL(req->out.body, 0x02, io->smb2.out.reserved); SIVAL(req->out.body, 0x04, io->smb2.out.function); if (io->smb2.level == RAW_IOCTL_SMB2_NO_HANDLE) { struct smb2_handle h; @@ -395,8 +395,8 @@ static void smb2srv_ioctl_send(struct ntvfs_request *ntvfs) } SMB2SRV_CHECK(smb2_push_o32s32_blob(&req->out, 0x18, io->smb2.out.in)); SMB2SRV_CHECK(smb2_push_o32s32_blob(&req->out, 0x20, io->smb2.out.out)); - SIVAL(req->out.body, 0x28, io->smb2.out.unknown2); - SIVAL(req->out.body, 0x2C, io->smb2.out.unknown3); + SIVAL(req->out.body, 0x28, io->smb2.out.flags); + SIVAL(req->out.body, 0x2C, io->smb2.out.reserved2); smb2srv_send_reply(req); } @@ -411,14 +411,15 @@ void smb2srv_ioctl_recv(struct smb2srv_request *req) SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_ioctl_send, NTVFS_ASYNC_STATE_MAY_ASYNC); /* TODO: avoid the memcpy */ - io->smb2.in._pad = SVAL(req->in.body, 0x02); + io->smb2.in.reserved = SVAL(req->in.body, 0x02); io->smb2.in.function = IVAL(req->in.body, 0x04); /* file handle ... */ SMB2SRV_CHECK(smb2_pull_o32s32_blob(&req->in, io, req->in.body+0x18, &io->smb2.in.out)); - io->smb2.in.unknown2 = IVAL(req->in.body, 0x20); + io->smb2.in.max_input_response = IVAL(req->in.body, 0x20); SMB2SRV_CHECK(smb2_pull_o32s32_blob(&req->in, io, req->in.body+0x24, &io->smb2.in.in)); - io->smb2.in.max_response_size = IVAL(req->in.body, 0x2C); - io->smb2.in.flags = BVAL(req->in.body, 0x30); + io->smb2.in.max_output_response = IVAL(req->in.body, 0x2C); + io->smb2.in.flags = IVAL(req->in.body, 0x30); + io->smb2.in.reserved2 = IVAL(req->in.body, 0x34); smb2_pull_handle(req->in.body + 0x08, &h); if (h.data[0] == UINT64_MAX && h.data[1] == UINT64_MAX) { diff --git a/source4/torture/rpc/fsrvp.c b/source4/torture/rpc/fsrvp.c index 1491e577fe9..71750114a18 100644 --- a/source4/torture/rpc/fsrvp.c +++ b/source4/torture/rpc/fsrvp.c @@ -604,7 +604,7 @@ static bool test_fsrvp_enum_snaps(struct torture_context *tctx, io.level = RAW_IOCTL_SMB2; io.in.file.handle = fh; io.in.function = FSCTL_SRV_ENUM_SNAPS; - io.in.max_response_size = 16; + io.in.max_output_response = 16; io.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, mem_ctx, &io); @@ -612,7 +612,7 @@ static bool test_fsrvp_enum_snaps(struct torture_context *tctx, *_count = IVAL(io.out.out.data, 0); - /* with max_response_size=16, no labels should be sent */ + /* with max_output_response=16, no labels should be sent */ torture_assert_int_equal(tctx, IVAL(io.out.out.data, 4), 0, "enum snaps labels"); diff --git a/source4/torture/smb2/compound.c b/source4/torture/smb2/compound.c index 87bacc90483..0257cc27b8d 100644 --- a/source4/torture/smb2/compound.c +++ b/source4/torture/smb2/compound.c @@ -415,8 +415,8 @@ static bool test_compound_related3(struct torture_context *tctx, ZERO_STRUCT(io); io.in.function = FSCTL_CREATE_OR_GET_OBJECT_ID; io.in.file.handle = hd; - io.in.unknown2 = 0; - io.in.max_response_size = 64; + io.in.reserved2 = 0; + io.in.max_output_response = 64; io.in.flags = 1; req[1] = smb2_ioctl_send(tree, &io); diff --git a/source4/torture/smb2/ioctl.c b/source4/torture/smb2/ioctl.c index 2b7df6efdcb..302ca4418f1 100644 --- a/source4/torture/smb2/ioctl.c +++ b/source4/torture/smb2/ioctl.c @@ -57,7 +57,7 @@ static bool test_ioctl_get_shadow_copy(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = h; ioctl.smb2.in.function = FSCTL_SRV_ENUM_SNAPS; - ioctl.smb2.in.max_response_size = 16; + ioctl.smb2.in.max_output_response = 16; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); @@ -97,7 +97,7 @@ static bool test_ioctl_req_resume_key(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = h; ioctl.smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY; - ioctl.smb2.in.max_response_size = 32; + ioctl.smb2.in.max_output_response = 32; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); @@ -141,7 +141,7 @@ static bool test_ioctl_req_two_resume_keys(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = h; ioctl.smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY; - ioctl.smb2.in.max_response_size = 32; + ioctl.smb2.in.max_output_response = 32; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); @@ -158,7 +158,7 @@ static bool test_ioctl_req_two_resume_keys(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = h; ioctl.smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY; - ioctl.smb2.in.max_response_size = 32; + ioctl.smb2.in.max_output_response = 32; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); @@ -403,7 +403,7 @@ static bool test_setup_copy_chunk(struct torture_context *torture, ioctl->smb2.in.file.handle = *src_h; ioctl->smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY; /* Allow for Key + ContextLength + Context */ - ioctl->smb2.in.max_response_size = 32; + ioctl->smb2.in.max_output_response = 32; ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(src_tree, mem_ctx, &ioctl->smb2); @@ -420,7 +420,7 @@ static bool test_setup_copy_chunk(struct torture_context *torture, ioctl->smb2.level = RAW_IOCTL_SMB2; ioctl->smb2.in.file.handle = *dest_h; ioctl->smb2.in.function = FSCTL_SRV_COPYCHUNK; - ioctl->smb2.in.max_response_size = sizeof(struct srv_copychunk_rsp); + ioctl->smb2.in.max_output_response = sizeof(struct srv_copychunk_rsp); ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; ZERO_STRUCTPN(cc_copy); @@ -1813,8 +1813,8 @@ static bool test_ioctl_copy_chunk_max_output_sz(struct torture_context *torture, cc_copy.chunks[0].source_off = 0; cc_copy.chunks[0].target_off = 0; cc_copy.chunks[0].length = 4096; - /* req is valid, but use undersize max_response_size */ - ioctl.smb2.in.max_response_size = sizeof(struct srv_copychunk_rsp) - 1; + /* req is valid, but use undersize max_output_response */ + ioctl.smb2.in.max_output_response = sizeof(struct srv_copychunk_rsp) - 1; ndr_ret = ndr_push_struct_blob(&ioctl.smb2.in.out, tmp_ctx, &cc_copy, @@ -2330,7 +2330,7 @@ static NTSTATUS test_ioctl_compress_get(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_GET_COMPRESSION; - ioctl.smb2.in.max_response_size = sizeof(struct compression_state); + ioctl.smb2.in.max_output_response = sizeof(struct compression_state); ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, mem_ctx, &ioctl.smb2); @@ -2365,7 +2365,7 @@ static NTSTATUS test_ioctl_compress_set(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_SET_COMPRESSION; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; cmpr_state.format = compression_fmt; @@ -2579,7 +2579,7 @@ static bool test_ioctl_compress_invalid_buf(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_GET_COMPRESSION; - ioctl.smb2.in.max_response_size = 0; /* no room for rsp data */ + ioctl.smb2.in.max_output_response = 0; /* no room for rsp data */ ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); @@ -3141,7 +3141,7 @@ static bool test_ioctl_network_interface_info(struct torture_context *torture, fh.data[1] = UINT64_MAX; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_QUERY_NETWORK_INTERFACE_INFO; - ioctl.smb2.in.max_response_size = 0x10000; /* Windows client sets this to 64KiB */ + ioctl.smb2.in.max_output_response = 0x10000; /* Windows client sets this to 64KiB */ ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); @@ -3204,7 +3204,7 @@ static NTSTATUS test_ioctl_sparse_req(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_SET_SPARSE; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; set_sparse = (set ? 0xFF : 0x0); ioctl.smb2.in.out.data = &set_sparse; @@ -3389,7 +3389,7 @@ static bool test_ioctl_sparse_set_nobuf(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_SET_SPARSE; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; /* ioctl.smb2.in.out is zeroed, no SetSparse buffer */ @@ -3405,7 +3405,7 @@ static bool test_ioctl_sparse_set_nobuf(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_SET_SPARSE; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); @@ -3459,7 +3459,7 @@ static bool test_ioctl_sparse_set_oversize(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_SET_SPARSE; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; /* @@ -3482,7 +3482,7 @@ static bool test_ioctl_sparse_set_oversize(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_SET_SPARSE; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; ZERO_ARRAY(buf); /* clear sparse */ @@ -3526,7 +3526,7 @@ static NTSTATUS test_ioctl_qar_req(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_QUERY_ALLOCATED_RANGES; - ioctl.smb2.in.max_response_size = 1024; + ioctl.smb2.in.max_output_response = 1024; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; far_buf.file_off = req_off; @@ -3741,7 +3741,7 @@ static bool test_ioctl_sparse_qar_malformed(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_QUERY_ALLOCATED_RANGES; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; far_buf.file_off = 0; @@ -3767,7 +3767,7 @@ static bool test_ioctl_sparse_qar_malformed(struct torture_context *torture, NT_STATUS_BUFFER_TOO_SMALL, "qar no space"); /* oversize (2x) file_alloced_range_buf in request, should pass */ - ioctl.smb2.in.max_response_size = 1024; + ioctl.smb2.in.max_output_response = 1024; old_len = ioctl.smb2.in.out.length; ok = data_blob_realloc(tmp_ctx, &ioctl.smb2.in.out, (ioctl.smb2.in.out.length * 2)); @@ -3820,7 +3820,7 @@ static NTSTATUS test_ioctl_zdata_req(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_SET_ZERO_DATA; - ioctl.smb2.in.max_response_size = 0; + ioctl.smb2.in.max_output_response = 0; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; zdata_info.file_off = off; @@ -5269,7 +5269,7 @@ static bool test_ioctl_sparse_qar_overflow(struct torture_context *torture, ioctl.smb2.level = RAW_IOCTL_SMB2; ioctl.smb2.in.file.handle = fh; ioctl.smb2.in.function = FSCTL_QUERY_ALLOCATED_RANGES; - ioctl.smb2.in.max_response_size = 1024; + ioctl.smb2.in.max_output_response = 1024; ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; /* off + length wraps around to 511 */ @@ -5351,7 +5351,7 @@ static bool test_setup_trim(struct torture_context *torture, ioctl->smb2.level = RAW_IOCTL_SMB2; ioctl->smb2.in.file.handle = *fh; ioctl->smb2.in.function = FSCTL_FILE_LEVEL_TRIM; - ioctl->smb2.in.max_response_size + ioctl->smb2.in.max_output_response = sizeof(struct fsctl_file_level_trim_rsp); ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; @@ -5455,7 +5455,7 @@ static bool test_setup_dup_extents(struct torture_context *tctx, ioctl->smb2.level = RAW_IOCTL_SMB2; ioctl->smb2.in.file.handle = *dest_h; ioctl->smb2.in.function = FSCTL_DUP_EXTENTS_TO_FILE; - ioctl->smb2.in.max_response_size = 0; + ioctl->smb2.in.max_output_response = 0; ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; ZERO_STRUCTPN(dup_ext_buf); diff --git a/source4/torture/smb2/lock.c b/source4/torture/smb2/lock.c index bf090ade8f3..8dca75cc6c1 100644 --- a/source4/torture/smb2/lock.c +++ b/source4/torture/smb2/lock.c @@ -2934,7 +2934,7 @@ static bool test_replay(struct torture_context *torture, .level = RAW_IOCTL_SMB2, .in.file.handle = h, .in.function = FSCTL_LMR_REQ_RESILIENCY, - .in.max_response_size = 0, + .in.max_output_response = 0, .in.flags = SMB2_IOCTL_FLAG_IS_FSCTL, .in.out.data = res_req, .in.out.length = sizeof(res_req) diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c index 443d372a1d7..57c7bef2d66 100644 --- a/source4/torture/smb2/replay.c +++ b/source4/torture/smb2/replay.c @@ -315,7 +315,7 @@ static bool test_replay_commands(struct torture_context *tctx, struct smb2_tree .smb2.level = RAW_IOCTL_SMB2, .smb2.in.file.handle = h, .smb2.in.function = FSCTL_CREATE_OR_GET_OBJECT_ID, - .smb2.in.max_response_size = 64, + .smb2.in.max_output_response = 64, .smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL }; torture_comment(tctx, "Trying ioctl\n"); @@ -1656,7 +1656,7 @@ static bool test_channel_sequence_table(struct torture_context *tctx, .smb2.level = RAW_IOCTL_SMB2, .smb2.in.file.handle = handle, .smb2.in.function = FSCTL_CREATE_OR_GET_OBJECT_ID, - .smb2.in.max_response_size = 64, + .smb2.in.max_output_response = 64, .smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL }; status = smb2_ioctl(tree, mem_ctx, &ioctl.smb2); diff --git a/source4/torture/smb2/session.c b/source4/torture/smb2/session.c index 6d5f7b8594e..d3044e79fb8 100644 --- a/source4/torture/smb2/session.c +++ b/source4/torture/smb2/session.c @@ -1417,7 +1417,7 @@ static bool test_session_expire2i(struct torture_context *tctx, ZERO_STRUCT(ctl); ctl.in.file.handle = *h1; ctl.in.function = FSCTL_SRV_ENUM_SNAPS; - ctl.in.max_response_size = 16; + ctl.in.max_output_response = 16; ctl.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tctx, &ctl); torture_assert_ntstatus_equal_goto(tctx, status, diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index 884a7acdccb..43f5167bd11 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -2725,7 +2725,7 @@ static bool test_setup_copy_chunk(struct torture_context *torture, io->smb2.in.file.handle = *src_h; io->smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY; /* Allow for Key + ContextLength + Context */ - io->smb2.in.max_response_size = 32; + io->smb2.in.max_output_response = 32; io->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, mem_ctx, &io->smb2); @@ -2742,7 +2742,7 @@ static bool test_setup_copy_chunk(struct torture_context *torture, io->smb2.level = RAW_IOCTL_SMB2; io->smb2.in.file.handle = *dest_h; io->smb2.in.function = FSCTL_SRV_COPYCHUNK; - io->smb2.in.max_response_size = sizeof(struct srv_copychunk_rsp); + io->smb2.in.max_output_response = sizeof(struct srv_copychunk_rsp); io->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; ZERO_STRUCTPN(cc_copy);