diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-12-30 13:29:54 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-24 17:34:55 +0100 |
commit | 55279dfbe3770563016723c3ba7d1dbbec3d4437 (patch) | |
tree | fac8e0937ee2445403047c6b8a0188d42aa3dd19 /source3 | |
parent | eb1780981252f05c792a1e40b7d0471f5b670ef5 (diff) | |
download | samba-55279dfbe3770563016723c3ba7d1dbbec3d4437.tar.gz samba-55279dfbe3770563016723c3ba7d1dbbec3d4437.tar.bz2 samba-55279dfbe3770563016723c3ba7d1dbbec3d4437.zip |
s3:ntlmssp: remove server_name from ntlmssp_state and fill the server.* fields also for the client
Inspired by the NTLMSSP merge work by Andrew Bartlett.
metze
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/ntlmssp.h | 1 | ||||
-rw-r--r-- | source3/libsmb/cliconnect.c | 2 | ||||
-rw-r--r-- | source3/libsmb/ntlmssp.c | 11 |
3 files changed, 11 insertions, 3 deletions
diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h index 9c9b1fc951..f44922f7b5 100644 --- a/source3/include/ntlmssp.h +++ b/source3/include/ntlmssp.h @@ -55,7 +55,6 @@ struct ntlmssp_state char *workstation; unsigned char *nt_hash; unsigned char *lm_hash; - char *server_domain; struct { bool is_standalone; diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 256ca2e027..11faa27b3f 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1061,7 +1061,7 @@ static void cli_session_setup_ntlmssp_done(struct tevent_req *subreq) if (NT_STATUS_IS_OK(status)) { if (state->cli->server_domain[0] == '\0') { fstrcpy(state->cli->server_domain, - state->ntlmssp_state->server_domain); + state->ntlmssp_state->server.netbios_domain); } cli_set_session_key( state->cli, state->ntlmssp_state->session_key); diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index ac856bc489..8723588467 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -1140,7 +1140,16 @@ noccache: return NT_STATUS_INVALID_PARAMETER; } - ntlmssp_state->server_domain = server_domain; + if (chal_flags & NTLMSSP_TARGET_TYPE_SERVER) { + ntlmssp_state->server.is_standalone = true; + } else { + ntlmssp_state->server.is_standalone = false; + } + /* TODO: parse struct_blob and fill in the rest */ + ntlmssp_state->server.netbios_name = ""; + ntlmssp_state->server.netbios_domain = server_domain; + ntlmssp_state->server.dns_name = ""; + ntlmssp_state->server.dns_domain = ""; if (challenge_blob.length != 8) { data_blob_free(&struct_blob); |