summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
committerJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
commit250c9801197ea1c949bd94c1c891f81ab118b130 (patch)
tree3a0ec79c71a010961d78726e223a70e1bc75c73f /source3/rpcclient
parent477025a6f628fd1a8d3bfacd30726e7a41819e50 (diff)
downloadsamba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.gz
samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.bz2
samba-250c9801197ea1c949bd94c1c891f81ab118b130.zip
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index e23140bdb0..646a6d9035 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -435,7 +435,8 @@ static void add_command_set(struct cmd_set *cmd_set)
static NTSTATUS do_cmd(struct cli_state *cli, struct cmd_set *cmd_entry,
char *cmd)
{
- char *p = cmd, **argv = NULL;
+ char **argv = NULL;
+ const char *p = cmd;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
pstring buf;
int argc = 0, i;
@@ -528,7 +529,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd)
struct cmd_list *temp_list;
BOOL found = False;
pstring buf;
- char *p = cmd;
+ const char *p = cmd;
NTSTATUS result = NT_STATUS_OK;
int len = 0;
@@ -578,7 +579,6 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd)
int main(int argc, char *argv[])
{
- extern pstring global_myname;
static int got_pass = 0;
BOOL interactive = True;
int opt;
@@ -694,8 +694,8 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd)
load_interfaces();
- get_myname((*global_myname)?NULL:global_myname);
- strupper(global_myname);
+ if (!init_names())
+ return 1;
/* Resolve the IP address */
@@ -719,7 +719,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd)
if (!strlen(username) && !got_pass)
get_username(username);
- nt_status = cli_full_connection(&cli, global_myname, server,
+ nt_status = cli_full_connection(&cli, global_myname(), server,
&server_ip, 0,
"IPC$", "IPC",
username, domain,