1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

Store the server domain from the ntlmssp challenge in the client struct

to be able to ask a LMB for the servers in its workgroup. Against
W2k this only works on port 139....

Volker
This commit is contained in:
Volker Lendecke 0001-01-01 00:00:00 +00:00
parent 082b1cf06f
commit 62b04d7776
3 changed files with 5 additions and 0 deletions

View File

@ -100,6 +100,7 @@ typedef struct ntlmssp_client_state
char *domain;
char *workstation;
char *password;
char *server_domain;
const char *(*get_global_myname)(void);
const char *(*get_domain)(void);

View File

@ -610,6 +610,7 @@ static BOOL cli_session_setup_ntlmssp(struct cli_state *cli, const char *user,
} while (NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED));
if (NT_STATUS_IS_OK(nt_status)) {
fstrcpy(cli->server_domain, ntlmssp_state->server_domain);
set_cli_session_key(cli, ntlmssp_state->session_key);
}

View File

@ -529,6 +529,9 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_client_state *ntlmssp_st
return NT_STATUS_INVALID_PARAMETER;
}
ntlmssp_state->server_domain = talloc_strdup(ntlmssp_state->mem_ctx,
server_domain);
SAFE_FREE(server_domain);
if (challenge_blob.length != 8) {
data_blob_free(&struct_blob);