summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/clisocket.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-16 11:15:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:53 -0500
commit7cbc768376ed0a839afca64aeea99cd53d0fbc6f (patch)
tree116b18a6fc59ec306275f32c136201f83708e5fc /source4/libcli/raw/clisocket.c
parent6eabc2a711446819e0694bd56eb71ea7f101ae66 (diff)
downloadsamba-7cbc768376ed0a839afca64aeea99cd53d0fbc6f.tar.gz
samba-7cbc768376ed0a839afca64aeea99cd53d0fbc6f.tar.bz2
samba-7cbc768376ed0a839afca64aeea99cd53d0fbc6f.zip
r4777: added a smb_composite_sesssetup() async composite function. This
encapsulates all the different session setup methods, including the multi-pass spnego code. I have hooked this into all the places that previously used the RAW_SESSSETUP_GENERIC method, and have removed the old RAW_SESSSETUP_GENERIC code from clisession.c and clitree.c. A nice side effect is that these two modules are now very simple again, back to being "raw" session setup handling, which was what was originally intended. I have also used this to replace the session setup code in the smb_composite_connect() code, and used that to build a very simple replacement for smbcli_tree_full_connection(). As a result, smbclient, smbtorture and all our other SMB connection code now goes via these composite async functions. That should give them a good workout! (This used to be commit 080d0518bc7d6fd4bc3ef783e7d4d2e3275d0799)
Diffstat (limited to 'source4/libcli/raw/clisocket.c')
-rw-r--r--source4/libcli/raw/clisocket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index 851cf67caa..ad1c6a13b8 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -1,5 +1,6 @@
/*
Unix SMB/CIFS implementation.
+
SMB client socket context management functions
Copyright (C) Andrew Tridgell 1994-2005
@@ -72,6 +73,7 @@ static void smbcli_sock_connect_handler(struct event_context *ev, struct fd_even
c->status = socket_connect_complete(conn->sock->sock, 0);
if (NT_STATUS_IS_OK(c->status)) {
socket_set_option(conn->sock->sock, lp_socket_options(), NULL);
+ conn->sock->hostname = talloc_strdup(conn->sock, conn->dest_host);
c->state = SMBCLI_REQUEST_DONE;
if (c->async.fn) {
c->async.fn(c);