summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_pipe.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-06 21:29:54 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-06 21:29:54 +0000
commit7672761567005733cd0c82ac44a5973b6ff8ccd1 (patch)
treee47095a2974ea56ccdb75ea40113ce189f6f4f01 /source3/rpc_client/cli_pipe.c
parente71801c3de1e2bc0cb710cb1157adea1b50e12e1 (diff)
downloadsamba-7672761567005733cd0c82ac44a5973b6ff8ccd1.tar.gz
samba-7672761567005733cd0c82ac44a5973b6ff8ccd1.tar.bz2
samba-7672761567005733cd0c82ac44a5973b6ff8ccd1.zip
use of safe_cli_errstr() and cli_establish_connection().
(This used to be commit b60eb8c9fc61bf207ab3600eec3ca722403c4d19)
Diffstat (limited to 'source3/rpc_client/cli_pipe.c')
-rw-r--r--source3/rpc_client/cli_pipe.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 3ced236281..54ddac6f78 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -293,7 +293,9 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 nt_pipe_fnum, uint16 cmd,
pp_ret_params, p_ret_params_len, /* return params, len */
pp_ret_data, p_ret_data_len)) /* return data, len */
{
- DEBUG(0, ("cli_pipe: return critical error. Error was %s\n", cli_errstr(cli)));
+ fstring errstr;
+ cli_safe_errstr(cli, errstr, sizeof(errstr));
+ DEBUG(0, ("cli_pipe: return critical error. Error was %s\n", errstr));
return False;
}
@@ -1043,8 +1045,10 @@ BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name, uint16* nt_pipe
{
if ((fnum = cli_nt_create(cli, &(pipe_name[5]))) == -1)
{
+ fstring errstr;
+ cli_safe_errstr(cli, errstr, sizeof(errstr));
DEBUG(0,("cli_nt_session_open: cli_nt_create failed on pipe %s to machine %s. Error was %s\n",
- &(pipe_name[5]), cli->desthost, cli_errstr(cli)));
+ &(pipe_name[5]), cli->desthost, errstr));
return False;
}
@@ -1054,8 +1058,10 @@ BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name, uint16* nt_pipe
{
if ((fnum = cli_open(cli, pipe_name, O_CREAT|O_RDWR, DENY_NONE)) == -1)
{
+ fstring errstr;
+ cli_safe_errstr(cli, errstr, sizeof(errstr));
DEBUG(0,("cli_nt_session_open: cli_open failed on pipe %s to machine %s. Error was %s\n",
- pipe_name, cli->desthost, cli_errstr(cli)));
+ pipe_name, cli->desthost, errstr));
return False;
}
@@ -1064,8 +1070,10 @@ BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name, uint16* nt_pipe
/**************** Set Named Pipe State ***************/
if (!rpc_pipe_set_hnd_state(cli, *nt_pipe_fnum, pipe_name, 0x4300))
{
+ fstring errstr;
+ cli_safe_errstr(cli, errstr, sizeof(errstr));
DEBUG(0,("cli_nt_session_open: pipe hnd state failed. Error was %s\n",
- cli_errstr(cli)));
+ errstr));
cli_close(cli, *nt_pipe_fnum);
return False;
}
@@ -1078,8 +1086,10 @@ BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name, uint16* nt_pipe
&abstract, &transfer,
global_myname))
{
+ fstring errstr;
+ cli_safe_errstr(cli, errstr, sizeof(errstr));
DEBUG(0,("cli_nt_session_open: rpc bind failed. Error was %s\n",
- cli_errstr(cli)));
+ errstr));
cli_close(cli, *nt_pipe_fnum);
return False;
}