summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-20 17:18:16 -0800
committerJeremy Allison <jra@samba.org>2007-11-20 17:18:16 -0800
commit66298d808034bb606478ff66aa156bda4e7e3f2a (patch)
treed331f5ab23f562fddfcbd1d278d60ff583ec09ff /source3/rpc_client
parentc049b8157d0bb4b5cd57b66740a26813be4f9eba (diff)
downloadsamba-66298d808034bb606478ff66aa156bda4e7e3f2a.tar.gz
samba-66298d808034bb606478ff66aa156bda4e7e3f2a.tar.bz2
samba-66298d808034bb606478ff66aa156bda4e7e3f2a.zip
More pstring elimination.
Jeremy. (This used to be commit 15074de938539e7a9c527d9a6d81792adc2ac3d0)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_lsarpc.c3
-rw-r--r--source3/rpc_client/cli_pipe.c12
2 files changed, 8 insertions, 7 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index a92031daaa..7e3ce04d6c 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -1374,7 +1374,6 @@ done:
bool fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid)
{
- extern pstring global_myname;
struct cli_state cli;
NTSTATUS result;
POLICY_HND lsa_pol;
@@ -1397,7 +1396,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
goto done;
}
- if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
+ if (!attempt_netbios_session_request(&cli, global_myname(), remote_machine, &cli.dest_ip)) {
DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS session request.\n",
remote_machine));
goto done;
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 1e5e04448f..c93e26ccbc 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1551,13 +1551,15 @@ NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli,
ret = rpc_api_pipe(cli, &outgoing_pdu, out_data, RPC_RESPONSE);
prs_mem_free(&outgoing_pdu);
-
if (DEBUGLEVEL >= 50) {
- pstring dump_name;
+ char *dump_name = NULL;
/* Also capture received data */
- slprintf(dump_name, sizeof(dump_name) - 1, "%s/reply_%s_%d",
- dyn_LOGFILEBASE, cli->pipe_name, op_num);
- prs_dump(dump_name, op_num, out_data);
+ if (asprintf(&dump_name, "%s/reply_%s_%d",
+ dyn_LOGFILEBASE, cli->pipe_name,
+ op_num) > 0) {
+ prs_dump(dump_name, op_num, out_data);
+ SAFE_FREE(dump_name);
+ }
}
return ret;