diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-13 21:17:02 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-15 12:12:27 +0200 |
commit | bc72a9c169dbaab1dd078e61c9cc1ee06e2b2995 (patch) | |
tree | 588d885d803d398ba7fcdbc587f7982bb629160d /source3/libsmb | |
parent | 1f6060a3c1ae4057102a30d3afb12e6ec1a36a1b (diff) | |
download | samba-bc72a9c169dbaab1dd078e61c9cc1ee06e2b2995.tar.gz samba-bc72a9c169dbaab1dd078e61c9cc1ee06e2b2995.tar.bz2 samba-bc72a9c169dbaab1dd078e61c9cc1ee06e2b2995.zip |
s3:libsmb: make use of cli_state_server_gss_blob()
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 865e03bde7..4963332c0d 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1774,15 +1774,21 @@ static ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, char *principal = NULL; char *OIDs[ASN1_MAX_OIDS]; int i; - DATA_BLOB blob; + DATA_BLOB *server_blob; + DATA_BLOB blob = data_blob_null; const char *p = NULL; char *account = NULL; NTSTATUS status; - DEBUG(3,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)cli->secblob.length)); + server_blob = cli_state_server_gss_blob(cli); + if (server_blob) { + blob = data_blob(server_blob->data, server_blob->length); + } + + DEBUG(3,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)blob.length)); /* the server might not even do spnego */ - if (cli->secblob.length == 0) { + if (blob.length == 0) { DEBUG(3,("server didn't supply a full spnego negprot\n")); goto ntlmssp; } @@ -1791,8 +1797,6 @@ static ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, file_save("negprot.dat", cli->secblob.data, cli->secblob.length); #endif - blob = data_blob(cli->secblob.data, cli->secblob.length); - /* The server sent us the first part of the SPNEGO exchange in the * negprot reply. It is WRONG to depend on the principal sent in the * negprot reply, but right now we do it. If we don't receive one, |