diff options
author | Jeremy Allison <jra@samba.org> | 2002-04-30 13:28:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-04-30 13:28:41 +0000 |
commit | d04b55f2186fb8af998cf61c576771a5f72f4892 (patch) | |
tree | 9ff8c3a7cf34cefc0ee9a550a3bb1236a9e77595 /source/client | |
parent | 73267ca42d9eddabb71b31b4c5068ebbe7bc9f7c (diff) | |
download | samba-d04b55f2186fb8af998cf61c576771a5f72f4892.tar.gz samba-d04b55f2186fb8af998cf61c576771a5f72f4892.tar.xz samba-d04b55f2186fb8af998cf61c576771a5f72f4892.zip |
Start of merge to 2_2_RELEASE branch for release.
Jeremy.
Diffstat (limited to 'source/client')
-rw-r--r-- | source/client/client.c | 14 | ||||
-rw-r--r-- | source/client/clitar.c | 2 | ||||
-rw-r--r-- | source/client/smbmount.c | 15 | ||||
-rw-r--r-- | source/client/smbspool.c | 3 |
4 files changed, 14 insertions, 20 deletions
diff --git a/source/client/client.c b/source/client/client.c index fe339094c8e..745aec73970 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -42,7 +42,6 @@ static pstring workgroup; static char *cmdstr; static BOOL got_pass; static int io_bufsize = 64512; -extern struct in_addr ipzero; static int name_type = 0x20; static int max_protocol = PROTOCOL_NT1; @@ -193,7 +192,7 @@ static void send_message(void) * DOS before sending. */ - unix_to_dos(msg, True); + unix_to_dos(msg); if (!cli_message_text(cli, msg, l, grp_id)) { printf("SMBsendtxt failed (%s)\n",cli_errstr(cli)); @@ -2147,7 +2146,6 @@ struct cli_state *do_connect(char *server, char *share) struct nmb_name called, calling; char *server_n; struct in_addr ip; - extern struct in_addr ipzero; fstring servicename; char *sharename; @@ -2164,13 +2162,13 @@ struct cli_state *do_connect(char *server, char *share) server_n = server; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); make_nmb_name(&called , server, name_type); again: - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; /* have to open a new connection */ @@ -2419,12 +2417,12 @@ static int do_message_op(void) struct in_addr ip; struct nmb_name called, calling; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, global_myname, 0x0); make_nmb_name(&called , desthost, name_type); - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, desthost, &ip)) { @@ -2661,7 +2659,7 @@ static int do_message_op(void) case 'I': { dest_ip = *interpret_addr2(optarg); - if (zero_ip(dest_ip)) + if (is_zero_ip(dest_ip)) exit(1); have_ip = True; } diff --git a/source/client/clitar.c b/source/client/clitar.c index 2beb669de90..50a46c70007 100644 --- a/source/client/clitar.c +++ b/source/client/clitar.c @@ -1718,7 +1718,7 @@ int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind) SMB_STRUCT_STAT stbuf; extern time_t newer_than; - if (sys_stat(dos_to_unix(argv[Optind],False), &stbuf) == 0) { + if (sys_stat(dos_to_unix_static(argv[Optind]), &stbuf) == 0) { newer_than = stbuf.st_mtime; DEBUG(1,("Getting files newer than %s", asctime(LocalTime(&newer_than)))); diff --git a/source/client/smbmount.c b/source/client/smbmount.c index 2c941836e39..40e21e1eb1d 100644 --- a/source/client/smbmount.c +++ b/source/client/smbmount.c @@ -27,8 +27,6 @@ #include <asm/types.h> #include <linux/smb_fs.h> -extern struct in_addr ipzero; - extern BOOL in_client; extern pstring user_socket_options; extern BOOL append_log; @@ -120,7 +118,6 @@ static struct cli_state *do_connection(char *svc_name) struct nmb_name called, calling; char *server_n; struct in_addr ip; - extern struct in_addr ipzero; pstring server; char *share; @@ -144,7 +141,7 @@ static struct cli_state *do_connection(char *svc_name) make_nmb_name(&called , server, 0x20); again: - ip = ipzero; + zero_ip(&ip); if (have_ip) ip = dest_ip; /* have to open a new connection */ @@ -453,22 +450,22 @@ static void init_mount(void) if (mount_uid) { slprintf(tmp, sizeof(tmp)-1, "%d", mount_uid); args[i++] = "-u"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (mount_gid) { slprintf(tmp, sizeof(tmp)-1, "%d", mount_gid); args[i++] = "-g"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (mount_fmask) { slprintf(tmp, sizeof(tmp)-1, "0%o", mount_fmask); args[i++] = "-f"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (mount_dmask) { slprintf(tmp, sizeof(tmp)-1, "0%o", mount_dmask); args[i++] = "-d"; - args[i++] = xstrdup(tmp); + args[i++] = smb_xstrdup(tmp); } if (options) { args[i++] = "-o"; @@ -748,7 +745,7 @@ static void parse_mount_smb(int argc, char **argv) DEBUGLEVEL = val; } else if(!strcmp(opts, "ip")) { dest_ip = *interpret_addr2(opteq+1); - if (zero_ip(dest_ip)) { + if (is_zero_ip(dest_ip)) { fprintf(stderr,"Can't resolve address %s\n", opteq+1); exit(1); } diff --git a/source/client/smbspool.c b/source/client/smbspool.c index 1a17b15b896..64484f0aa99 100644 --- a/source/client/smbspool.c +++ b/source/client/smbspool.c @@ -29,7 +29,6 @@ */ extern BOOL in_client; /* Boolean for client library */ -extern struct in_addr ipzero; /* Any address */ /* @@ -290,7 +289,7 @@ smb_connect(char *workgroup, /* I - Workgroup */ get_myname(myname); - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, myname, 0x0); make_nmb_name(&called, server, 0x20); |