summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net.c10
-rw-r--r--source3/utils/nmblookup.c2
-rw-r--r--source3/utils/smbcacls.c5
-rw-r--r--source3/utils/smbtree.c5
4 files changed, 10 insertions, 12 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 224de31ebf..d0d73b59f3 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -286,7 +286,6 @@ static const char *share_type[] = {
/************************************************************************************/
extern int optind, opterr, optopt;
-extern struct in_addr ipzero;
static struct cli_state *cli;
static char *opt_requester_name;
@@ -355,14 +354,15 @@ static struct cli_state *connect_to_ipc(char *server)
server_n = server;
- ip = ipzero;
+ zero_ip(&ip);
make_nmb_name(&calling, opt_requester_name, 0x0);
make_nmb_name(&called , server, 0x20);
again:
if (have_ip)
ip = dest_ip;
- else ip = ipzero;
+ else
+ zero_ip(&ip);
DEBUG(3,("Connecting to host=%s\\share=%s\n\n",
server, "IPC$"));
@@ -1276,7 +1276,7 @@ int main(int argc,char *argv[])
};
got_pass = 0;
- dest_ip = ipzero;
+ zero_ip(&dest_ip);
dbf = x_stdout;
@@ -1291,7 +1291,7 @@ int main(int argc,char *argv[])
break;
case 'I':
dest_ip = *interpret_addr2(poptGetOptArg(pc));
- if (zero_ip(dest_ip))
+ if (is_zero_ip(dest_ip))
d_printf(ERRMSG_INVALID_IPADDRESS);
else
have_ip = True;
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index cad9bf85c3..5b22872cb3 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -24,8 +24,6 @@
#include "includes.h"
-extern struct in_addr ipzero;
-
static BOOL use_bcast = True;
static BOOL got_bcast = False;
static struct in_addr bcast_addr;
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index ae03e193e1..2605442e8a 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -690,7 +690,6 @@ struct cli_state *connect_one(char *share)
struct cli_state *c;
struct nmb_name called, calling;
struct in_addr ip;
- extern struct in_addr ipzero;
extern pstring global_myname;
fstrcpy(server,share+2);
@@ -699,13 +698,13 @@ struct cli_state *connect_one(char *share)
*share = 0;
share++;
- ip = ipzero;
+ zero_ip(&ip);
make_nmb_name(&calling, global_myname, 0x0);
make_nmb_name(&called , server, 0x20);
again:
- ip = ipzero;
+ zero_ip(&ip);
/* have to open a new connection */
if (!(c=cli_initialise(NULL)) || !cli_connect(c, server, &ip)) {
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index 13df0451f0..5b7e8a73c1 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -94,11 +94,12 @@ static struct cli_state *get_ipc_connect(char *server,
struct user_auth_info *user_info)
{
struct nmb_name calling, called;
- extern struct in_addr ipzero;
- struct in_addr server_ip = ipzero;
+ struct in_addr server_ip;
struct cli_state *cli;
pstring myname;
+ zero_ip(&server_ip);
+
get_myname(myname);
make_nmb_name(&called, myname, 0x0);