diff options
author | Jeremy Allison <jra@samba.org> | 2004-03-13 02:16:21 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2004-03-13 02:16:21 +0000 |
commit | 6b9dbbcd249360fb9acd61d6900baccf621c9cce (patch) | |
tree | 612e870056d4060da62d02ed05f38f1d99cd620d /source3/nmbd/nmbd_processlogon.c | |
parent | fd2d4f87d440f24df0adc4cc29f22051536b0dee (diff) | |
download | samba-6b9dbbcd249360fb9acd61d6900baccf621c9cce.tar.gz samba-6b9dbbcd249360fb9acd61d6900baccf621c9cce.tar.xz samba-6b9dbbcd249360fb9acd61d6900baccf621c9cce.zip |
Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
(This used to be commit b4ea493599ab414f7828b83f40a5a8b43479ff64)
Diffstat (limited to 'source3/nmbd/nmbd_processlogon.c')
-rw-r--r-- | source3/nmbd/nmbd_processlogon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 7350d8237fe..617a7be6cb7 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -141,7 +141,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); case QUERYFORPDC: { fstring mach_str, getdc_str; - nstring source_name; + fstring source_name; char *q = buf + 2; char *machine = q; @@ -220,7 +220,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", dump_data(4, outbuf, PTR_DIFF(q, outbuf)); pull_ascii_fstring(getdc_str, getdc); - pull_ascii_nstring(source_name, dgram->source_name.name); + pull_ascii_nstring(source_name, sizeof(source_name), dgram->source_name.name); send_mailslot(True, getdc_str, outbuf,PTR_DIFF(q,outbuf), @@ -432,7 +432,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", dump_data(4, outbuf, PTR_DIFF(q, outbuf)); pull_ascii_fstring(getdc_str, getdc); - pull_ascii_nstring(source_name, dgram->source_name.name); + pull_ascii_nstring(source_name, sizeof(source_name), dgram->source_name.name); send_mailslot(True, getdc, outbuf,PTR_DIFF(q,outbuf), |