summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-19 18:57:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:56 -0500
commit01367cdfd03d2412904c57807e1ff3c62696d05f (patch)
treeb887c607396a74e52fe65477b92982407729c995 /source3/rpcclient
parent3372adce58070febd728ee0f941e48d69acc40b4 (diff)
downloadsamba-01367cdfd03d2412904c57807e1ff3c62696d05f.tar.gz
samba-01367cdfd03d2412904c57807e1ff3c62696d05f.tar.bz2
samba-01367cdfd03d2412904c57807e1ff3c62696d05f.zip
r19797: Convert the remaining pipes to the "new" unique out ptr handling
(This used to be commit bc4e0a388a2859d2ddcfb8f07920f3b121a37894)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_echo.c12
-rw-r--r--source3/rpcclient/cmd_srvsvc.c10
2 files changed, 10 insertions, 12 deletions
diff --git a/source3/rpcclient/cmd_echo.c b/source3/rpcclient/cmd_echo.c
index 727dfd4df2..b8058fa28a 100644
--- a/source3/rpcclient/cmd_echo.c
+++ b/source3/rpcclient/cmd_echo.c
@@ -61,12 +61,11 @@ static NTSTATUS cmd_echo_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
size = atoi(argv[1]);
in_data = (uint8 *)SMB_MALLOC(size);
- out_data = (uint8 *)SMB_MALLOC(size);
for (i = 0; i < size; i++)
in_data[i] = i & 0xff;
- result = rpccli_echo_EchoData(cli, mem_ctx, size, in_data, out_data);
+ result = rpccli_echo_EchoData(cli, mem_ctx, size, in_data, &out_data);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -81,7 +80,7 @@ static NTSTATUS cmd_echo_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
done:
SAFE_FREE(in_data);
- SAFE_FREE(out_data);
+ TALLOC_FREE(out_data);
return result;
}
@@ -100,11 +99,8 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli,
}
size = atoi(argv[1]);
- if (!(out_data = (uint8 *)SMB_MALLOC(size))) {
- return NT_STATUS_NO_MEMORY;
- }
- result = rpccli_echo_SourceData(cli, mem_ctx, size, out_data);
+ result = rpccli_echo_SourceData(cli, mem_ctx, size, &out_data);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -118,7 +114,7 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli,
}
done:
- SAFE_FREE(out_data);
+ TALLOC_FREE(out_data);
return result;
}
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 9f6e606c3a..1d1c2f7852 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -249,6 +249,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct rpc_pipe_client *cli,
union srvsvc_NetShareCtr ctr;
NTSTATUS result;
uint32 hnd;
+ uint32 *phnd = &hnd;
uint32 preferred_len = 0xffffffff, i;
uint32 numentries;
@@ -288,7 +289,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct rpc_pipe_client *cli,
result = rpccli_srvsvc_NetShareEnum(
cli, mem_ctx, cli->cli->desthost, &info_level, &ctr, preferred_len, &numentries,
- &hnd);
+ &phnd);
if (!NT_STATUS_IS_OK(result) || !numentries)
goto done;
@@ -366,7 +367,7 @@ static NTSTATUS cmd_srvsvc_net_share_set_info(struct rpc_pipe_client *cli,
uint32 info_level = 502;
union srvsvc_NetShareInfo info_get;
NTSTATUS result;
- uint32 parm_error;
+ uint32 *parm_error = NULL;
if (argc > 3) {
printf("Usage: %s [sharename] [comment]\n", argv[0]);
@@ -401,7 +402,7 @@ static NTSTATUS cmd_srvsvc_net_remote_tod(struct rpc_pipe_client *cli,
{
fstring srv_name_slash;
NTSTATUS result;
- struct srvsvc_NetRemoteTODInfo tod;
+ struct srvsvc_NetRemoteTODInfo *tod;
if (argc > 1) {
printf("Usage: %s\n", argv[0]);
@@ -427,6 +428,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct rpc_pipe_client *cli,
union srvsvc_NetFileCtr ctr;
NTSTATUS result;
uint32 hnd;
+ uint32 *phnd = &hnd;
uint32 preferred_len = 0xffff;
uint32 numentries;
@@ -443,7 +445,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct rpc_pipe_client *cli,
ZERO_STRUCT(ctr);
result = rpccli_srvsvc_NetFileEnum(
- cli, mem_ctx, NULL, NULL, NULL, &info_level, &ctr, preferred_len, &numentries, &hnd);
+ cli, mem_ctx, NULL, NULL, NULL, &info_level, &ctr, preferred_len, &numentries, &phnd);
if (!NT_STATUS_IS_OK(result))
goto done;