diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-25 15:59:22 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-25 15:59:22 +0100 |
commit | 35e45534c64930a0f22c5975c64be41d96265a00 (patch) | |
tree | a49ce919d94a53449b8bbb57ebe862216b455ec1 /source4 | |
parent | c4219fd8030494986c5fa418c46defb1a9c05c7e (diff) | |
download | samba-35e45534c64930a0f22c5975c64be41d96265a00.tar.gz samba-35e45534c64930a0f22c5975c64be41d96265a00.tar.bz2 samba-35e45534c64930a0f22c5975c64be41d96265a00.zip |
Revert to using the old CIFS connection API.
Rather than add a new 'out' member to the API, simply fill in the
'tree' early enough that we can access the server challenge there.
Andrew Bartlett
(This used to be commit 6dbbcf8aaf9b93af970d1701dfb185460d4dc788)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/smb_composite/connect.c | 24 | ||||
-rw-r--r-- | source4/libcli/smb_composite/smb_composite.h | 1 |
2 files changed, 8 insertions, 17 deletions
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c index 4400c61a81..39c614f042 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -122,9 +122,6 @@ static NTSTATUS connect_session_setup_anon(struct composite_context *c, state->session->vuid = state->io_setup->out.vuid; /* setup for a tconx */ - io->out.tree = smbcli_tree_init(state->session, state, true); - NT_STATUS_HAVE_NO_MEMORY(io->out.tree); - state->io_tcon = talloc(c, union smb_tcon); NT_STATUS_HAVE_NO_MEMORY(state->io_tcon); @@ -211,10 +208,6 @@ static NTSTATUS connect_session_setup(struct composite_context *c, return NT_STATUS_OK; } - /* setup for a tconx */ - io->out.tree = smbcli_tree_init(state->session, state, true); - NT_STATUS_HAVE_NO_MEMORY(io->out.tree); - state->io_tcon = talloc(c, union smb_tcon); NT_STATUS_HAVE_NO_MEMORY(state->io_tcon); @@ -259,11 +252,14 @@ static NTSTATUS connect_negprot(struct composite_context *c, status = smb_raw_negotiate_recv(state->req); NT_STATUS_NOT_OK_RETURN(status); - if (!(state->transport->negotiate.capabilities & CAP_EXTENDED_SECURITY)) { - io->out.negprot_challenge = state->transport->negotiate.secblob; - } else { - io->out.negprot_challenge = data_blob(NULL, 0); - } + /* next step is a session setup */ + state->session = smbcli_session_init(state->transport, state, true); + NT_STATUS_HAVE_NO_MEMORY(state->session); + + /* setup for a tconx (or at least have the structure ready to + * return, if we won't go that far) */ + io->out.tree = smbcli_tree_init(state->session, state, true); + NT_STATUS_HAVE_NO_MEMORY(io->out.tree); /* If we don't have any credentials then this indicates that * we don't want to do a session setup */ @@ -272,10 +268,6 @@ static NTSTATUS connect_negprot(struct composite_context *c, return NT_STATUS_OK; } - /* next step is a session setup */ - state->session = smbcli_session_init(state->transport, state, true); - NT_STATUS_HAVE_NO_MEMORY(state->session); - state->io_setup = talloc(c, struct smb_composite_sesssetup); NT_STATUS_HAVE_NO_MEMORY(state->io_setup); diff --git a/source4/libcli/smb_composite/smb_composite.h b/source4/libcli/smb_composite/smb_composite.h index 80746f2732..afee11ce3b 100644 --- a/source4/libcli/smb_composite/smb_composite.h +++ b/source4/libcli/smb_composite/smb_composite.h @@ -101,7 +101,6 @@ struct smb_composite_connect { struct { struct smbcli_tree *tree; bool anonymous_fallback_done; - DATA_BLOB negprot_challenge; } out; }; |