Bug 1003 - nmbd reports error when netbios name is 15 characters long
nmbd reports error when netbios name is 15 characters long
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: nmbd
3.0.0preX
Other Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-25 08:11 UTC by Matt Seitz
Modified: 2005-08-24 10:27 UTC (History)
0 users

See Also:


Attachments
conf file (252 bytes, text/plain)
2004-01-29 08:29 UTC, Matt Seitz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Seitz 2004-01-25 08:11:35 UTC
When nmbd is loaded it will report an error if the netbios name is 15 characters
long. The problem appears to be in the send_announcement function in
src/ext/samba/source/nmbd/nmbd_sendannounce.c.  Line 106 reads:
 
    push_string(NULL, p+5, server_name, 15, STR_ASCII|STR_UPPER|STR_TERMINATE);

The STR_TERMINATE flag adds one to the server_name length, making it greater
than maximum destination length of 15.

I am using Samba 3.0.0rc1, but I checked the latest revisions on cvsweb.  They
appear to have the same problem.
Comment 1 Matt Seitz 2004-01-29 08:29:30 UTC
Created attachment 372 [details]
conf file

I am attaching the "conf" file I use when I see the error.  Here is the error
message:

nmbd -i -s seitz2003s2.conf
Netbios nameserver version 3.0.0rc1 started.
Copyright Andrew Tridgell and the Samba Team 1994-2003
standard input is not a socket, assuming -D option
convert_string: Required 16, available 15
Comment 2 Matt Seitz 2004-02-06 08:27:21 UTC
The error message does not appear in the 3.0.2rc2 version of nmbd, because the
behavior of convert_string has changed.  If all of the following are true, then
the 3.0.2rc2 version of convert_string will not print an error message when the
source string is longer than the maximum destination length:
1.  The source format is not UCS2.
2.  The destination format is not UCS2
3.  The source string is all ASCII 

I would like to change this bug's resolution to "fixed", but Bugzilla says I
don't have permission to change the status field.
Comment 3 Gerald (Jerry) Carter 2004-02-10 14:32:48 UTC
Matt says fixed.
Comment 4 Gerald (Jerry) Carter 2005-02-07 09:05:55 UTC
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
Comment 5 Gerald (Jerry) Carter 2005-08-24 10:27:17 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.