summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-08-10 20:18:05 +0000
committerVolker Lendecke <vlendec@samba.org>2003-08-10 20:18:05 +0000
commit94bbd5c93a777ad1a6b3951358306e29e6277251 (patch)
treec1bccaa39a3530587218d05adb39b415614ea025
parent8829553b167ecf9460437a8fe2eb1cb93d044a4e (diff)
downloadsamba-94bbd5c93a777ad1a6b3951358306e29e6277251.tar.gz
samba-94bbd5c93a777ad1a6b3951358306e29e6277251.tar.bz2
samba-94bbd5c93a777ad1a6b3951358306e29e6277251.zip
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 used to be commit 62b04d7776852098dd768268500f36c3a362f688)
-rw-r--r--source3/include/ntlmssp.h1
-rw-r--r--source3/libsmb/cliconnect.c1
-rw-r--r--source3/libsmb/ntlmssp.c3
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);