diff options
author | Tim Potter <tpot@samba.org> | 2000-07-17 05:40:48 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-07-17 05:40:48 +0000 |
commit | d39eaf1776cc0bfd3cf4d11089cfa35a64538c06 (patch) | |
tree | af49c352df2bba2dce9446e6b71a2faf19f76aa7 | |
parent | 873c0366d95dd747f93613f6519836fc8f0c8feb (diff) | |
download | samba-d39eaf1776cc0bfd3cf4d11089cfa35a64538c06.tar.gz samba-d39eaf1776cc0bfd3cf4d11089cfa35a64538c06.tar.bz2 samba-d39eaf1776cc0bfd3cf4d11089cfa35a64538c06.zip |
Reverted changes from rpcclient merge - contains memory leak!
(This used to be commit dea06ad7a554089a7394cdcb6bf5a766e8e8a6c3)
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index d39f742579..ade31dbb5b 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -522,7 +522,7 @@ static BOOL create_rpc_bind_req(prs_struct *rpc_out, BOOL do_auth, uint32 rpc_ca prs_struct auth_info; int auth_len = 0; - prs_init(&auth_info, MAX_PDU_FRAG_LEN, 4, MARSHALL); + prs_init(&auth_info, 0, 4, MARSHALL); if (do_auth) { RPC_HDR_AUTH hdr_auth; @@ -1087,13 +1087,20 @@ BOOL rpc_pipe_bind(struct cli_state *cli, char *pipe_name, char *my_name) prs_struct rdata; BOOL do_auth = (cli->ntlmssp_cli_flgs != 0); uint32 rpc_call_id; + char buffer[MAX_PDU_FRAG_LEN]; DEBUG(5,("Bind RPC Pipe[%x]: %s\n", cli->nt_pipe_fnum, pipe_name)); if (!valid_pipe_name(pipe_name, &abstract, &transfer)) return False; - prs_init(&rpc_out, MAX_PDU_FRAG_LEN, 4, MARSHALL); + prs_init(&rpc_out, 0, 4, MARSHALL); + + /* + * Use the MAX_PDU_FRAG_LEN buffer to store the bind request. + */ + + prs_give_memory( &rpc_out, buffer, sizeof(buffer), False); rpc_call_id = get_rpc_call_id(); |