diff options
-rw-r--r-- | source3/include/ntlmssp.h | 1 | ||||
-rw-r--r-- | source3/libsmb/cliconnect.c | 1 | ||||
-rw-r--r-- | source3/libsmb/ntlmssp.c | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h index 562e4853cc..f1b1bc25e4 100644 --- a/source3/include/ntlmssp.h +++ b/source3/include/ntlmssp.h @@ -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); diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 94fe04a480..a1a207d197 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -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); } diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index a50ae9b70f..e76ad75e6e 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -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); |