diff options
author | Michael Adam <obnox@samba.org> | 2015-07-29 11:19:55 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2015-07-29 18:26:07 +0200 |
commit | 8ab4b05d3302d543037973e26609e2d27bb6bc15 (patch) | |
tree | 24f29d77f1a3c062a1add9b8d0536c460fe45039 /source3/smbd/smb2_sesssetup.c | |
parent | 19ec5f3474efa5ce62f78ae723f1e41b87a7c51a (diff) | |
download | samba-8ab4b05d3302d543037973e26609e2d27bb6bc15.tar.gz |
s3:smb2_sesssetup: check that the connection belongs to the session in sess.setup
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/smbd/smb2_sesssetup.c')
-rw-r--r-- | source3/smbd/smb2_sesssetup.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 11d381fcdb4..3233846295a 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -561,6 +561,7 @@ static struct tevent_req *smbd_smb2_session_setup_send(TALLOC_CTX *mem_ctx, NTSTATUS status; NTTIME now = timeval_to_nttime(&smb2req->request_time); struct tevent_req *subreq; + struct smbXsrv_channel_global0 *c = NULL; req = tevent_req_create(mem_ctx, &state, struct smbd_smb2_session_setup_state); @@ -618,6 +619,13 @@ static struct tevent_req *smbd_smb2_session_setup_send(TALLOC_CTX *mem_ctx, } } + status = smbXsrv_session_find_channel(smb2req->session, + smb2req->xconn, &c); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return tevent_req_post(req, ev); + } + if (state->session->gensec == NULL) { status = auth_generic_prepare(state->session, state->smb2req->xconn->remote_address, |