The Samba-Bugzilla – Attachment 1664 Details for
Bug 3390
net rpc vampire segfaults
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
copy session key *after* the ZERO_STRUCT
diff (text/plain), 2.13 KB, created by
Guenther Deschner
on 2006-01-11 11:34:14 UTC
(
hide
)
Description:
copy session key *after* the ZERO_STRUCT
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2006-01-11 11:34:14 UTC
Size:
2.13 KB
patch
obsolete
>Index: include/rpc_client.h >=================================================================== >--- include/rpc_client.h (revision 12844) >+++ include/rpc_client.h (working copy) >@@ -55,6 +55,41 @@ > prs_mem_free( &r_ps );\ > } > >+#define CLI_DO_RPC_SESS_KEY( pcli, ctx, p_idx, opnum, q_in, r_out, \ >+ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ >+{\ >+ SMB_ASSERT(pcli->pipe_idx == p_idx); \ >+ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ >+ return NT_STATUS_NO_MEMORY;\ >+ }\ >+ if (!prs_init( &r_ps, 0, ctx, UNMARSHALL )) {\ >+ prs_mem_free( &q_ps );\ >+ return NT_STATUS_NO_MEMORY;\ >+ }\ >+ prs_set_session_key(&q_ps, (const char *)pcli->dc->sess_key);\ >+ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ >+ NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ >+ if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ >+ prs_mem_free( &q_ps );\ >+ prs_mem_free( &r_ps );\ >+ return _smb_pipe_stat_;\ >+ }\ >+ prs_set_session_key(&r_ps, (const char *)pcli->dc->sess_key);\ >+ if (!r_io_fn("", &r_out, &r_ps, 0)) {\ >+ prs_mem_free( &q_ps );\ >+ prs_mem_free( &r_ps );\ >+ return default_error;\ >+ }\ >+ } else {\ >+ prs_mem_free( &q_ps );\ >+ prs_mem_free( &r_ps );\ >+ return default_error;\ >+ }\ >+ prs_mem_free( &q_ps );\ >+ prs_mem_free( &r_ps );\ >+} >+ >+ > /* Arrrgg. Same but with WERRORS. Needed for registry code. */ > > #define CLI_DO_RPC_WERR( pcli, ctx, p_idx, opnum, q_in, r_out, \ >Index: rpc_client/cli_netlogon.c >=================================================================== >--- rpc_client/cli_netlogon.c (revision 12844) >+++ rpc_client/cli_netlogon.c (working copy) >@@ -604,15 +604,12 @@ > > creds_client_step(cli->dc, &clnt_creds); > >- prs_set_session_key(&qbuf, (const char *)cli->dc->sess_key); >- prs_set_session_key(&rbuf, (const char *)cli->dc->sess_key); >- > init_net_q_sam_sync(&q, cli->dc->remote_machine, global_myname(), > &clnt_creds, &ret_creds, database_id, next_rid); > > /* Marshall data and send request */ > >- CLI_DO_RPC(cli, mem_ctx, PI_NETLOGON, NET_SAM_SYNC, >+ CLI_DO_RPC_SESS_KEY(cli, mem_ctx, PI_NETLOGON, NET_SAM_SYNC, > q, r, > qbuf, rbuf, > net_io_q_sam_sync,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3390
:
1664
|
1665