Bug 7098 - smbclient -L gives wrong results with a large browse list
Summary: smbclient -L gives wrong results with a large browse list
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.5.0rc2
Hardware: Other Linux
: P3 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-02-04 07:43 UTC by Stefan Metzmacher
Modified: 2010-02-05 04:37 UTC (History)
2 users (show)

See Also:

Patch for v3-5 and v3-4 (1.51 KB, patch)
2010-02-04 08:00 UTC, Stefan Metzmacher
jra: review+
Patch for v3-3 (1.50 KB, patch)
2010-02-04 08:04 UTC, Stefan Metzmacher
jra: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2010-02-04 07:43:00 UTC
We need this commit in all branches:

commit c2e4746fa9d68e7601e8e90cc0144d2e65a695b6
Author:     Stefan Metzmacher <metze@samba.org>
AuthorDate: Thu Feb 4 14:03:20 2010 +0100
Commit:     Stefan Metzmacher <metze@samba.org>
CommitDate: Thu Feb 4 14:27:12 2010 +0100

    s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()
    When we need to do more than one network operation to get the
    browse list we need to use the same 'stype' value each time.
Comment 1 Stefan Metzmacher 2010-02-04 08:00:56 UTC
Created attachment 5271 [details]
Patch for v3-5 and v3-4
Comment 2 Stefan Metzmacher 2010-02-04 08:04:25 UTC
Created attachment 5272 [details]
Patch for v3-3
Comment 3 Jeremy Allison 2010-02-04 14:16:23 UTC
Comment on attachment 5271 [details]
Patch for v3-5 and v3-4

Good catch ! How did you find this ?
Comment 4 Jeremy Allison 2010-02-04 14:17:21 UTC
Re-assigning to Karolin for inclusion in 3.5.0, 3.4.6 and 3.3.11.

Comment 5 Stefan Metzmacher 2010-02-04 14:29:39 UTC
I debugged a problem where hosts don't appear in the smbclient -L output
while they're in browse.dat.

I took a capture and wondered why we used a different server_type value in
the NetServerEnum3 call.

We need to implement NetServerEnum3 in smbd! But I'll create a new bug report for 
that once I have a working patch.
Comment 6 Karolin Seeger 2010-02-05 04:37:53 UTC
Pushed to all branches.
Closing out bug report.