summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_net.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-07-11 04:27:03 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-07-11 04:27:03 +0000
commit7265d4638805a0eb391237c5cba0f39f4d0feb11 (patch)
treef92bc7f06ac559a9b282744f190693703259d95d /source3/rpc_parse/parse_net.c
parentbe11842e797a6291b39b208b93acf4143e751c58 (diff)
downloadsamba-7265d4638805a0eb391237c5cba0f39f4d0feb11.tar.gz
samba-7265d4638805a0eb391237c5cba0f39f4d0feb11.tar.bz2
samba-7265d4638805a0eb391237c5cba0f39f4d0feb11.zip
This backs out my last change, which broke some of the finer points of RPC
coding :-). I'll be more carfull in this area in future. This does not back out the cli_login change, so domain logons still work, but only for english. Andrew Bartlett (This used to be commit bd3c2a0cddc71daa4165e1a0916208d0c650d55a)
Diffstat (limited to 'source3/rpc_parse/parse_net.c')
-rw-r--r--source3/rpc_parse/parse_net.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 35890c2f27..d7253a53fd 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -5,7 +5,6 @@
* Copyright (C) Andrew Tridgell 1992-1997,
* Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
* Copyright (C) Paul Ashton 1997.
- * Copyright (C) Andrew Bartlett 2001.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -984,6 +983,9 @@ void init_id_info2(NET_ID_INFO_2 *id, char *domain_name,
unsigned char *lm_chal_resp,
unsigned char *nt_chal_resp)
{
+ int len_domain_name = strlen(domain_name);
+ int len_user_name = strlen(user_name );
+ int len_wksta_name = strlen(wksta_name );
int nt_chal_resp_len = ((nt_chal_resp != NULL) ? 24 : 0);
int lm_chal_resp_len = ((lm_chal_resp != NULL) ? 24 : 0);
unsigned char lm_owf[24];
@@ -993,9 +995,14 @@ void init_id_info2(NET_ID_INFO_2 *id, char *domain_name,
id->ptr_id_info2 = 1;
+ init_uni_hdr(&id->hdr_domain_name, len_domain_name);
+
id->param_ctrl = param_ctrl;
init_logon_id(&id->logon_id, log_id_low, log_id_high);
+ init_uni_hdr(&id->hdr_user_name, len_user_name);
+ init_uni_hdr(&id->hdr_wksta_name, len_wksta_name);
+
if (nt_chal_resp) {
/* oops. can only send what-ever-it-is direct */
memcpy(nt_owf, nt_chal_resp, 24);
@@ -1011,9 +1018,9 @@ void init_id_info2(NET_ID_INFO_2 *id, char *domain_name,
init_str_hdr(&id->hdr_nt_chal_resp, 24, nt_chal_resp_len, (nt_chal_resp != NULL) ? 1 : 0);
init_str_hdr(&id->hdr_lm_chal_resp, 24, lm_chal_resp_len, (lm_chal_resp != NULL) ? 1 : 0);
- init_unistr2_and_hdr(&id->uni_domain_name, &id->hdr_domain_name, domain_name);
- init_unistr2_and_hdr(&id->uni_user_name, &id->hdr_user_name, user_name);
- init_unistr2_and_hdr(&id->uni_wksta_name, &id->hdr_wksta_name, wksta_name);
+ init_unistr2(&id->uni_domain_name, domain_name, len_domain_name);
+ init_unistr2(&id->uni_user_name, user_name, len_user_name);
+ init_unistr2(&id->uni_wksta_name, wksta_name, len_wksta_name);
init_string2(&id->nt_chal_resp, (char *)nt_chal_resp, nt_chal_resp_len);
init_string2(&id->lm_chal_resp, (char *)lm_chal_resp, lm_chal_resp_len);