summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_synclists.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-03-13 02:16:21 +0000
committerJeremy Allison <jra@samba.org>2004-03-13 02:16:21 +0000
commit6b9dbbcd249360fb9acd61d6900baccf621c9cce (patch)
tree612e870056d4060da62d02ed05f38f1d99cd620d /source3/nmbd/nmbd_synclists.c
parentfd2d4f87d440f24df0adc4cc29f22051536b0dee (diff)
downloadsamba-6b9dbbcd249360fb9acd61d6900baccf621c9cce.tar.gz
samba-6b9dbbcd249360fb9acd61d6900baccf621c9cce.tar.bz2
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_synclists.c')
-rw-r--r--source3/nmbd/nmbd_synclists.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c
index 6a0576a5a4..424af1e2e3 100644
--- a/source3/nmbd/nmbd_synclists.c
+++ b/source3/nmbd/nmbd_synclists.c
@@ -31,8 +31,8 @@
struct sync_record {
struct sync_record *next, *prev;
- nstring workgroup;
- nstring server;
+ fstring workgroup;
+ fstring server;
pstring fname;
struct in_addr ip;
pid_t pid;
@@ -148,8 +148,8 @@ done:
ZERO_STRUCTP(s);
- nstrcpy(s->workgroup, work->work_group);
- nstrcpy(s->server, name);
+ fstrcpy(s->workgroup, work->work_group);
+ fstrcpy(s->server, name);
s->ip = ip;
slprintf(s->fname, sizeof(pstring)-1,
@@ -206,7 +206,7 @@ static void complete_one(struct sync_record *s,
sname, lp_max_ttl());
if (work) {
/* remember who the master is */
- nstrcpy(work->local_master_browser_name, comment);
+ fstrcpy(work->local_master_browser_name, comment);
}
}
return;