diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-04-19 07:20:28 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-04-29 12:06:25 +0200 |
commit | 0eebd689c51bddc140b0c00fb10242bace07de2d (patch) | |
tree | d8f0606527608a1c20f79e9689bbd8191eb7cf12 | |
parent | 163b9acaab45405d5bdeb8e88075ca3815b69843 (diff) | |
download | samba-0eebd689c51bddc140b0c00fb10242bace07de2d.tar.gz |
s3:libsmb: don't finish the gensec handshake for guest logins
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11841
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit fa5799207e55ee8e329f36f784d027845eaf0e34)
-rw-r--r-- | source3/libsmb/cliconnect.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index bad6c288a13..c4ac605396c 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1590,6 +1590,27 @@ static void cli_session_setup_gensec_remote_done(struct tevent_req *subreq) } if (NT_STATUS_IS_OK(status)) { + struct smbXcli_session *session = NULL; + bool is_guest = false; + + if (smbXcli_conn_protocol(state->cli->conn) >= PROTOCOL_SMB2_02) { + session = state->cli->smb2.session; + } else { + session = state->cli->smb1.session; + } + + is_guest = smbXcli_session_is_guest(session); + if (is_guest) { + /* + * We can't finish the gensec handshake, we don't + * have a negotiated session key. + * + * So just pretend we are completely done. + */ + state->blob_in = data_blob_null; + state->local_ready = true; + } + state->remote_ready = true; } |