summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-06 17:16:33 -0800
committerJeremy Allison <jra@samba.org>2007-12-06 17:16:33 -0800
commit1b92ea5559bfa00016103508feac9a06ea4b66ae (patch)
treec11509a3fc07e7c828e1b40e4259f80d1fc0bf2e /source3/rpcclient
parent9bd35ef153ef4b7f892dcf9e69c2232b940a9e18 (diff)
downloadsamba-1b92ea5559bfa00016103508feac9a06ea4b66ae.tar.gz
samba-1b92ea5559bfa00016103508feac9a06ea4b66ae.tar.bz2
samba-1b92ea5559bfa00016103508feac9a06ea4b66ae.zip
Remove pstrings from client/client.c by doing a large rewrite.
Mostly compiles.... Jeremy. (This used to be commit c87f3eba9aa52f4ab25d77e2167262bf5c43b1a6)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c4
-rw-r--r--source3/rpcclient/rpcclient.c11
2 files changed, 8 insertions, 7 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 92d8096505..1566b95575 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2671,9 +2671,9 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
nt_status = cli_full_connection(&cli_server2, global_myname(), servername2,
NULL, 0,
"IPC$", "IPC",
- cmdline_auth_info.username,
+ get_cmdline_auth_info_username(),
lp_workgroup(),
- cmdline_auth_info.password,
+ get_cmdline_auth_info_password(),
cmdline_auth_info.use_kerberos ? CLI_FULL_CONNECTION_USE_KERBEROS : 0,
cmdline_auth_info.signing_state, NULL);
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index ea7db88224..7b4589efa9 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -571,8 +571,8 @@ static NTSTATUS do_cmd(struct cli_state *cli,
cmd_entry->pipe_idx,
pipe_default_auth_level,
lp_workgroup(),
- cmdline_auth_info.username,
- cmdline_auth_info.password,
+ get_cmdline_auth_info_username(),
+ get_cmdline_auth_info_password(),
&ntresult);
break;
case PIPE_AUTH_TYPE_NTLMSSP:
@@ -580,8 +580,8 @@ static NTSTATUS do_cmd(struct cli_state *cli,
cmd_entry->pipe_idx,
pipe_default_auth_level,
lp_workgroup(),
- cmdline_auth_info.username,
- cmdline_auth_info.password,
+ get_cmdline_auth_info_username(),
+ get_cmdline_auth_info_password(),
&ntresult);
break;
case PIPE_AUTH_TYPE_SCHANNEL:
@@ -887,7 +887,7 @@ out_free:
/* Loop around accepting commands */
while(1) {
- char *line;
+ char *line = NULL;
line = smb_readline("rpcclient $> ", NULL, completion_fn);
@@ -896,6 +896,7 @@ out_free:
if (line[0] != '\n')
process_cmd(cli, line);
+ SAFE_FREE(line);
}
done: