1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00

s3:libsmb: don't rely on gensec_session_key() to work on an unfinished authentication

If smbXcli_session_is_guest() returns true, we should handle the authentication
as anonymous and don't touch the gensec context anymore.

Note that smbXcli_session_is_guest() always returns false, if signing is
required!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2017-05-10 16:17:48 +02:00 committed by Andrew Bartlett
parent 76693c197a
commit f4424579a0

View File

@ -1070,13 +1070,16 @@ static void cli_session_setup_gensec_remote_done(struct tevent_req *subreq)
* We can't finish the gensec handshake, we don't
* have a negotiated session key.
*
* So just pretend we are completely done.
* So just pretend we are completely done,
* we need to continue as anonymous from this point,
* as we can't get a session key.
*
* Note that smbXcli_session_is_guest()
* always returns false if we require signing.
*/
state->blob_in = data_blob_null;
state->local_ready = true;
state->is_anonymous = true;
}
state->remote_ready = true;