diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-12 23:20:50 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-12 23:20:50 +0000 |
commit | 2f194322d419350f35a48dff750066894d68eccf (patch) | |
tree | b0501eaf874ca8e740a51a8e0f29d261e32e0093 /source3/rpcclient | |
parent | f2b669b37fecda2687860eba4a15801dc89855dc (diff) | |
download | samba-2f194322d419350f35a48dff750066894d68eccf.tar.gz samba-2f194322d419350f35a48dff750066894d68eccf.tar.bz2 samba-2f194322d419350f35a48dff750066894d68eccf.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 f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/rpcclient.c | 12 |
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, |