summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-05-11 15:36:31 +0200
committerAndrew Bartlett <abartlet@samba.org>2017-05-21 21:05:08 +0200
commit314b577861ee0e6f5498fd2d0a49a76892772849 (patch)
treed3d670b707cfc95d77cf032387f246abed5aa81e /source4/smb_server
parentf4424579a0b4305751b308588c40cb7c005bd9e9 (diff)
downloadsamba-314b577861ee0e6f5498fd2d0a49a76892772849.tar.gz
s4:smb_server: avoid using gensec_update_ev() for the negotiate blob
Getting the SPNEGO mech type blob, we don't expect to block for any network io, so we can also use gensec_update() which creates a temporary event context. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/negprot.c3
-rw-r--r--source4/smb_server/smb2/negprot.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/source4/smb_server/smb/negprot.c b/source4/smb_server/smb/negprot.c
index dfcc1a29bf2..79f506961ed 100644
--- a/source4/smb_server/smb/negprot.c
+++ b/source4/smb_server/smb/negprot.c
@@ -418,7 +418,8 @@ 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_ev(gensec_security, req, req->smb_conn->connection->event.ctx, null_data_blob, &blob);
+ nt_status = gensec_update(gensec_security, req,
+ 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 addd278eb4c..4aaaf46793b 100644
--- a/source4/smb_server/smb2/negprot.c
+++ b/source4/smb_server/smb2/negprot.c
@@ -81,7 +81,8 @@ static NTSTATUS smb2srv_negprot_secblob(struct smb2srv_request *req, DATA_BLOB *
return nt_status;
}
- nt_status = gensec_update_ev(gensec_security, req, req->smb_conn->connection->event.ctx, null_data_blob, &blob);
+ nt_status = gensec_update(gensec_security, req,
+ 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");