diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-07-17 20:49:34 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-07-25 13:51:11 +0200 |
commit | a97057d5b88c02bb3874f2dfe2ed5a8c2edfc596 (patch) | |
tree | 005e4b3f52088c025fdc5f0b63d995ee3204846e /auth | |
parent | f7f9de406a2d1a5e4fea1633c77c3907545a48a3 (diff) | |
download | samba-a97057d5b88c02bb3874f2dfe2ed5a8c2edfc596.tar.gz |
auth/spnego: make sure we don't return OK without sub_sec_ready in gensec_spnego_client_negTokenTarg()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/gensec/spnego.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/auth/gensec/spnego.c b/auth/gensec/spnego.c index 87a0791149f..22abad342b1 100644 --- a/auth/gensec/spnego.c +++ b/auth/gensec/spnego.c @@ -844,6 +844,12 @@ static NTSTATUS gensec_spnego_client_negTokenTarg(struct gensec_security *gensec if (sub_out.length == 0 && mech_list_mic.length == 0) { *out = data_blob_null; + if (!spnego_state->sub_sec_ready) { + /* somethings wrong here... */ + DBG_ERR("gensec_update not ready without output\n"); + return NT_STATUS_INTERNAL_ERROR; + } + if (ta->negResult != SPNEGO_ACCEPT_COMPLETED) { /* unless of course it did not accept */ DBG_WARNING("gensec_update ok but not accepted\n"); |