diff options
author | Jeremy Allison <jra@samba.org> | 1998-03-16 20:59:47 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-03-16 20:59:47 +0000 |
commit | 7f118970da7c43eaddcf92dc056d3e849f1e7d5c (patch) | |
tree | 5721b94f688ae60625f31fcc564aef3a34bc7bb0 /source/client/clientutil.c | |
parent | ac7cd9cacf2493b52d4db50d4fd4b8b08adfe837 (diff) | |
download | samba-7f118970da7c43eaddcf92dc056d3e849f1e7d5c.tar.gz samba-7f118970da7c43eaddcf92dc056d3e849f1e7d5c.tar.xz samba-7f118970da7c43eaddcf92dc056d3e849f1e7d5c.zip |
Adding the same change as was added to 1.9.18 branch to add the
"name resolve order" parameter.
source/Makefile: Re-ordered link for name resolve order code.
source/clientgen.c:
source/clientutil.c: Added calls to resolve_name().
source/includes.h: Added HPUX zombie fix.
source/loadparm.c: Added new name resolve order parameter.
source/namequery.c: Re-wrote to include parsing of lmhosts file, new resolve_name()
function requested by John.
source/nmbd.c: Tell resolve_name not to do WINS lookups if we are the WINS server.
source/nmbd_lmhosts.c: Call lmhosts parsing functions in namequery.c
source/password.c: Call resolve_name() to lookup security=server name.
source/reply.c:
source/time.c:
source/trans2.c: "fake directory create times" fix from Jim Hague - hague@research.canon.com.au.
source/util.c: Removed isalnum() test in Get_Hostname() that seems to cause
problems on many systems.
Jeremy.
Diffstat (limited to 'source/client/clientutil.c')
-rw-r--r-- | source/client/clientutil.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/source/client/clientutil.c b/source/client/clientutil.c index 8d5e11e4d8c..2afac354c25 100644 --- a/source/client/clientutil.c +++ b/source/client/clientutil.c @@ -29,8 +29,6 @@ #define REGISTER 0 #endif -#define USENMB - pstring service=""; pstring desthost=""; extern pstring myname; @@ -863,7 +861,6 @@ BOOL cli_open_sockets(int port ) char *host; pstring service2; extern int Client; - BOOL failed = True; if (port == 0) port=last_port; last_port=port; @@ -894,37 +891,10 @@ BOOL cli_open_sockets(int port ) if (!have_ip) { - struct hostent *hp; - - if ((hp = Get_Hostbyname(host))) - { - putip((char *)&dest_ip,(char *)hp->h_addr); - failed = False; - } - else + if(!resolve_name( host, &dest_ip)) { -#ifdef USENMB - /* Try and resolve the name with the netbios server */ - int bcast, count; - struct in_addr *ip_list; - - if ((bcast = open_socket_in(SOCK_DGRAM, 0, 3, - 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)) != NULL) { - dest_ip = ip_list[0]; - free(ip_list); - failed = False; - } - close (bcast); - } -#endif - if (failed) { - DEBUG(0,("Get_Hostbyname: Unknown host %s.\n",host)); + DEBUG(0,("cli_open_sockets: Unknown host %s.\n",host)); return False; - } } } |