diff options
-rw-r--r-- | source3/smbd/globals.h | 6 | ||||
-rw-r--r-- | source3/smbd/process.c | 3 | ||||
-rw-r--r-- | source3/smbd/smb2_break.c | 14 | ||||
-rw-r--r-- | source3/smbd/smb2_close.c | 6 | ||||
-rw-r--r-- | source3/smbd/smb2_create.c | 14 | ||||
-rw-r--r-- | source3/smbd/smb2_find.c | 6 | ||||
-rw-r--r-- | source3/smbd/smb2_flush.c | 6 | ||||
-rw-r--r-- | source3/smbd/smb2_getinfo.c | 8 | ||||
-rw-r--r-- | source3/smbd/smb2_ioctl.c | 8 | ||||
-rw-r--r-- | source3/smbd/smb2_lock.c | 6 | ||||
-rw-r--r-- | source3/smbd/smb2_notify.c | 6 | ||||
-rw-r--r-- | source3/smbd/smb2_read.c | 6 | ||||
-rw-r--r-- | source3/smbd/smb2_server.c | 33 | ||||
-rw-r--r-- | source3/smbd/smb2_sesssetup.c | 12 | ||||
-rw-r--r-- | source3/smbd/smb2_setinfo.c | 6 | ||||
-rw-r--r-- | source3/smbd/smb2_tcon.c | 12 | ||||
-rw-r--r-- | source3/smbd/smb2_write.c | 6 | ||||
-rw-r--r-- | source3/smbd/smbXsrv_session.c | 2 |
18 files changed, 79 insertions, 81 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index b7f40366058..e2bf6c99d69 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -213,11 +213,11 @@ NTSTATUS smbd_calculate_access_mask(connection_struct *conn, void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq); -void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn, +void smbd_server_connection_terminate_ex(struct smbXsrv_connection *xconn, const char *reason, const char *location); -#define smbd_server_connection_terminate(sconn, reason) \ - smbd_server_connection_terminate_ex(sconn, reason, __location__) +#define smbd_server_connection_terminate(xconn, reason) \ + smbd_server_connection_terminate_ex(xconn, reason, __location__) const char *smb2_opcode_name(uint16_t opcode); bool smbd_is_smb2_header(const uint8_t *inbuf, size_t size); diff --git a/source3/smbd/process.c b/source3/smbd/process.c index b970f00b9d3..02d43d529d0 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2583,7 +2583,6 @@ static void smbd_release_ip_immediate(struct tevent_context *ctx, talloc_get_type_abort(private_data, struct smbd_release_ip_state); struct smbXsrv_connection *xconn = state->xconn; - struct smbd_server_connection *sconn = xconn->sconn; if (!NT_STATUS_EQUAL(xconn->transport.status, NT_STATUS_ADDRESS_CLOSED)) { /* @@ -2592,7 +2591,7 @@ static void smbd_release_ip_immediate(struct tevent_context *ctx, return; } - smbd_server_connection_terminate(sconn, "CTDB_SRVID_RELEASE_IP"); + smbd_server_connection_terminate(xconn, "CTDB_SRVID_RELEASE_IP"); } /**************************************************************************** diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c index 6446b79ff89..5492186b9bf 100644 --- a/source3/smbd/smb2_break.c +++ b/source3/smbd/smb2_break.c @@ -94,7 +94,7 @@ static void smbd_smb2_request_oplock_break_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -110,7 +110,7 @@ static void smbd_smb2_request_oplock_break_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -129,7 +129,7 @@ static void smbd_smb2_request_oplock_break_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -233,11 +233,12 @@ void send_break_message_smb2(files_struct *fsp, int level) SMB2_OPLOCK_LEVEL_II : SMB2_OPLOCK_LEVEL_NONE; NTSTATUS status; + struct smbXsrv_connection *xconn = fsp->conn->sconn->conn; struct smbXsrv_session *session = NULL; struct timeval tv = timeval_current(); NTTIME now = timeval_to_nttime(&tv); - status = smb2srv_session_lookup(fsp->conn->sconn->conn, + status = smb2srv_session_lookup(xconn, fsp->vuid, now, &session); @@ -266,7 +267,8 @@ void send_break_message_smb2(files_struct *fsp, int level) fsp->op, smb2_oplock_level); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(fsp->conn->sconn, - nt_errstr(status)); + smbd_server_connection_terminate(xconn, + nt_errstr(status)); + return; } } diff --git a/source3/smbd/smb2_close.c b/source3/smbd/smb2_close.c index 5334e1df23c..0e1475df900 100644 --- a/source3/smbd/smb2_close.c +++ b/source3/smbd/smb2_close.c @@ -108,7 +108,7 @@ static void smbd_smb2_request_close_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -119,7 +119,7 @@ static void smbd_smb2_request_close_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -143,7 +143,7 @@ static void smbd_smb2_request_close_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 7565201f85c..6709f5199e6 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -297,7 +297,7 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(smb2req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -308,7 +308,7 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(smb2req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -323,7 +323,7 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -368,7 +368,7 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq) error = smbd_smb2_request_done(smb2req, outbody, &outdyn); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -1318,7 +1318,6 @@ static void smbd_smb2_create_request_dispatch_immediate(struct tevent_context *c { struct smbd_smb2_request *smb2req = talloc_get_type_abort(private_data, struct smbd_smb2_request); - struct smbd_server_connection *sconn = smb2req->sconn; uint64_t mid = get_mid_from_smb2req(smb2req); NTSTATUS status; @@ -1328,7 +1327,8 @@ static void smbd_smb2_create_request_dispatch_immediate(struct tevent_context *c status = smbd_smb2_request_dispatch(smb2req); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(smb2req->xconn, + nt_errstr(status)); return; } } @@ -1375,7 +1375,7 @@ bool schedule_deferred_open_message_smb2( state->im = tevent_create_immediate(smb2req); if (!state->im) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(NT_STATUS_NO_MEMORY)); return false; } diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c index 7597713834c..45b0890c10c 100644 --- a/source3/smbd/smb2_find.c +++ b/source3/smbd/smb2_find.c @@ -153,7 +153,7 @@ static void smbd_smb2_request_find_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -166,7 +166,7 @@ static void smbd_smb2_request_find_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -186,7 +186,7 @@ static void smbd_smb2_request_find_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, &outdyn); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_flush.c b/source3/smbd/smb2_flush.c index 0d4c1a5b1a5..04a8710fe90 100644 --- a/source3/smbd/smb2_flush.c +++ b/source3/smbd/smb2_flush.c @@ -77,7 +77,7 @@ static void smbd_smb2_request_flush_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -88,7 +88,7 @@ static void smbd_smb2_request_flush_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -100,7 +100,7 @@ static void smbd_smb2_request_flush_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 87bb1c5f2e1..64669b8567b 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -153,7 +153,7 @@ static void smbd_smb2_request_getinfo_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -170,7 +170,7 @@ static void smbd_smb2_request_getinfo_done(struct tevent_req *subreq) &out_output_buffer, __location__); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -183,7 +183,7 @@ static void smbd_smb2_request_getinfo_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -200,7 +200,7 @@ static void smbd_smb2_request_getinfo_done(struct tevent_req *subreq) error = smbd_smb2_request_done_ex(req, call_status, outbody, &outdyn, __location__); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c index 6a19fcb7689..993682ffdbb 100644 --- a/source3/smbd/smb2_ioctl.c +++ b/source3/smbd/smb2_ioctl.c @@ -293,7 +293,7 @@ static void smbd_smb2_request_ioctl_done(struct tevent_req *subreq) TALLOC_FREE(subreq); if (disconnect) { error = status; - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -308,7 +308,7 @@ static void smbd_smb2_request_ioctl_done(struct tevent_req *subreq) out_output_buffer.length)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -322,7 +322,7 @@ static void smbd_smb2_request_ioctl_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -357,7 +357,7 @@ static void smbd_smb2_request_ioctl_done(struct tevent_req *subreq) error = smbd_smb2_request_done_ex(req, status, outbody, &outdyn, __location__); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c index 8e1eb40dca6..07138924738 100644 --- a/source3/smbd/smb2_lock.c +++ b/source3/smbd/smb2_lock.c @@ -139,7 +139,7 @@ static void smbd_smb2_request_lock_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(smb2req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -150,7 +150,7 @@ static void smbd_smb2_request_lock_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -162,7 +162,7 @@ static void smbd_smb2_request_lock_done(struct tevent_req *subreq) error = smbd_smb2_request_done(smb2req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c index 39be8293a88..7b92927864e 100644 --- a/source3/smbd/smb2_notify.c +++ b/source3/smbd/smb2_notify.c @@ -122,7 +122,7 @@ static void smbd_smb2_request_notify_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -135,7 +135,7 @@ static void smbd_smb2_request_notify_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -152,7 +152,7 @@ static void smbd_smb2_request_notify_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, &outdyn); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index b8ae74342a0..892fa1587d3 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -120,7 +120,7 @@ static void smbd_smb2_request_read_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -133,7 +133,7 @@ static void smbd_smb2_request_read_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -154,7 +154,7 @@ static void smbd_smb2_request_read_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, &outdyn); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 3de78b022f7..77aa4f18dd0 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -763,7 +763,6 @@ static void smb2_set_operation_credit(struct smbXsrv_connection *xconn, const struct iovec *in_vector, struct iovec *out_vector) { - struct smbd_server_connection *sconn = xconn->sconn; const uint8_t *inhdr = (const uint8_t *)in_vector->iov_base; uint8_t *outhdr = (uint8_t *)out_vector->iov_base; uint16_t credit_charge = 1; @@ -805,7 +804,7 @@ static void smb2_set_operation_credit(struct smbXsrv_connection *xconn, SMB_ASSERT(xconn->smb2.credits.max >= xconn->smb2.credits.granted); if (xconn->smb2.credits.max < credit_charge) { - smbd_server_connection_terminate(sconn, + smbd_server_connection_terminate(xconn, "client error: credit charge > max credits\n"); return; } @@ -1039,7 +1038,7 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req) return NT_STATUS_OK; } -void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn, +void smbd_server_connection_terminate_ex(struct smbXsrv_connection *xconn, const char *reason, const char *location) { @@ -1469,7 +1468,7 @@ static void smbd_smb2_request_pending_timer(struct tevent_context *ev, state = talloc_zero(req->xconn, struct smbd_smb2_request_pending_state); if (state == NULL) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(xconn, nt_errstr(NT_STATUS_NO_MEMORY)); return; } @@ -1573,7 +1572,7 @@ static void smbd_smb2_request_pending_timer(struct tevent_context *ev, &state->vector[1+SMBD_SMB2_TF_IOV_OFS], SMBD_SMB2_NUM_IOV_PER_REQ); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } @@ -1586,7 +1585,7 @@ static void smbd_smb2_request_pending_timer(struct tevent_context *ev, &state->vector[1+SMBD_SMB2_HDR_IOV_OFS], SMBD_SMB2_NUM_IOV_PER_REQ - 1); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } @@ -1600,7 +1599,7 @@ static void smbd_smb2_request_pending_timer(struct tevent_context *ev, status = smbd_smb2_flush_send_queue(xconn); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } @@ -2530,7 +2529,6 @@ void smbd_smb2_request_dispatch_immediate(struct tevent_context *ctx, { struct smbd_smb2_request *req = talloc_get_type_abort(private_data, struct smbd_smb2_request); - struct smbd_server_connection *sconn = req->sconn; struct smbXsrv_connection *xconn = req->xconn; NTSTATUS status; @@ -2544,13 +2542,13 @@ void smbd_smb2_request_dispatch_immediate(struct tevent_context *ctx, status = smbd_smb2_request_dispatch(req); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } status = smbd_smb2_request_next_incoming(xconn); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } } @@ -3010,37 +3008,37 @@ void smbd_smb2_first_negprot(struct smbXsrv_connection *xconn, status = smbd_initialize_smb2(xconn); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } status = smbd_smb2_request_create(xconn, inbuf, size, &req); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } status = smbd_smb2_request_validate(req); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } status = smbd_smb2_request_setup_out(req); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } status = smbd_smb2_request_dispatch(req); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } status = smbd_smb2_request_next_incoming(xconn); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } @@ -3444,12 +3442,11 @@ static void smbd_smb2_connection_handler(struct tevent_context *ev, struct smbXsrv_connection *xconn = talloc_get_type_abort(private_data, struct smbXsrv_connection); - struct smbd_server_connection *sconn = xconn->sconn; NTSTATUS status; status = smbd_smb2_io_handler(xconn, flags); if (!NT_STATUS_IS_OK(status)) { - smbd_server_connection_terminate(sconn, nt_errstr(status)); + smbd_server_connection_terminate(xconn, nt_errstr(status)); return; } } diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 3a80afdf2d0..efeac187bc3 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -129,7 +129,7 @@ static void smbd_smb2_request_sesssetup_done(struct tevent_req *subreq) status = nt_status_squash(status); error = smbd_smb2_request_error(smb2req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -144,7 +144,7 @@ static void smbd_smb2_request_sesssetup_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -166,7 +166,7 @@ static void smbd_smb2_request_sesssetup_done(struct tevent_req *subreq) error = smbd_smb2_request_done_ex(smb2req, status, outbody, &outdyn, __location__); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -833,7 +833,7 @@ static void smbd_smb2_request_logoff_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(smb2req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -844,7 +844,7 @@ static void smbd_smb2_request_logoff_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -856,7 +856,7 @@ static void smbd_smb2_request_logoff_done(struct tevent_req *subreq) error = smbd_smb2_request_done(smb2req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index 031c0be673f..3722697f4df 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -128,7 +128,7 @@ static void smbd_smb2_request_setinfo_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -139,7 +139,7 @@ static void smbd_smb2_request_setinfo_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -150,7 +150,7 @@ static void smbd_smb2_request_setinfo_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c index 5d78b4f840d..c39ed985d7f 100644 --- a/source3/smbd/smb2_tcon.c +++ b/source3/smbd/smb2_tcon.c @@ -126,7 +126,7 @@ static void smbd_smb2_request_tcon_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -139,7 +139,7 @@ static void smbd_smb2_request_tcon_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -161,7 +161,7 @@ static void smbd_smb2_request_tcon_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -454,7 +454,7 @@ static void smbd_smb2_request_tdis_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(smb2req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -465,7 +465,7 @@ static void smbd_smb2_request_tdis_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } @@ -477,7 +477,7 @@ static void smbd_smb2_request_tdis_done(struct tevent_req *subreq) error = smbd_smb2_request_done(smb2req, outbody, NULL); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(smb2req->sconn, + smbd_server_connection_terminate(smb2req->xconn, nt_errstr(error)); return; } diff --git a/source3/smbd/smb2_write.c b/source3/smbd/smb2_write.c index 35ee020e8be..508c0b362ca 100644 --- a/source3/smbd/smb2_write.c +++ b/source3/smbd/smb2_write.c @@ -134,7 +134,7 @@ static void smbd_smb2_request_write_done(struct tevent_req *subreq) if (!NT_STATUS_IS_OK(status)) { error = smbd_smb2_request_error(req, status); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -145,7 +145,7 @@ static void smbd_smb2_request_write_done(struct tevent_req *subreq) if (outbody.data == NULL) { error = smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } @@ -163,7 +163,7 @@ static void smbd_smb2_request_write_done(struct tevent_req *subreq) error = smbd_smb2_request_done(req, outbody, &outdyn); if (!NT_STATUS_IS_OK(error)) { - smbd_server_connection_terminate(req->sconn, nt_errstr(error)); + smbd_server_connection_terminate(req->xconn, nt_errstr(error)); return; } } diff --git a/source3/smbd/smbXsrv_session.c b/source3/smbd/smbXsrv_session.c index 560fa3c2b4d..bd08f6ba305 100644 --- a/source3/smbd/smbXsrv_session.c +++ b/source3/smbd/smbXsrv_session.c @@ -341,7 +341,7 @@ next: subreq = messaging_read_send(table, conn->ev_ctx, conn->msg_ctx, MSG_SMBXSRV_SESSION_CLOSE); if (subreq == NULL) { - smbd_server_connection_terminate(conn->sconn, + smbd_server_connection_terminate(conn, "msg_read_send() failed"); return; } |