From 7cbc768376ed0a839afca64aeea99cd53d0fbc6f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 16 Jan 2005 11:15:08 +0000 Subject: 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) --- source4/torture/basic/secleak.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source4/torture/basic/secleak.c') diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c index a2d992cfc7..4ff34e166f 100644 --- a/source4/torture/basic/secleak.c +++ b/source4/torture/basic/secleak.c @@ -23,22 +23,22 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" #include "system/time.h" +#include "libcli/composite/composite.h" static BOOL try_failed_login(struct smbcli_state *cli) { NTSTATUS status; - union smb_sesssetup setup; + struct smb_composite_sesssetup setup; struct smbcli_session *session; session = smbcli_session_init(cli->transport); - setup.generic.level = RAW_SESSSETUP_GENERIC; - setup.generic.in.sesskey = cli->transport->negotiate.sesskey; - setup.generic.in.capabilities = cli->transport->negotiate.capabilities; - setup.generic.in.password = "INVALID-PASSWORD"; - setup.generic.in.user = "INVALID-USERNAME"; - setup.generic.in.domain = "INVALID-DOMAIN"; + setup.in.sesskey = cli->transport->negotiate.sesskey; + setup.in.capabilities = cli->transport->negotiate.capabilities; + setup.in.password = "INVALID-PASSWORD"; + setup.in.user = "INVALID-USERNAME"; + setup.in.domain = "INVALID-DOMAIN"; - status = smb_raw_session_setup(session, session, &setup); + status = smb_composite_sesssetup(session, &setup); talloc_free(session); if (NT_STATUS_IS_OK(status)) { printf("Allowed session setup with invalid credentials?!\n"); -- cgit