[WORKAROUND] Re: [Samba] duplicate domains in browse list
jra at samba.org
Thu May 27 18:09:57 GMT 2004
On Thu, May 27, 2004 at 04:42:00PM +0200, Joerg Pulz wrote:
> i looked a little bit deeper in jra's changes and have reverted some of
> them to the state of samba-3.0.2a.
> the problem seems to be in "nmbd/nmbd_browsesync.c"
> attached is a patch wich applies to this file.
> i updated all my DMB's with this patch applied and i have the correct
> behavior back. no more duplicated entries in the browse.dat files.
> Remember: this behavior comes up on DMB's only. these are the only one's
> which do automtic browse list synchronization to make cross subnet
> browsing possible.
> it would be very nice if someone please can take a look at the parts i've
> changed and can provide a better fix or integrate my changes.
> any comments are also welcome.
Ok, all the changes here are just to reduce the size of string
used from an unstring to an nstring. Unfortunately this cannot
be correct as it would cause truncation for multibyte characters
in code pages like Japanese.
It may be that the change you added causes extra non-zero bytes not
to be examined in the comparison functions. If that is the case
the following patch should have the same effect. If you could test
this instead of your patch I'd appreciate it.
-------------- next part --------------
--- lib/charcnv.c (revision 925)
+++ lib/charcnv.c (working copy)
@@ -932,6 +932,7 @@
size_t pull_ascii_nstring(char *dest, size_t dest_len, const void *src)
+ memset(dest, '\0', sizeof(dest_len));
return pull_ascii(dest, src, dest_len, sizeof(nstring)-1, STR_TERMINATE);
More information about the samba