Sometime after 1.9.17p5 smbclient stopped being able to do
authorJeremy Allison <jra@samba.org>
Sat, 14 Feb 1998 07:11:46 +0000 (07:11 +0000)
committerJeremy Allison <jra@samba.org>
Sat, 14 Feb 1998 07:11:46 +0000 (07:11 +0000)
NetBIOS name lookups by broadcast and instead only does DNS.
With the belief that this was not what was intended (I think
it happened in the clientutil.c cleanup) I have added that
capability back to smbclient by adding the #define USENMB
into clientutil.c, and adding the required namequery.o into
the object lists for smbclient and smbmount (as they now
need it to link).
If this was done intentionally let me know and I'll back
this out.
Jeremy.
(This used to be commit 1da47e79d3055468b03f496982af0fb836d91f8c)

source3/client/clientutil.c

index b945edf87f2591cc66ba6844079fca3c421439a8..e2241be23717ea12cf993413283c0f1f8977cff9 100644 (file)
@@ -29,6 +29,8 @@
 #define REGISTER 0
 #endif
 
+#define USENMB
+
 pstring service="";
 pstring desthost="";
 extern pstring myname;
@@ -908,8 +910,8 @@ BOOL cli_open_sockets(int port )
                                    interpret_addr(lp_socket_address()))) != -1) {
          set_socket_options(bcast, "SO_BROADCAST");
 
-         if (ip_list = name_query(bcast, host, name_type, True, True, *iface_bcast(dest_ip),
-                                   &count,0)) {
+         if ((ip_list = name_query(bcast, host, name_type, True, True, *iface_bcast(dest_ip),
+                                   &count,0)) != NULL) {
                  dest_ip = ip_list[0];
                  free(ip_list);
                  failed = False;