BUG: lmhosts parsing corrupt in samba 2.0.0
Matt Chapman
matty at samba.org
Sun Feb 7 21:37:33 GMT 1999
Steffen Einsle wrote:
> an entry like
>
> 192.168.139.1 GROUP_A#1B
>
> in /etc/lmhosts should add GROUP_A<1b> to the browse list. Instead it
> will add GROUP_A<01> to the browse list. This seems to be an error.
I will fix this for the next release.
When strtol is called with a base to 0 it defaults to reading in
decimal unless the number starts in 0 (octal) or 0x (hexadecimal).
Indeed name types should always be in hexadecimal, without explicitly
needing to use 0x.
Cheers,
Matt
-------------- next part --------------
--- source/libsmb/namequery.old Mon Feb 8 08:13:13 1999
+++ source/libsmb/namequery.c Mon Feb 8 08:13:18 1999
@@ -408,7 +408,7 @@
char *endptr;
ptr++;
- *name_type = (int)strtol(ptr, &endptr,0);
+ *name_type = (int)strtol(ptr, &endptr, 16);
if(!*ptr || (endptr == ptr))
{
More information about the samba
mailing list