From 80087e6cfed8f6aa55ed396e1690dff2dc32ece7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 7 Mar 2003 09:25:48 +0000 Subject: safe_strcpy() -> fstrcpy() fix, and a cleanup to how rpcclient calls the IP address resolving code. (This used to be commit 1f605fe77c56ee2a7838c9f87eedf4bb91ebf688) --- source3/rpcclient/rpcclient.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source3/rpcclient/rpcclient.c') diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 127506fb39..c3b2cd4ea1 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -592,6 +592,8 @@ out_free: { NULL } }; + ZERO_STRUCT(server_ip); + setlinebuf(stdout); /* Parse options */ @@ -674,13 +676,6 @@ out_free: if (!init_names()) return 1; - /* Resolve the IP address */ - - if (!opt_ipaddr && !resolve_name(server, &server_ip, 0x20)) { - fprintf(stderr, "Unable to resolve %s\n", server); - return 1; - } - /* * Get password * from stdin if necessary @@ -697,7 +692,7 @@ out_free: get_username(username); nt_status = cli_full_connection(&cli, global_myname(), server, - &server_ip, 0, + opt_ipaddr ? &server_ip : NULL, 0, "IPC$", "IPC", username, domain, password, 0, NULL); -- cgit