#include "includes.h"
#include "ntdomain.h"
+#include "lib/util/tevent_ntstatus.h"
+#include "librpc/rpc/dcerpc_connection.h"
#include "bin/default/librpc/gen_ndr/s3compat_drsuapi.h"
struct _s3_compat_drsuapi_DsBind_state {
};
static struct tevent_req *_s3_compat_drsuapi_DsBind_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsBind *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsBind *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsBind_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.bind_info = r->in.bind_info;
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsUnbind_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsUnbind *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsUnbind *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsUnbind_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.bind_handle = r->in.bind_handle;
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsReplicaSync_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsReplicaSync *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsReplicaSync *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsReplicaSync_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _drsuapi_DsReplicaSync(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsGetNCChanges_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsGetNCChanges *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsGetNCChanges *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsGetNCChanges_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsReplicaUpdateRefs_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsReplicaUpdateRefs *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsReplicaUpdateRefs *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsReplicaUpdateRefs_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _drsuapi_DsReplicaUpdateRefs(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsReplicaAdd_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsReplicaAdd *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsReplicaAdd *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsReplicaAdd_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _drsuapi_DsReplicaAdd(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsReplicaDel_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsReplicaDel *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsReplicaDel *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsReplicaDel_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _drsuapi_DsReplicaDel(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsReplicaMod_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsReplicaMod *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsReplicaMod *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsReplicaMod_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _drsuapi_DsReplicaMod(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_DRSUAPI_VERIFY_NAMES_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct DRSUAPI_VERIFY_NAMES *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct DRSUAPI_VERIFY_NAMES *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_DRSUAPI_VERIFY_NAMES_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _DRSUAPI_VERIFY_NAMES(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsGetMemberships_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsGetMemberships *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsGetMemberships *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsGetMemberships_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_DRSUAPI_INTER_DOMAIN_MOVE_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct DRSUAPI_INTER_DOMAIN_MOVE *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct DRSUAPI_INTER_DOMAIN_MOVE *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_DRSUAPI_INTER_DOMAIN_MOVE_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _DRSUAPI_INTER_DOMAIN_MOVE(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsGetNT4ChangeLog_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsGetNT4ChangeLog *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsGetNT4ChangeLog *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsGetNT4ChangeLog_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsCrackNames_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsCrackNames *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsCrackNames *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsCrackNames_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsWriteAccountSpn_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsWriteAccountSpn *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsWriteAccountSpn *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsWriteAccountSpn_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsRemoveDSServer_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsRemoveDSServer *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsRemoveDSServer *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsRemoveDSServer_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_DRSUAPI_REMOVE_DS_DOMAIN_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct DRSUAPI_REMOVE_DS_DOMAIN *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct DRSUAPI_REMOVE_DS_DOMAIN *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_DRSUAPI_REMOVE_DS_DOMAIN_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _DRSUAPI_REMOVE_DS_DOMAIN(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsGetDomainControllerInfo_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsGetDomainControllerInfo *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsGetDomainControllerInfo *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsGetDomainControllerInfo_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, enum drsuapi_DsGetDCInfoCtrLevels);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsAddEntry_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsAddEntry *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsAddEntry *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsAddEntry_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsExecuteKCC_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsExecuteKCC *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsExecuteKCC *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsExecuteKCC_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _drsuapi_DsExecuteKCC(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsReplicaGetInfo_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsReplicaGetInfo *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsReplicaGetInfo *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsReplicaGetInfo_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.info_type = talloc_zero(r, enum drsuapi_DsReplicaInfoType);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_DRSUAPI_ADD_SID_HISTORY_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct DRSUAPI_ADD_SID_HISTORY *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct DRSUAPI_ADD_SID_HISTORY *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_DRSUAPI_ADD_SID_HISTORY_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _DRSUAPI_ADD_SID_HISTORY(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_DsGetMemberships2_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_DsGetMemberships2 *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_DsGetMemberships2 *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_DsGetMemberships2_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_DRSUAPI_REPLICA_VERIFY_OBJECTS_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_DRSUAPI_REPLICA_VERIFY_OBJECTS_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _DRSUAPI_REPLICA_VERIFY_OBJECTS(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_DRSUAPI_GET_OBJECT_EXISTENCE_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_DRSUAPI_GET_OBJECT_EXISTENCE_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
r->out.result = _DRSUAPI_GET_OBJECT_EXISTENCE(p, r);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
};
static struct tevent_req *_s3_compat_drsuapi_QuerySitesByCost_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_call_handle *call,
- struct drsuapi_QuerySitesByCost *r)
+ struct tevent_context *ev,
+ struct dcerpc_call_handle *call,
+ struct drsuapi_QuerySitesByCost *r)
{
- struct tevent_req *req
+ struct tevent_req *req;
struct _s3_compat_drsuapi_QuerySitesByCost_state *state;
struct pipes_struct *p;
state->r = r;
p = dcerpc_call_handle_get_pipes_struct(call);
+ if (p == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ return tevent_req_post(req, ev);
+ }
ZERO_STRUCT(r->out);
r->out.level_out = talloc_zero(r, uint32_t);
if (p->fault_state) {
NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
- tevent_req_nterror(status);
+ tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
}
-static const struct dcerpc_call_entry_point_fns struct _s3_compat_drsuapi_fns[] = {
+static const struct dcerpc_call_entry_point_fns _s3_compat_drsuapi_fns[] = {
{
.send_fn = (dcerpc_call_entry_point_send_fn_t)
_s3_compat_drsuapi_DsBind_send,
};
static const struct dcerpc_call_entry_point_vector _s3_compat_drsuapi_epv[] = {
+ {
.name = "_s3_compat_drsuapi",
.table = &ndr_table_drsuapi,
.num_fns = 25,
.fns = _s3_compat_drsuapi_fns,
+ },
};
NTSTATUS dcerpc_server_setup_s3compat_drsuapi(struct dcerpc_server *server)