diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-03-27 07:53:47 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-03-27 07:53:47 +0000 |
commit | 873db3f5fd3fbfcf290cea61d7e9f58bf28b3983 (patch) | |
tree | 1f1918277e00080155334f14b640589ff8d90961 /source3/libsmb/cliconnect.c | |
parent | 6dbd02d056750de48dd09c2a222a36e74079d044 (diff) | |
download | samba-873db3f5fd3fbfcf290cea61d7e9f58bf28b3983.tar.gz samba-873db3f5fd3fbfcf290cea61d7e9f58bf28b3983.tar.bz2 samba-873db3f5fd3fbfcf290cea61d7e9f58bf28b3983.zip |
Based on the detective work of Jianliang Lu <j.lu@tiesse.com>, allow yet
another NTLMv2 combination.
We should allow the NTLMv2 response to be calculated with either the domain
as supplied, or the domain in UPPER case (as we always did in the past).
As a client, we always UPPER case it (as per the spec), but we also
make sure to UPPER case the domain, when we send it. This should give
us maximum compatability.
Andrew Bartlett
(This used to be commit 1e91cd0cf87b29899641585f46b0dcecaefd848e)
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r-- | source3/libsmb/cliconnect.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 63541e18b5..adfeec2290 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -358,7 +358,9 @@ static BOOL cli_session_setup_nt1(struct cli_state *cli, const char *user, memcpy(p,nt_response.data, nt_response.length); p += nt_response.length; } p += clistr_push(cli, p, user, -1, STR_TERMINATE); - p += clistr_push(cli, p, workgroup, -1, STR_TERMINATE); + + /* Upper case here might help some NTLMv2 implementations */ + p += clistr_push(cli, p, workgroup, -1, STR_TERMINATE|STR_UPPER); p += clistr_push(cli, p, "Unix", -1, STR_TERMINATE); p += clistr_push(cli, p, "Samba", -1, STR_TERMINATE); cli_setup_bcc(cli, p); @@ -649,7 +651,7 @@ static NTSTATUS cli_session_setup_ntlmssp(struct cli_state *cli, const char *use for checking the first reply from the server */ cli_calculate_sign_mac(cli); - if (!cli_check_sign_mac(cli, True)) { + if (!cli_check_sign_mac(cli, False)) { nt_status = NT_STATUS_ACCESS_DENIED; } } @@ -874,7 +876,7 @@ BOOL cli_send_tconX(struct cli_state *cli, if ((cli->sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) && *pass && passlen != 24) { if (!lp_client_lanman_auth()) { - DEBUG(1, ("Server requested LANMAN password but 'client use lanman auth'" + DEBUG(1, ("Server requested LANMAN password (share-level security) but 'client use lanman auth'" " is disabled\n")); return False; } |