diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-06-11 12:41:26 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-08-06 09:51:13 +0200 |
commit | e9fb54c1ec977e5e16733b8ccc0d9de5e4d4d83f (patch) | |
tree | 8ede52e8645066ede0e39d20cd65d5bf9ad5568e /source3/smbd | |
parent | 888ddd171ab0a750cc30e335ed82867338356efa (diff) | |
download | samba-e9fb54c1ec977e5e16733b8ccc0d9de5e4d4d83f.tar.gz |
s3:smbd: pass smbXsrv_connection to negprot_spnego()
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/smbd')
-rw-r--r-- | source3/smbd/globals.h | 2 | ||||
-rw-r--r-- | source3/smbd/negprot.c | 11 | ||||
-rw-r--r-- | source3/smbd/smb2_negprot.c | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 41dd2e4c87c..3542951fbcf 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -111,7 +111,7 @@ extern bool exit_firsttime; struct tstream_context; struct smbd_smb2_request; -DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn); +DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbXsrv_connection *xconn); void smbd_lock_socket(struct smbd_server_connection *sconn); void smbd_unlock_socket(struct smbd_server_connection *sconn); diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 67b66b8b981..7db714d7f6f 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -160,9 +160,8 @@ static void reply_lanman2(struct smb_request *req, uint16 choice) Generate the spnego negprot reply blob. Return the number of bytes used. ****************************************************************************/ -DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn) +DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbXsrv_connection *xconn) { - struct smbXsrv_connection *xconn = sconn->conn; DATA_BLOB blob = data_blob_null; DATA_BLOB blob_out = data_blob_null; nstring dos_name; @@ -175,7 +174,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn) /* See if we can get an SPNEGO blob */ status = auth_generic_prepare(talloc_tos(), - sconn->remote_address, + xconn->remote_address, &gensec_security); if (NT_STATUS_IS_OK(status)) { status = gensec_start_mech_by_oid(gensec_security, GENSEC_OID_SPNEGO); @@ -254,7 +253,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice) struct timespec ts; ssize_t ret; struct smbd_server_connection *sconn = req->sconn; - struct smbXsrv_connection *xconn = sconn->conn; + struct smbXsrv_connection *xconn = req->xconn; bool signing_desired = false; bool signing_required = false; @@ -334,7 +333,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice) SSVAL(req->outbuf,smb_vwv0,choice); SCVAL(req->outbuf,smb_vwv1,secword); - smbXsrv_connection_init_tables(req->sconn->conn, PROTOCOL_NT1); + smbXsrv_connection_init_tables(xconn, PROTOCOL_NT1); SSVAL(req->outbuf,smb_vwv1+1, lp_max_mux()); /* maxmpx */ SSVAL(req->outbuf,smb_vwv2+1, 1); /* num vcs */ @@ -381,7 +380,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice) } DEBUG(3,("not using SPNEGO\n")); } else { - DATA_BLOB spnego_blob = negprot_spnego(req, req->sconn); + DATA_BLOB spnego_blob = negprot_spnego(req, xconn); if (spnego_blob.data == NULL) { reply_nterror(req, NT_STATUS_NO_MEMORY); diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c index e9d17e283b4..65246581b2b 100644 --- a/source3/smbd/smb2_negprot.c +++ b/source3/smbd/smb2_negprot.c @@ -259,7 +259,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req) DEBUG(3,("Selected protocol %s\n", remote_proto)); /* negprot_spnego() returns a the server guid in the first 16 bytes */ - negprot_spnego_blob = negprot_spnego(req, req->sconn); + negprot_spnego_blob = negprot_spnego(req, xconn); if (negprot_spnego_blob.data == NULL) { return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); } |