Author: jra Date: 2005-09-17 06:21:08 +0000 (Sat, 17 Sep 2005) New Revision: 10289
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10289 Log: We now send and receive the SPNEGO NTLMSSP blob with alter ctx and reply - but I still need to feed the reply into the NTLMSSP lib to get to "finished" (it doesn't actually do anything but still needs doing for completeness - the sending and receiving of sealed packets actually works now). Jeremy. Modified: trunk/source/rpc_client/cli_pipe.c Changeset: Modified: trunk/source/rpc_client/cli_pipe.c =================================================================== --- trunk/source/rpc_client/cli_pipe.c 2005-09-17 04:02:47 UTC (rev 10288) +++ trunk/source/rpc_client/cli_pipe.c 2005-09-17 06:21:08 UTC (rev 10289) @@ -1812,7 +1812,6 @@ RPC_HDR_AUTH hdr_auth; NTSTATUS nt_status; prs_struct rpc_out; - ssize_t ret; if (!phdr->auth_len || (phdr->frag_len < phdr->auth_len + RPC_HDR_AUTH_LEN)) { return NT_STATUS_INVALID_PARAMETER; @@ -1877,23 +1876,27 @@ return nt_status; } - /* 8 here is named pipe message mode. */ - ret = cli_write(cli->cli, cli->fnum, 0x8, prs_data_p(&rpc_out), 0, - (size_t)prs_offset(&rpc_out)); + /* Initialize the returning data struct. */ + prs_mem_free(rbuf); + prs_init(rbuf, 0, cli->cli->mem_ctx, UNMARSHALL); - if (ret != (ssize_t)prs_offset(&rpc_out)) { - DEBUG(0,("rpc_finish_spnego_ntlmssp_bind: cli_write failed. Return was %d\n", (int)ret)); + nt_status = rpc_api_pipe(cli, &rpc_out, rbuf, RPC_ALTCONTRESP); + if (!NT_STATUS_IS_OK(nt_status)) { prs_mem_free(&rpc_out); - return cli_get_nt_error(cli->cli); + prs_mem_free(rbuf); + return nt_status; } + prs_mem_free(&rpc_out); + + /* TODO - finish the ntlmssp bind... */ + DEBUG(5,("rpc_finish_spnego_ntlmssp_bind:: Sent alter context request to " "remote machine %s pipe %s fnum 0x%x.\n", cli->cli->desthost, cli->pipe_name, (unsigned int)cli->fnum)); - prs_mem_free(&rpc_out); return NT_STATUS_OK; }
