summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_rpc.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-06-29 18:47:06 +0000
committerLuke Leighton <lkcl@samba.org>1999-06-29 18:47:06 +0000
commit73891ca8e4f6cca6aa8bb0ae043f660a64baa056 (patch)
tree9ed22c56d9f3eeac6608f25971e7b29f8006ae79 /source3/rpc_parse/parse_rpc.c
parent1dc6c6c7ca54578d9e6040a9d4d5e509f1ad3af3 (diff)
downloadsamba-73891ca8e4f6cca6aa8bb0ae043f660a64baa056.tar.gz
samba-73891ca8e4f6cca6aa8bb0ae043f660a64baa056.tar.bz2
samba-73891ca8e4f6cca6aa8bb0ae043f660a64baa056.zip
improving authentication code (tidyup).
(This used to be commit ab1a6aa42db5217f025941fb5107436556bc23b7)
Diffstat (limited to 'source3/rpc_parse/parse_rpc.c')
-rw-r--r--source3/rpc_parse/parse_rpc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 524c4201ad..3066d94dec 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -692,7 +692,8 @@ creates an RPC_AUTH_NTLMSSP_RESP structure.
********************************************************************/
void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
- uchar lm_resp[24], uchar nt_resp[24],
+ uchar lm_resp[24],
+ uchar *nt_resp, size_t nt_len,
char *domain, char *user, char *wks,
uint32 neg_flags)
{
@@ -701,7 +702,6 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
int wks_len = strlen(wks );
int usr_len = strlen(user );
int lm_len = lm_resp != NULL ? 24 : 0;
- int nt_len = nt_resp != NULL ? 24 : 0;
DEBUG(5,("make_rpc_auth_ntlmssp_resp\n"));
@@ -709,9 +709,9 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
#ifdef DEBUG_PASSWORD
DEBUG(100,("lm_resp\n"));
- dump_data(100, lm_resp, 24);
+ dump_data(100, lm_resp, lm_len);
DEBUG(100,("nt_resp\n"));
- dump_data(100, nt_resp, 24);
+ dump_data(100, nt_resp, nt_len);
#endif
DEBUG(6,("dom: %s user: %s wks: %s neg_flgs: 0x%x\n",
@@ -745,8 +745,8 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
rsp->neg_flags = neg_flags;
- memcpy(rsp->lm_resp, lm_resp, 24);
- memcpy(rsp->nt_resp, nt_resp, 24);
+ memcpy(rsp->lm_resp, lm_resp, lm_len);
+ memcpy(rsp->nt_resp, nt_resp, nt_len);
if (IS_BITS_SET_ALL(neg_flags, NTLMSSP_NEGOTIATE_UNICODE))
{