return;
}
- status = dcerpc_pull_ncacn_packet(state,
+ status = dcerpc_pull_ncacn_packet(state->pkt,
&state->incoming_frag,
state->pkt,
!state->endianess);
result->a_u.schannel_auth->state = SCHANNEL_STATE_START;
result->a_u.schannel_auth->seq_num = 0;
result->a_u.schannel_auth->initiator = true;
- result->a_u.schannel_auth->creds = creds;
+ result->a_u.schannel_auth->creds = netlogon_creds_copy(result, creds);
*presult = result;
return NT_STATUS_OK;
/*
* The credentials on a new netlogon pipe are the ones we are passed
- * in - reference them in
+ * in - copy them over
*/
- result->dc = talloc_move(result, pdc);
+ result->dc = netlogon_creds_copy(result, *pdc);
+ if (result->dc == NULL) {
+ TALLOC_FREE(result);
+ return NT_STATUS_NO_MEMORY;
+ }
DEBUG(10,("cli_rpc_pipe_open_schannel_with_key: opened pipe %s to machine %s "
"for domain %s and bound using schannel.\n",
{
struct pipe_auth_data *a = cli->auth;
DATA_BLOB sk = data_blob_null;
- bool make_dup;
+ bool make_dup = false;
if (!session_key || !cli) {
return NT_STATUS_INVALID_PARAMETER;