1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r20107: don't segfault when the server didn't send a supportedMech in a negTokenTarg

this happens because we send 1.2.840.113554.1.2.2 before 1.2.840.48018.1.2.2
in the negTokenInit. And w2k's spnego code redirects us to use 1.2.840.48018.1.2.2
and then we start the our spnego engine with 1.2.840.48018.1.2.2 and in the then following
negTokenTarg w2k don't send the supportedMech (which means it aggrees in what we've choosen)

metze
(This used to be commit 5af5488593)
This commit is contained in:
Stefan Metzmacher 2006-12-11 16:36:30 +00:00 committed by Gerald (Jerry) Carter
parent 2cd08c14a0
commit ae9f7857d5

View File

@ -904,6 +904,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
/* Server didn't like our choice of mech, and chose something else */
if ((spnego.negTokenTarg.negResult == SPNEGO_ACCEPT_INCOMPLETE) &&
spnego.negTokenTarg.supportedMech &&
strcmp(spnego.negTokenTarg.supportedMech, spnego_state->neg_oid) != 0) {
DEBUG(3,("GENSEC SPNEGO: client preferred mech (%s) not accepted, server wants: %s\n",
gensec_get_name_by_oid(spnego.negTokenTarg.supportedMech),