Bug 6880 - cannot list workgroup servers
Summary: cannot list workgroup servers
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.4.3
Hardware: All Linux
: P3 major
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-09 11:29 UTC by Alban Browaeys
Modified: 2020-12-11 07:14 UTC (History)
0 users

See Also:
vl: review+


Attachments
git-am format patch for 3.4.4. (2.25 KB, patch)
2009-11-09 12:48 UTC, Jeremy Allison
no flags Details
git-am format patch for 3.3.10. (2.25 KB, patch)
2009-11-09 14:42 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alban Browaeys 2009-11-09 11:29:54 UTC
libsmbclient seems broken to me in 3.4.3 : http://gitweb.samba.org/?p=samba.git;a=commitdiff;h=2e989bab0764c298a2530a2d4c8690258eba210c remove the ability to list workgroup servers

as the code list the servers a few lines after this code that now return directly to the caller if the name to be resolved is not a real server (that is if it is a workgroup ... so the list servers is a dead code now


I am looking after this as with 3.4.3 both konqueror (kio) and nautilus (gvfs) try to resolve workgroup<20> which fails when trying to list the servers in a workgroup

still I am new to samba code and I wonder if the test for IPC$ between this call to workgroup<20> and the list servers code would fails too for a workgroup , or maybe name_status_find returns the LMB or any host in the workgroup when queried for the workgroup<00> as was done in previous code



gvfs failure when listing workgroup servers (works when listing shares of a server or listing all workgroups) :
### SMB-BROWSE: do_mount - URI = smb://iliade/
### SMB-BROWSE: do_mount - try #0 
parsed path: fname='smb://iliade/' server='iliade' share='' path='' options=''
SMBC_check_options(): server='iliade' share='' path='' options=''
### SMB-BROWSE: auth_callback - anonymous pass
### SMB-BROWSE: auth_callback - out: last_user = '<user>', last_domain = 'ILIADE'
resolve_lmhosts: Attempting lmhosts lookup for name iliade<0x1d>
startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was Aucun fichier ou dossier de ce type
name_resolve_bcast: Attempting broadcast lookup for name iliade<0x1d>
nmb packet from 192.168.0.10(137) header: id=10049 opcode=Query(0) response=Yes
    header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=ILIADE<1d> rr_type=32 rr_class=1 ttl=259200
    answers   0 char ......   hex 0000C0A8000A
Got a positive name query response from 192.168.0.10 ( 192.168.0.10 )
Could not get name of local/domain master browser for server iliade
### SMB-BROWSE: do_mount - [smb://iliade/; 0] dir = (nil), cancelled = 0, errno = [1] 'Opération non permise' 
### SMB-BROWSE: do_mount - after anon, enabling NTLMSSP fallback
### SMB-BROWSE: do_mount - try #1 
parsed path: fname='smb://iliade/' server='iliade' share='' path='' options=''
SMBC_check_options(): server='iliade' share='' path='' options=''
### SMB-BROWSE: auth_callback - normal pass
### SMB-BROWSE: auth_callback - asking for password...
### SMB-BROWSE: auth_callback - out: last_user = '<user>', last_domain = 'ILIADE'
resolve_lmhosts: Attempting lmhosts lookup for name iliade<0x1d>
startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was Aucun fichier ou dossier de ce type
name_resolve_bcast: Attempting broadcast lookup for name iliade<0x1d>
nmb packet from 192.168.0.10(137) header: id=19524 opcode=Query(0) response=Yes
    header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=ILIADE<1d> rr_type=32 rr_class=1 ttl=259200
    answers   0 char ......   hex 0000C0A8000A
Got a positive name query response from 192.168.0.10 ( 192.168.0.10 )
Could not get name of local/domain master browser for server iliade
### SMB-BROWSE: do_mount - [smb://iliade/; 1] dir = (nil), cancelled = 0, errno = [1] 'Opération non permise' 
### SMB-BROWSE: do_mount - try #2 
parsed path: fname='smb://iliade/' server='iliade' share='' path='' options=''
SMBC_check_options(): server='iliade' share='' path='' options=''
### SMB-BROWSE: auth_callback - normal pass
### SMB-BROWSE: auth_callback - asking for password...
### SMB-BROWSE: auth_callback - out: last_user = 'ABORT', last_domain = 'ILIADE'
resolve_lmhosts: Attempting lmhosts lookup for name iliade<0x1d>
startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was Aucun fichier ou dossier de ce type
name_resolve_bcast: Attempting broadcast lookup for name iliade<0x1d>
nmb packet from 192.168.0.10(137) header: id=12039 opcode=Query(0) response=Yes
    header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=ILIADE<1d> rr_type=32 rr_class=1 ttl=259200
    answers   0 char ......   hex 0000C0A8000A
Got a positive name query response from 192.168.0.10 ( 192.168.0.10 )
Could not get name of local/domain master browser for server iliade
### SMB-BROWSE: do_mount - [smb://iliade/; 2] dir = (nil), cancelled = 1, errno = [1] 'Opération non permise' 
### SMB-BROWSE: do_mount - (errno != EPERM && errno != EACCES), breaking




nmblookup  iliade -S
querying iliade on 192.168.0.255
192.168.0.12 iliade<00>
Looking up status of 192.168.0.12
	JASON           <00> -         B <ACTIVE> 
	JASON           <03> -         B <ACTIVE> 
	JASON           <20> -         B <ACTIVE> 
	ILIADE          <1e> - <GROUP> B <ACTIVE> 
	ILIADE          <00> - <GROUP> B <ACTIVE> 

	MAC Address = 00-00-00-00-00-00

192.168.0.10 iliade<00>
Looking up status of 192.168.0.10
	ARGOS           <00> -         B <ACTIVE> 
	ARGOS           <03> -         B <ACTIVE> 
	ARGOS           <20> -         B <ACTIVE> 
	..__MSBROWSE__. <01> - <GROUP> B <ACTIVE> 
	ILIADE          <1d> -         B <ACTIVE> 
	ILIADE          <1b> -         B <ACTIVE> 
	ILIADE          <1e> - <GROUP> B <ACTIVE> 
	ILIADE          <00> - <GROUP> B <ACTIVE> 

	MAC Address = 00-00-00-00-00-00



net -U% server domain 

Enumerating servers in this domain or workgroup: 

	Server name          Server description
	-------------        ----------------------------
	ARGOS                argos
	JASON                jason


smb.conf:

- DMB (argos):
[global]
server string = argos
workgroup = iliade



domain master = yes
local master = yes
preferred master = yes
os level = 65

name resolve order = wins lmhosts bcast host

[testsamba]
path = /home/<user>/smb/
comment = Test partage via samba
guest ok = yes

- station (LMB only when not in argos whereabouts ie laptop):
[global]
server string = jason
workgroup = iliade

domain master = no
local master = yes
preferred master = yes
os level = 64

name resolve order = wins lmhosts bcast host

[Public]
path = /home/<user>/Public
available = yes
browsable = yes
public = yes
writable = yes



nmbd log:

 nmbd/nmbd_incomingrequests.c:327(process_node_status_request)
  process_node_status_request: status request for name ILIADE<20> from IP 192.168.0.12 on subnet UNICAST_SUBNET - name not found.
Comment 1 Derrell Lipman 2009-11-09 11:35:48 UTC
Jeremy, you made the referenced change. I'll assign this to you.

Derrell

Comment 2 Jeremy Allison 2009-11-09 12:48:41 UTC
Created attachment 4933 [details]
git-am format patch for 3.4.4.
Comment 3 Alban Browaeys 2009-11-09 14:18:05 UTC
(In reply to comment #2)
Yes it indeed fix the issue. Happily listing servers under nautilus and konqueror !
Comment 4 Jeremy Allison 2009-11-09 14:42:38 UTC
Created attachment 4935 [details]
git-am format patch for 3.3.10.
Comment 5 Jeremy Allison 2009-11-09 14:44:14 UTC
Requesting review - then re-assign to Karolin for inclusion in 3.4.4 and 3.3.10.
Jeremy.
Comment 6 Derrell Lipman 2009-11-09 16:05:48 UTC
Looks fine. In addition to the wgroup clarification, this looks like it's putting things back to how they were before the commit referenced in the bug report, right?
Comment 7 Jeremy Allison 2009-11-09 16:26:30 UTC
Yes, and it's also adding a lot more comments to make sure I don't screw it up again (that API is very confusing :-).
Comment 8 Jeremy Allison 2009-11-09 17:46:53 UTC
Re-assigning to Karolin for inclusion in 3.4.4 and 3.3.10. Reviewed by Derrell.
Jeremy.
Comment 9 Karolin Seeger 2009-11-10 03:30:43 UTC
Pushed to v3-3-test and v3-4-test.
Closing out bug report.

Thanks!