diff options
author | Günther Deschner <gd@samba.org> | 2004-12-20 11:36:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:41 -0500 |
commit | bd4c5125d6989cebc90152a23e113b345806c660 (patch) | |
tree | dc4182be5f42e2b4b0f7ce2440d12a9708cc99bd /source/rpc_client | |
parent | 0760d07b4c6f15489bea2f0fb4f1b0084bd62301 (diff) | |
download | samba-bd4c5125d6989cebc90152a23e113b345806c660.tar.gz samba-bd4c5125d6989cebc90152a23e113b345806c660.tar.xz samba-bd4c5125d6989cebc90152a23e113b345806c660.zip |
r4286: Give back 8 byte lm_session_key in Netrsamlogon-reply.
The old #ifdef JRATEST-block was copying 16 bytes and thus overwriting
acct_flags with bizarre values, breaking a lot of things.
This patch is successfully running in a production environment for quite
some time now and is required to finally allow Exchange 5.5 to access
another Exchange Server when both are running on NT4 in a
samba-controlled domain. This also allows Exchange Replication to take
place, Exchange Administrator to access other Servers in the network,
etc. Fixes Bugzilla #1136.
Thanks abartlet for helping me with that one.
Guenther
Diffstat (limited to 'source/rpc_client')
-rw-r--r-- | source/rpc_client/cli_netlogon.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/rpc_client/cli_netlogon.c b/source/rpc_client/cli_netlogon.c index 3fb032234f5..b88753a7ed0 100644 --- a/source/rpc_client/cli_netlogon.c +++ b/source/rpc_client/cli_netlogon.c @@ -654,6 +654,7 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c char *workstation_name_slash; uint8 netlogon_sess_key[16]; static uint8 zeros[16]; + int i; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -716,10 +717,15 @@ NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_c memset(info3->user_sess_key, '\0', 16); } - if (memcmp(zeros, info3->padding, 16) != 0) { - SamOEMhash(info3->padding, netlogon_sess_key, 16); + if (memcmp(zeros, info3->lm_sess_key, 8) != 0) { + SamOEMhash(info3->lm_sess_key, netlogon_sess_key, 8); } else { - memset(info3->padding, '\0', 16); + memset(info3->lm_sess_key, '\0', 8); + } + + memset(&info3->acct_flags, '\0', 4); + for (i=0; i < 7; i++) { + memset(&info3->unknown[i], '\0', 4); } /* Return results */ |