diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-06-12 08:38:48 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-08-06 09:51:13 +0200 |
commit | c9e171ff72920c4d422045acbccf853cf1c27224 (patch) | |
tree | 570d1fa3976b745b899ceacc05653c876ed50afc /source3 | |
parent | b7eeb658e7a961e6ffd56b94a7bf2712330a0b2b (diff) | |
download | samba-c9e171ff72920c4d422045acbccf853cf1c27224.tar.gz |
s3:smb2_*: make use of smb2req->xconn where possible
We need to use the connection that is used by the current request.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/smb2_create.c | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_find.c | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_getinfo.c | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_ioctl_network_fs.c | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_negprot.c | 4 | ||||
-rw-r--r-- | source3/smbd/smb2_notify.c | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_read.c | 4 | ||||
-rw-r--r-- | source3/smbd/smb2_sesssetup.c | 10 | ||||
-rw-r--r-- | source3/smbd/smb2_setinfo.c | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_tcon.c | 4 | ||||
-rw-r--r-- | source3/smbd/smb2_write.c | 2 |
11 files changed, 18 insertions, 18 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 0c27a010587..7565201f85c 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -820,7 +820,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, DATA_BLOB new_cookie = data_blob_null; NTTIME now = timeval_to_nttime(&smb2req->request_time); - status = smb2srv_open_recreate(smb2req->sconn->conn, + status = smb2srv_open_recreate(smb2req->xconn, smb1req->conn->session_info, persistent_id, create_guid, now, &op); diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c index 2d310a51527..7597713834c 100644 --- a/source3/smbd/smb2_find.c +++ b/source3/smbd/smb2_find.c @@ -207,7 +207,7 @@ static struct tevent_req *smbd_smb2_find_send(TALLOC_CTX *mem_ctx, uint32_t in_output_buffer_length, const char *in_file_name) { - struct smbXsrv_connection *xconn = smb2req->sconn->conn; + struct smbXsrv_connection *xconn = smb2req->xconn; struct tevent_req *req; struct smbd_smb2_find_state *state; struct smb_request *smbreq; diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 275792c0412..87bb1c5f2e1 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -44,7 +44,7 @@ static NTSTATUS smbd_smb2_getinfo_recv(struct tevent_req *req, static void smbd_smb2_request_getinfo_done(struct tevent_req *subreq); NTSTATUS smbd_smb2_request_process_getinfo(struct smbd_smb2_request *req) { - struct smbXsrv_connection *xconn = req->sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; NTSTATUS status; const uint8_t *inbody; uint8_t in_info_type; diff --git a/source3/smbd/smb2_ioctl_network_fs.c b/source3/smbd/smb2_ioctl_network_fs.c index b2dfb212b03..30d02a216fa 100644 --- a/source3/smbd/smb2_ioctl_network_fs.c +++ b/source3/smbd/smb2_ioctl_network_fs.c @@ -506,7 +506,7 @@ struct tevent_req *smb2_ioctl_network_fs(uint32_t ctl_code, break; case FSCTL_VALIDATE_NEGOTIATE_INFO: status = fsctl_validate_neg_info(state, ev, - state->smbreq->sconn->conn, + state->smbreq->xconn, &state->in_input, state->in_max_output, &state->out_output, diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c index 3f76f3f0f51..feb5a4d6272 100644 --- a/source3/smbd/smb2_negprot.c +++ b/source3/smbd/smb2_negprot.c @@ -78,7 +78,7 @@ void reply_smb2002(struct smb_request *req, uint16_t choice) */ void reply_smb20ff(struct smb_request *req, uint16_t choice) { - struct smbXsrv_connection *xconn = req->sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; xconn->smb2.allow_2ff = true; reply_smb20xx(req, SMB2_DIALECT_REVISION_2FF); } @@ -170,7 +170,7 @@ enum protocol_types smbd_smb2_protocol_dialect_match(const uint8_t *indyn, NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req) { - struct smbXsrv_connection *xconn = req->sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; NTSTATUS status; const uint8_t *inbody; const uint8_t *indyn = NULL; diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c index 3e33d42bcee..39be8293a88 100644 --- a/source3/smbd/smb2_notify.c +++ b/source3/smbd/smb2_notify.c @@ -48,7 +48,7 @@ static NTSTATUS smbd_smb2_notify_recv(struct tevent_req *req, static void smbd_smb2_request_notify_done(struct tevent_req *subreq); NTSTATUS smbd_smb2_request_process_notify(struct smbd_smb2_request *req) { - struct smbXsrv_connection *xconn = req->sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; NTSTATUS status; const uint8_t *inbody; uint16_t in_flags; diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index 1679944ea20..b8ae74342a0 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -43,7 +43,7 @@ static NTSTATUS smbd_smb2_read_recv(struct tevent_req *req, static void smbd_smb2_request_read_done(struct tevent_req *subreq); NTSTATUS smbd_smb2_request_process_read(struct smbd_smb2_request *req) { - struct smbXsrv_connection *xconn = req->sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; NTSTATUS status; const uint8_t *inbody; uint32_t in_length; @@ -186,7 +186,7 @@ static int smb2_sendfile_send_data(struct smbd_smb2_read_state *state) uint64_t in_offset = state->in_offset; files_struct *fsp = state->fsp; const DATA_BLOB *hdr = state->smb2req->queue_entry.sendfile_header; - struct smbXsrv_connection *xconn = state->smb2req->sconn->conn; + struct smbXsrv_connection *xconn = state->smb2req->xconn; ssize_t nread; ssize_t ret; int saved_errno; diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index d4f0d793a56..3a80afdf2d0 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -479,7 +479,7 @@ static int smbd_smb2_session_setup_state_destructor(struct smbd_smb2_session_set * Ensure that any outstanding requests don't also refer * to it. */ - xconn = state->smb2req->sconn->conn; + xconn = state->smb2req->xconn; for (preq = xconn->smb2.requests; preq != NULL; preq = preq->next) { if (preq == state->smb2req) { @@ -549,7 +549,7 @@ static struct tevent_req *smbd_smb2_session_setup_send(TALLOC_CTX *mem_ctx, state->in_security_buffer = in_security_buffer; if (in_flags & SMB2_SESSION_FLAG_BINDING) { - if (smb2req->sconn->conn->protocol < PROTOCOL_SMB2_22) { + if (smb2req->xconn->protocol < PROTOCOL_SMB2_22) { tevent_req_nterror(req, NT_STATUS_REQUEST_NOT_ACCEPTED); return tevent_req_post(req, ev); } @@ -565,13 +565,13 @@ static struct tevent_req *smbd_smb2_session_setup_send(TALLOC_CTX *mem_ctx, if (state->in_session_id == 0) { /* create a new session */ - status = smbXsrv_session_create(state->smb2req->sconn->conn, + status = smbXsrv_session_create(state->smb2req->xconn, now, &state->session); if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } } else { - status = smb2srv_session_lookup(state->smb2req->sconn->conn, + status = smb2srv_session_lookup(state->smb2req->xconn, state->in_session_id, now, &state->session); if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_SESSION_EXPIRED)) { @@ -877,7 +877,7 @@ static struct tevent_req *smbd_smb2_logoff_send(TALLOC_CTX *mem_ctx, struct smbd_smb2_logout_state *state; struct tevent_req *subreq; struct smbd_smb2_request *preq; - struct smbXsrv_connection *xconn = smb2req->sconn->conn; + struct smbXsrv_connection *xconn = smb2req->xconn; req = tevent_req_create(mem_ctx, &state, struct smbd_smb2_logout_state); diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index 1b5e2a8e5e1..031c0be673f 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -39,7 +39,7 @@ static NTSTATUS smbd_smb2_setinfo_recv(struct tevent_req *req); static void smbd_smb2_request_setinfo_done(struct tevent_req *subreq); NTSTATUS smbd_smb2_request_process_setinfo(struct smbd_smb2_request *req) { - struct smbXsrv_connection *xconn = req->sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; NTSTATUS status; const uint8_t *inbody; uint8_t in_info_type; diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c index 6289427bf93..5d78b4f840d 100644 --- a/source3/smbd/smb2_tcon.c +++ b/source3/smbd/smb2_tcon.c @@ -175,7 +175,7 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req, uint32_t *out_maximal_access, uint32_t *out_tree_id) { - struct smbXsrv_connection *conn = req->sconn->conn; + struct smbXsrv_connection *conn = req->xconn; const char *share = in_path; char *service = NULL; int snum = -1; @@ -498,7 +498,7 @@ static struct tevent_req *smbd_smb2_tdis_send(TALLOC_CTX *mem_ctx, struct smbd_smb2_tdis_state *state; struct tevent_req *subreq; struct smbd_smb2_request *preq; - struct smbXsrv_connection *xconn = smb2req->sconn->conn; + struct smbXsrv_connection *xconn = smb2req->xconn; req = tevent_req_create(mem_ctx, &state, struct smbd_smb2_tdis_state); diff --git a/source3/smbd/smb2_write.c b/source3/smbd/smb2_write.c index 40a59372ee4..35ee020e8be 100644 --- a/source3/smbd/smb2_write.c +++ b/source3/smbd/smb2_write.c @@ -38,7 +38,7 @@ static NTSTATUS smbd_smb2_write_recv(struct tevent_req *req, static void smbd_smb2_request_write_done(struct tevent_req *subreq); NTSTATUS smbd_smb2_request_process_write(struct smbd_smb2_request *req) { - struct smbXsrv_connection *xconn = req->sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; NTSTATUS status; const uint8_t *inbody; uint16_t in_data_offset; |