From e7d5f0a357c42593a015b80390dedf920117a7e2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 17 Oct 2011 09:22:33 +0200 Subject: gensec: move event context from gensec_*_init() to gensec_update() This avoids keeping the event context around on a the gensec_security context structure long term. In the Samba3 server, the event context we either supply is a NULL pointer as no server-side modules currently use the event context. Andrew Bartlett Signed-off-by: Stefan Metzmacher --- source4/smb_server/smb/negprot.c | 2 +- source4/smb_server/smb2/negprot.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/smb_server') diff --git a/source4/smb_server/smb/negprot.c b/source4/smb_server/smb/negprot.c index 378330ff28..739881dadc 100644 --- a/source4/smb_server/smb/negprot.c +++ b/source4/smb_server/smb/negprot.c @@ -392,7 +392,7 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice) if (NT_STATUS_IS_OK(nt_status)) { /* Get and push the proposed OID list into the packets */ - nt_status = gensec_update(gensec_security, req, null_data_blob, &blob); + nt_status = gensec_update(gensec_security, req, req->smb_conn->connection->event.ctx, null_data_blob, &blob); if (!NT_STATUS_IS_OK(nt_status) && !NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { DEBUG(1, ("Failed to get SPNEGO to give us the first token: %s\n", nt_errstr(nt_status))); diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c index bc896aa924..dd69c9fc7e 100644 --- a/source4/smb_server/smb2/negprot.c +++ b/source4/smb_server/smb2/negprot.c @@ -79,7 +79,7 @@ static NTSTATUS smb2srv_negprot_secblob(struct smb2srv_request *req, DATA_BLOB * return nt_status; } - nt_status = gensec_update(gensec_security, req, null_data_blob, &blob); + nt_status = gensec_update(gensec_security, req, req->smb_conn->connection->event.ctx, null_data_blob, &blob); if (!NT_STATUS_IS_OK(nt_status) && !NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { DEBUG(0, ("Failed to get SPNEGO to give us the first token: %s\n", nt_errstr(nt_status))); smbsrv_terminate_connection(req->smb_conn, "Failed to start SPNEGO - no first token\n"); -- cgit