Bug 7934 - findsmb is missing some results
Summary: findsmb is missing some results
Status: NEW
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.5.6
Hardware: x86 Linux
: P3 minor
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
Depends on:
Reported: 2011-01-26 18:25 UTC by Quentin Heath
Modified: 2011-01-26 18:25 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Quentin Heath 2011-01-26 18:25:50 UTC
=> ginving a broadcast address only works if it is the second argument; `findsmb <broadcast>` and `findsmb -r -d <broadcast>` give the same result as `findsmb`.
In the first loop of smbclient (l 25-33), the first two arguments are parsed for '-d' and '-r' no matter what, then $_, still equal to the second argument, is used as a broadcast address.

The line '$_ = shift;' (l 26) should only be executed before the loop and after each successfull argument parsing to correct this.

=> some PDC aren't displayed: only hosts with an '<hostname|groupname> <00>' entry are used (l 78, l 92) in the individual nmblookups, but some of my servers don't have either (none of my Debian/samba-3.5.6 do, but a Gentoo/samba-3.4.9 with exactly the same smb.conf has both).
I still haven't found any piece of documentation referring to these <00> endchars being mandatory or not, but if it is legal for a PDC/BDC not to send it's name/domain-name this way, then findsmb should also (or only) try <20> enchars, which seem to be sent by all samba instances.