summaryrefslogtreecommitdiff
path: root/source4/libcli/composite/connect.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-08-23 05:29:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:24 -0500
commitba90b652d918fb34f1e43083f8283f669c73c340 (patch)
tree2c656b05b9d164c9294f5c47089481355685336e /source4/libcli/composite/connect.c
parent8f9478b09d39d8c13871684a6af3d3e1629a0e84 (diff)
downloadsamba-ba90b652d918fb34f1e43083f8283f669c73c340.tar.gz
samba-ba90b652d918fb34f1e43083f8283f669c73c340.tar.bz2
samba-ba90b652d918fb34f1e43083f8283f669c73c340.zip
r9505: Work on GENSEC and the code that calls it, for tighter interface
requirements, and for better error reporting. In particular, the composite session setup (extended security/SPNEGO) code now returns errors, rather than NT_STATUS_NO_MEMORY. This is seen particularly when GENSEC fails to start. The tighter interface rules apply to NTLMSSP, which must be called exactly the right number of times. This is to match some of our other less-tested modules, where adding flexablity is harder. (and this is security code, so let's just get it right). As such, the DCE/RPC and LDAP clients have been updated. Andrew Bartlett (This used to be commit 134550cf752b9edad66c3368750bfb4bbd9d55d1)
Diffstat (limited to 'source4/libcli/composite/connect.c')
-rw-r--r--source4/libcli/composite/connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/composite/connect.c b/source4/libcli/composite/connect.c
index adac9bcf67..4d35f5c73a 100644
--- a/source4/libcli/composite/connect.c
+++ b/source4/libcli/composite/connect.c
@@ -136,6 +136,9 @@ static NTSTATUS connect_session_setup(struct composite_context *c,
state->req = smb_raw_tcon_send(io->out.tree, state->io_tcon);
NT_STATUS_HAVE_NO_MEMORY(state->req);
+ if (state->req->state == SMBCLI_REQUEST_ERROR) {
+ return state->req->status;
+ }
state->req->async.fn = request_handler;
state->req->async.private = c;
@@ -171,6 +174,9 @@ static NTSTATUS connect_negprot(struct composite_context *c,
state->creq = smb_composite_sesssetup_send(state->session, state->io_setup);
NT_STATUS_HAVE_NO_MEMORY(state->creq);
+ if (state->creq->state == SMBCLI_REQUEST_ERROR) {
+ return state->creq->status;
+ }
state->creq->async.fn = composite_handler;
state->creq->async.private = c;