summaryrefslogtreecommitdiff
path: root/source4/libcli/smb_composite/sesssetup.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-25 15:08:52 +0100
committerAndrew Bartlett <abartlet@samba.org>2008-04-25 15:08:52 +0100
commitc4219fd8030494986c5fa418c46defb1a9c05c7e (patch)
treefe4d513e171fbfa89d9838052c4cee9a87ddaa6a /source4/libcli/smb_composite/sesssetup.c
parentee70e01e3e4d5f4501dea1b217ff29d978b94548 (diff)
downloadsamba-c4219fd8030494986c5fa418c46defb1a9c05c7e.tar.gz
samba-c4219fd8030494986c5fa418c46defb1a9c05c7e.tar.bz2
samba-c4219fd8030494986c5fa418c46defb1a9c05c7e.zip
Make the composite 'connect to server' code useful for security=server
The ability to short-circuit the connection code to only do a negprot allows us to do the rest once we have the user's password. We return the 8 byte challenge so we can pass it to the client. Andrew Bartlett (This used to be commit 40fe386b0374df8b390b995c332d048dbbc08f1b)
Diffstat (limited to 'source4/libcli/smb_composite/sesssetup.c')
-rw-r--r--source4/libcli/smb_composite/sesssetup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c
index 1427fe525b..11ac37e257 100644
--- a/source4/libcli/smb_composite/sesssetup.c
+++ b/source4/libcli/smb_composite/sesssetup.c
@@ -224,7 +224,6 @@ static NTSTATUS session_setup_nt1(struct composite_context *c,
{
NTSTATUS nt_status;
struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state);
- const char *password = cli_credentials_get_password(io->in.credentials);
DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, lp_iconv_convenience(global_loadparm), session->transport->socket->hostname, lp_workgroup(global_loadparm));
DATA_BLOB session_key;
int flags = CLI_CRED_NTLM_AUTH;
@@ -266,6 +265,7 @@ static NTSTATUS session_setup_nt1(struct composite_context *c,
data_blob_free(&session_key);
} else if (session->options.plaintext_auth) {
+ const char *password = cli_credentials_get_password(io->in.credentials);
state->setup.nt1.in.password1 = data_blob_talloc(state, password, strlen(password));
state->setup.nt1.in.password2 = data_blob(NULL, 0);
} else {