summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-08-10 21:43:28 +0000
committerVolker Lendecke <vlendec@samba.org>2003-08-10 21:43:28 +0000
commitce7d025b20bd444f2aace6f7ad719ac2702223a0 (patch)
tree238041ebfb23774487afe3eedf2d6760389410ee /source3/client
parent6da5194978fa0febbad7fb7141418ea3270e9d76 (diff)
downloadsamba-ce7d025b20bd444f2aace6f7ad719ac2702223a0.tar.gz
samba-ce7d025b20bd444f2aace6f7ad719ac2702223a0.tar.bz2
samba-ce7d025b20bd444f2aace6f7ad719ac2702223a0.zip
We get the server and workgroup list only over port 139. Fall back to that
and if NetBIOS over TCP/IP is disabled, give an error message. Fixes Bug #284 Volker (This used to be commit a2902a6cf8d05569d1c690436f69b4a4cedac400)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 036be36175..262ac41798 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2650,6 +2650,22 @@ static int do_host_query(char *query_host)
return 1;
browse_host(True);
+
+ if (port != 139) {
+
+ /* Workgroups simply don't make sense over anything
+ else but port 139... */
+
+ cli_shutdown(cli);
+ port = 139;
+ cli = do_connect(query_host, "IPC$");
+ }
+
+ if (cli == NULL) {
+ d_printf("NetBIOS over TCP disabled -- no workgroup available\n");
+ return 1;
+ }
+
list_servers(lp_workgroup());
cli_shutdown(cli);