init_uni_hdr() problem
TAKAHASHI Motonobu
monyo at samba.gr.jp
Sun Oct 21 10:06:02 GMT 2001
In SUGJ(Samba Users Group Japan) mailing-list,
we disscussed that a Samba server joined multibyte-name domain
cannot work and to apply the following patch fixed it.
The modified variables (len_domain_name, len_user_name and
len_wksta_name) are passed in init_uni_hdr().
There are about 100 times of init_uni_hdr() call with strlen()'ed 2nd
argument on both Samba 2.2.x and HEAD branch.
I've not examined but suspect these should be modified as well, also
init_unistr2() seems to have some problem.
any comments?
--- parse_net.c 2001/05/03 19:11:43 1.1.1.1
+++ parse_net.c 2001/09/22 14:37:52 1.2
@@ -639,9 +639,9 @@
char sess_key[16],
unsigned char lm_cypher[16], unsigned char nt_cypher[16])
{
- int len_domain_name = strlen(domain_name);
- int len_user_name = strlen(user_name );
- int len_wksta_name = strlen(wksta_name );
+ int len_domain_name = str_charnum(domain_name);
+ int len_user_name = str_charnum(user_name );
+ int len_wksta_name = str_charnum(wksta_name );
unsigned char lm_owf[16];
unsigned char nt_owf[16];
@@ -769,9 +769,9 @@
unsigned char lm_chal_resp[24],
unsigned char nt_chal_resp[24])
{
- int len_domain_name = strlen(domain_name);
- int len_user_name = strlen(user_name );
- int len_wksta_name = strlen(wksta_name );
+ int len_domain_name = str_charnum(domain_name);
+ int len_user_name = str_charnum(user_name );
+ int len_wksta_name = str_charnum(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];
-----
TAKAHASHI, Motonobu(monyo) monyo at samba.gr.jp
Samba Team - http://samba.org/ Samba-JP - http://www.samba.gr.jp/
JWNTUG - http://www.jwntug.or.jp/ Analog-JP - http://www.jp.analog.cx/
MCSE+I, MCSE(W2K), SCNA, CCNA, Turbo-CI
More information about the samba-technical
mailing list