summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-12-27 15:18:55 +0100
committerStefan Metzmacher <metze@samba.org>2019-01-11 23:11:16 +0100
commit88016bac86a727de16af72766e859c5821a0b20c (patch)
tree3d53949742589654035f31de641ae56c10609312 /source3
parent122e141b465d90b76334eaf75331949e34fd91d3 (diff)
downloadsamba-88016bac86a727de16af72766e859c5821a0b20c.tar.gz
Revert "smbd: add an effective {smb,smbd_smb2}_request->ev_ctx that holds the event context used for the request processing"
This reverts commit 894e5001c747ce765dad5517778dda55d7d1f4d9. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/include/vfs.h2
-rw-r--r--source3/smbd/aio.c8
-rw-r--r--source3/smbd/globals.h3
-rw-r--r--source3/smbd/ipc.c4
-rw-r--r--source3/smbd/open.c8
-rw-r--r--source3/smbd/pipes.c8
-rw-r--r--source3/smbd/process.c8
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/smb2_break.c4
-rw-r--r--source3/smbd/smb2_close.c2
-rw-r--r--source3/smbd/smb2_create.c6
-rw-r--r--source3/smbd/smb2_flush.c2
-rw-r--r--source3/smbd/smb2_getinfo.c2
-rw-r--r--source3/smbd/smb2_glue.c1
-rw-r--r--source3/smbd/smb2_ioctl.c2
-rw-r--r--source3/smbd/smb2_ioctl_named_pipe.c2
-rw-r--r--source3/smbd/smb2_lock.c4
-rw-r--r--source3/smbd/smb2_notify.c4
-rw-r--r--source3/smbd/smb2_query_directory.c2
-rw-r--r--source3/smbd/smb2_read.c2
-rw-r--r--source3/smbd/smb2_server.c2
-rw-r--r--source3/smbd/smb2_sesssetup.c4
-rw-r--r--source3/smbd/smb2_setinfo.c2
-rw-r--r--source3/smbd/smb2_tcon.c4
-rw-r--r--source3/smbd/smb2_write.c2
25 files changed, 37 insertions, 53 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 959dd405915..1a05283fe6c 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -518,8 +518,6 @@ struct smb_request {
size_t unread_bytes;
bool encrypted;
- /* the tevent_context (wrapper) the request operates on */
- struct tevent_context *ev_ctx;
connection_struct *conn;
struct smbd_server_connection *sconn;
struct smbXsrv_connection *xconn;
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 29723d23fa5..8ac3ef7278e 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -206,7 +206,7 @@ NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
aio_ex->nbyte = smb_maxcnt;
aio_ex->offset = startpos;
- req = SMB_VFS_PREAD_SEND(aio_ex, smbreq->ev_ctx,
+ req = SMB_VFS_PREAD_SEND(aio_ex, fsp->conn->sconn->ev_ctx,
fsp,
smb_buf(aio_ex->outbuf.data) + 1 /* pad */,
smb_maxcnt, startpos);
@@ -459,7 +459,7 @@ NTSTATUS schedule_aio_write_and_X(connection_struct *conn,
aio_ex->nbyte = numtowrite;
aio_ex->offset = startpos;
- req = pwrite_fsync_send(aio_ex, smbreq->ev_ctx, fsp,
+ req = pwrite_fsync_send(aio_ex, fsp->conn->sconn->ev_ctx, fsp,
data, numtowrite, startpos,
aio_ex->write_through);
if (req == NULL) {
@@ -705,7 +705,7 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
aio_ex->nbyte = smb_maxcnt;
aio_ex->offset = startpos;
- req = SMB_VFS_PREAD_SEND(aio_ex, smbreq->ev_ctx, fsp,
+ req = SMB_VFS_PREAD_SEND(aio_ex, fsp->conn->sconn->ev_ctx, fsp,
preadbuf->data, smb_maxcnt, startpos);
if (req == NULL) {
DEBUG(0, ("smb2: SMB_VFS_PREAD_SEND failed. "
@@ -846,7 +846,7 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
aio_ex->nbyte = in_data.length;
aio_ex->offset = in_offset;
- req = pwrite_fsync_send(aio_ex, smbreq->ev_ctx, fsp,
+ req = pwrite_fsync_send(aio_ex, fsp->conn->sconn->ev_ctx, fsp,
in_data.data, in_data.length, in_offset,
write_through);
if (req == NULL) {
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index a13916e230a..a273cdb3651 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -705,9 +705,6 @@ struct smbd_smb2_request {
struct smbXsrv_tcon *tcon;
uint32_t last_tid;
- /* the tevent_context (wrapper) the request operates on */
- struct tevent_context *ev_ctx;
-
int current_idx;
bool do_signing;
/* Was the request encrypted? */
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 85236e0102f..f1c8ea0c2ed 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -281,7 +281,7 @@ static void api_dcerpc_cmd(connection_struct *conn, struct smb_request *req,
state->num_data = length;
state->max_read = max_read;
- subreq = np_write_send(state, req->ev_ctx, state->handle,
+ subreq = np_write_send(state, req->sconn->ev_ctx, state->handle,
state->data, length);
if (subreq == NULL) {
TALLOC_FREE(state);
@@ -330,7 +330,7 @@ static void api_dcerpc_cmd_write_done(struct tevent_req *subreq)
goto send;
}
- subreq = np_read_send(state, req->ev_ctx,
+ subreq = np_read_send(state, req->sconn->ev_ctx,
state->handle, state->data, state->max_read);
if (subreq == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index a3df8a1b736..bab9286751f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2408,7 +2408,7 @@ static void defer_open(struct share_mode_lock *lck,
DBG_DEBUG("defering mid %" PRIu64 "\n", req->mid);
watch_req = dbwrap_watched_watch_send(watch_state,
- req->ev_ctx,
+ req->sconn->ev_ctx,
lck->data->record,
(struct server_id){0});
if (watch_req == NULL) {
@@ -2416,7 +2416,7 @@ static void defer_open(struct share_mode_lock *lck,
}
tevent_req_set_callback(watch_req, defer_open_done, watch_state);
- ok = tevent_req_set_endtime(watch_req, req->ev_ctx, abs_timeout);
+ ok = tevent_req_set_endtime(watch_req, req->sconn->ev_ctx, abs_timeout);
if (!ok) {
exit_server("tevent_req_set_endtime failed");
}
@@ -2508,7 +2508,7 @@ static void setup_kernel_oplock_poll_open(struct timeval request_time,
* As this timer event is owned by req, it will
* disappear if req it talloc_freed.
*/
- open_rec->te = tevent_add_timer(req->ev_ctx,
+ open_rec->te = tevent_add_timer(req->sconn->ev_ctx,
req,
timeval_current_ofs(1, 0),
kernel_oplock_poll_open_timer,
@@ -2695,7 +2695,7 @@ static void schedule_async_open(struct timeval request_time,
exit_server("push_deferred_open_message_smb failed");
}
- open_rec->te = tevent_add_timer(req->ev_ctx,
+ open_rec->te = tevent_add_timer(req->sconn->ev_ctx,
req,
timeval_current_ofs(20, 0),
schedule_async_open_timer,
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index c945f0f6177..4be57bc2a5f 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -67,7 +67,7 @@ NTSTATUS open_np_file(struct smb_request *smb_req, const char *name,
conn->sconn->remote_address,
conn->sconn->local_address,
conn->session_info,
- smb_req->ev_ctx,
+ conn->sconn->ev_ctx,
conn->sconn->msg_ctx,
&fsp->fake_file_handle);
if (!NT_STATUS_IS_OK(status)) {
@@ -206,7 +206,7 @@ void reply_pipe_write(struct smb_request *req)
DEBUG(6, ("reply_pipe_write: %s, name: %s len: %d\n", fsp_fnum_dbg(fsp),
fsp_str_dbg(fsp), (int)state->numtowrite));
- subreq = np_write_send(state, req->ev_ctx,
+ subreq = np_write_send(state, req->sconn->ev_ctx,
fsp->fake_file_handle, data, state->numtowrite);
if (subreq == NULL) {
TALLOC_FREE(state);
@@ -322,7 +322,7 @@ void reply_pipe_write_and_X(struct smb_request *req)
state->numtowrite -= 2;
}
- subreq = np_write_send(state, req->ev_ctx,
+ subreq = np_write_send(state, req->sconn->ev_ctx,
fsp->fake_file_handle, data, state->numtowrite);
if (subreq == NULL) {
TALLOC_FREE(state);
@@ -435,7 +435,7 @@ void reply_pipe_read_and_X(struct smb_request *req)
state->outbuf = req->outbuf;
req->outbuf = NULL;
- subreq = np_read_send(state, req->ev_ctx,
+ subreq = np_read_send(state, req->sconn->ev_ctx,
fsp->fake_file_handle, data,
state->smb_maxcnt);
if (subreq == NULL) {
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index e730676ef36..d2553049cd2 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1506,8 +1506,6 @@ static connection_struct *switch_message(uint8_t type, struct smb_request *req)
errno = 0;
- req->ev_ctx = NULL;
-
if (!xconn->smb1.negprot.done) {
switch (type) {
/*
@@ -1642,8 +1640,6 @@ static connection_struct *switch_message(uint8_t type, struct smb_request *req)
reply_nterror(req, NT_STATUS_ACCESS_DENIED);
return conn;
}
-
- req->ev_ctx = conn->user_ev_ctx;
} else if (flags & AS_GUEST) {
/*
* Does this protocol need to be run as guest? (Only archane
@@ -1653,13 +1649,9 @@ static connection_struct *switch_message(uint8_t type, struct smb_request *req)
reply_nterror(req, NT_STATUS_ACCESS_DENIED);
return conn;
}
-
- req->ev_ctx = req->sconn->guest_ev_ctx;
} else {
/* This call needs to be run as root */
change_to_root_user();
-
- req->ev_ctx = req->sconn->root_ev_ctx;
}
/* load service specific parameters */
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index f2617fab3b3..405bd6ce004 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5417,7 +5417,7 @@ void reply_close(struct smb_request *req)
*/
fsp->deferred_close = tevent_wait_send(
- fsp, req->ev_ctx);
+ fsp, fsp->conn->sconn->ev_ctx);
if (fsp->deferred_close == NULL) {
status = NT_STATUS_NO_MEMORY;
goto done;
diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c
index ec9c0f1376b..ae6b9214b22 100644
--- a/source3/smbd/smb2_break.c
+++ b/source3/smbd/smb2_break.c
@@ -86,7 +86,7 @@ NTSTATUS smbd_smb2_request_process_break(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
- subreq = smbd_smb2_oplock_break_send(req, req->ev_ctx,
+ subreq = smbd_smb2_oplock_break_send(req, req->sconn->ev_ctx,
req, in_fsp, in_oplock_level);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
@@ -265,7 +265,7 @@ static NTSTATUS smbd_smb2_request_process_lease_break(
in_lease_key.data[1] = BVAL(inbody, 16);
in_lease_state = IVAL(inbody, 24);
- subreq = smbd_smb2_lease_break_send(req, req->ev_ctx, req,
+ subreq = smbd_smb2_lease_break_send(req, req->sconn->ev_ctx, req,
in_lease_key, in_lease_state);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
diff --git a/source3/smbd/smb2_close.c b/source3/smbd/smb2_close.c
index 1888736e4ae..dea9512dfc6 100644
--- a/source3/smbd/smb2_close.c
+++ b/source3/smbd/smb2_close.c
@@ -70,7 +70,7 @@ NTSTATUS smbd_smb2_request_process_close(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_close_send(req, req->ev_ctx,
+ subreq = smbd_smb2_close_send(req, req->sconn->ev_ctx,
req, in_fsp, in_flags);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index fdd04ac0331..9de7cef6f10 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -228,7 +228,7 @@ NTSTATUS smbd_smb2_request_process_create(struct smbd_smb2_request *smb2req)
}
tsubreq = smbd_smb2_create_send(smb2req,
- smb2req->ev_ctx,
+ smb2req->sconn->ev_ctx,
smb2req,
in_oplock_level,
in_impersonation_level,
@@ -1759,7 +1759,7 @@ bool schedule_deferred_open_message_smb2(
(unsigned long long)mid ));
tevent_schedule_immediate(state->im,
- smb2req->ev_ctx,
+ smb2req->sconn->ev_ctx,
smbd_smb2_create_request_dispatch_immediate,
smb2req);
@@ -1791,7 +1791,7 @@ static bool smbd_smb2_create_cancel(struct tevent_req *req)
remove_deferred_open_message_smb2_internal(smb2req, mid);
- tevent_req_defer_callback(req, smb2req->ev_ctx);
+ tevent_req_defer_callback(req, smb2req->sconn->ev_ctx);
tevent_req_nterror(req, NT_STATUS_CANCELLED);
return true;
}
diff --git a/source3/smbd/smb2_flush.c b/source3/smbd/smb2_flush.c
index 4f815a6f5b0..470a8df4944 100644
--- a/source3/smbd/smb2_flush.c
+++ b/source3/smbd/smb2_flush.c
@@ -58,7 +58,7 @@ NTSTATUS smbd_smb2_request_process_flush(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_flush_send(req, req->ev_ctx,
+ subreq = smbd_smb2_flush_send(req, req->sconn->ev_ctx,
req, in_fsp);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c
index 314f44e858c..29625fc1ba7 100644
--- a/source3/smbd/smb2_getinfo.c
+++ b/source3/smbd/smb2_getinfo.c
@@ -122,7 +122,7 @@ NTSTATUS smbd_smb2_request_process_getinfo(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_getinfo_send(req, req->ev_ctx,
+ subreq = smbd_smb2_getinfo_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_info_type,
in_file_info_class,
diff --git a/source3/smbd/smb2_glue.c b/source3/smbd/smb2_glue.c
index cccc763c342..6a73ec050e2 100644
--- a/source3/smbd/smb2_glue.c
+++ b/source3/smbd/smb2_glue.c
@@ -46,7 +46,6 @@ struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req)
smbreq->conn = req->tcon->compat;
smbreq->sconn = req->sconn;
smbreq->xconn = req->xconn;
- smbreq->ev_ctx = req->ev_ctx;
smbreq->smbpid = (uint16_t)IVAL(inhdr, SMB2_HDR_PID);
smbreq->flags2 = FLAGS2_UNICODE_STRINGS |
FLAGS2_32_BIT_ERROR_CODES |
diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index 451733c1a65..be70e3a0912 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -217,7 +217,7 @@ NTSTATUS smbd_smb2_request_process_ioctl(struct smbd_smb2_request *req)
break;
}
- subreq = smbd_smb2_ioctl_send(req, req->ev_ctx,
+ subreq = smbd_smb2_ioctl_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_ctl_code,
in_input_buffer,
diff --git a/source3/smbd/smb2_ioctl_named_pipe.c b/source3/smbd/smb2_ioctl_named_pipe.c
index f8012ae1920..f9e3dec049c 100644
--- a/source3/smbd/smb2_ioctl_named_pipe.c
+++ b/source3/smbd/smb2_ioctl_named_pipe.c
@@ -143,7 +143,7 @@ static void smbd_smb2_ioctl_pipe_write_done(struct tevent_req *subreq)
(unsigned int)state->out_output.length ));
subreq = np_read_send(state->smbreq->conn,
- state->smb2req->ev_ctx,
+ state->smb2req->sconn->ev_ctx,
state->fsp->fake_file_handle,
state->out_output.data,
state->out_output.length);
diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c
index da5a54df623..3cc591089a4 100644
--- a/source3/smbd/smb2_lock.c
+++ b/source3/smbd/smb2_lock.c
@@ -134,7 +134,7 @@ NTSTATUS smbd_smb2_request_process_lock(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_lock_send(req, req->ev_ctx,
+ subreq = smbd_smb2_lock_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_lock_count,
in_locks);
@@ -368,7 +368,7 @@ static struct tevent_req *smbd_smb2_lock_send(TALLOC_CTX *mem_ctx,
}
if (async) {
- tevent_req_defer_callback(req, smb2req->ev_ctx);
+ tevent_req_defer_callback(req, smb2req->sconn->ev_ctx);
SMBPROFILE_IOBYTES_ASYNC_SET_IDLE(smb2req->profile);
return req;
}
diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c
index e49e76d9641..24241562556 100644
--- a/source3/smbd/smb2_notify.c
+++ b/source3/smbd/smb2_notify.c
@@ -94,7 +94,7 @@ NTSTATUS smbd_smb2_request_process_notify(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_notify_send(req, req->ev_ctx,
+ subreq = smbd_smb2_notify_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_flags,
in_output_buffer_length,
@@ -355,7 +355,7 @@ static void smbd_smb2_notify_reply(struct smb_request *smbreq,
}
}
- tevent_req_defer_callback(req, state->smb2req->ev_ctx);
+ tevent_req_defer_callback(req, state->smb2req->sconn->ev_ctx);
if (!NT_STATUS_IS_OK(state->status)) {
tevent_req_nterror(req, state->status);
diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c
index ab6c3dc788e..a80c9f59677 100644
--- a/source3/smbd/smb2_query_directory.c
+++ b/source3/smbd/smb2_query_directory.c
@@ -125,7 +125,7 @@ NTSTATUS smbd_smb2_request_process_query_directory(struct smbd_smb2_request *req
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_query_directory_send(req, req->ev_ctx,
+ subreq = smbd_smb2_query_directory_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_file_info_class,
in_flags,
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index 065a5cd5fc6..a7d2496bc6f 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -97,7 +97,7 @@ NTSTATUS smbd_smb2_request_process_read(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_read_send(req, req->ev_ctx,
+ subreq = smbd_smb2_read_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_flags,
in_length,
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index e36db1e55f5..1e9ed331aa6 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2620,10 +2620,8 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
SMB_ASSERT(call->fileid_ofs == 0);
/* This call needs to be run as root */
change_to_root_user();
- req->ev_ctx = req->sconn->root_ev_ctx;
} else {
SMB_ASSERT(call->need_tcon);
- req->ev_ctx = req->tcon->compat->user_ev_ctx;
}
#define _INBYTES(_r) \
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 5420d4f09bb..2c24e7a1abc 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -95,7 +95,7 @@ NTSTATUS smbd_smb2_request_process_sesssetup(struct smbd_smb2_request *smb2req)
in_security_buffer.length = in_security_length;
subreq = smbd_smb2_session_setup_wrap_send(smb2req,
- smb2req->ev_ctx,
+ smb2req->sconn->ev_ctx,
smb2req,
in_session_id,
in_flags,
@@ -1218,7 +1218,7 @@ NTSTATUS smbd_smb2_request_process_logoff(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, status);
}
- subreq = smbd_smb2_logoff_send(req, req->ev_ctx, req);
+ subreq = smbd_smb2_logoff_send(req, req->sconn->ev_ctx, req);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
}
diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c
index 7c1f84bd79d..b19cbb150a7 100644
--- a/source3/smbd/smb2_setinfo.c
+++ b/source3/smbd/smb2_setinfo.c
@@ -108,7 +108,7 @@ NTSTATUS smbd_smb2_request_process_setinfo(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_setinfo_send(req, req->ev_ctx,
+ subreq = smbd_smb2_setinfo_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_info_type,
in_file_info_class,
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 3a4a15d3059..ebd31602efc 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -94,7 +94,7 @@ NTSTATUS smbd_smb2_request_process_tcon(struct smbd_smb2_request *req)
}
subreq = smbd_smb2_tree_connect_send(req,
- req->ev_ctx,
+ req->sconn->ev_ctx,
req,
in_path_string);
if (subreq == NULL) {
@@ -491,7 +491,7 @@ NTSTATUS smbd_smb2_request_process_tdis(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, status);
}
- subreq = smbd_smb2_tdis_send(req, req->ev_ctx, req);
+ subreq = smbd_smb2_tdis_send(req, req->sconn->ev_ctx, req);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
}
diff --git a/source3/smbd/smb2_write.c b/source3/smbd/smb2_write.c
index d5ab12ecc21..ee95bd317ae 100644
--- a/source3/smbd/smb2_write.c
+++ b/source3/smbd/smb2_write.c
@@ -109,7 +109,7 @@ NTSTATUS smbd_smb2_request_process_write(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
}
- subreq = smbd_smb2_write_send(req, req->ev_ctx,
+ subreq = smbd_smb2_write_send(req, req->sconn->ev_ctx,
req, in_fsp,
in_data_buffer,
in_offset,