{
struct dcesrv_connection *dce_conn = call->conn;
struct dcesrv_auth *auth = call->auth_state;
- struct dcesrv_context_callbacks *cb = &call->conn->dce_ctx->callbacks;
+ struct dcesrv_context_callbacks *cb = call->conn->dce_ctx->callbacks;
NTSTATUS status;
if (auth->auth_started) {
{
struct dcesrv_connection *dce_conn = call->conn;
struct dcesrv_auth *auth = call->auth_state;
- struct dcesrv_context_callbacks *cb = &call->conn->dce_ctx->callbacks;
+ struct dcesrv_context_callbacks *cb = call->conn->dce_ctx->callbacks;
if (auth->auth_audited) {
return;
{
struct ncacn_packet *pkt = &call->pkt;
struct dcesrv_auth *auth = call->auth_state;
- struct dcesrv_context_callbacks *cb = &call->conn->dce_ctx->callbacks;
+ struct dcesrv_context_callbacks *cb = call->conn->dce_ctx->callbacks;
NTSTATUS status;
if (pkt->auth_length == 0) {
conn->max_recv_frag = max_rep;
conn->max_xmit_frag = max_rep;
- status = dce_ctx->callbacks.assoc_group.find(
- call, dce_ctx->callbacks.assoc_group.private_data);
+ status = dce_ctx->callbacks->assoc_group.find(
+ call, dce_ctx->callbacks->assoc_group.private_data);
if (!NT_STATUS_IS_OK(status)) {
DBG_NOTICE("Failed to find assoc_group 0x%08x: %s\n",
call->pkt.u.bind.assoc_group_id, nt_errstr(status));
{
struct dcesrv_context *dce_ctx;
+ if (cb == NULL) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
dce_ctx = talloc_zero(mem_ctx, struct dcesrv_context);
NT_STATUS_HAVE_NO_MEMORY(dce_ctx);
return NT_STATUS_NO_MEMORY;
}
dce_ctx->broken_connections = NULL;
- if (cb != NULL) {
- dce_ctx->callbacks = *cb;
- }
+ dce_ctx->callbacks = cb;
*_dce_ctx = dce_ctx;
return NT_STATUS_OK;
struct dcesrv_connection *broken_connections;
- struct dcesrv_context_callbacks callbacks;
+ struct dcesrv_context_callbacks *callbacks;
};
/* this structure is used by modules to determine the size of some critical types */
if (hs->conn->assoc_group == NULL) {
ZERO_STRUCT(state->call->pkt);
state->call->pkt.u.bind.assoc_group_id = 0;
- status = dce_ctx->callbacks.assoc_group.find(
+ status = dce_ctx->callbacks->assoc_group.find(
state->call,
- dce_ctx->callbacks.assoc_group.private_data);
+ dce_ctx->callbacks->assoc_group.private_data);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
ZERO_STRUCT(dcesrv_call->pkt);
dcesrv_call->pkt.u.bind.assoc_group_id = 0;
- cb = &dcesrv_call->conn->dce_ctx->callbacks;
+ cb = dcesrv_call->conn->dce_ctx->callbacks;
status = cb->assoc_group.find(
dcesrv_call, cb->assoc_group.private_data);
if (!NT_STATUS_IS_OK(status)) {
struct dcesrv_context *dce_ctx;
};
+static struct dcesrv_context_callbacks srv_callbacks = {
+ .log.successful_authz = NULL,
+};
+
static int setup_samr(void **state)
{
TALLOC_CTX *mem_ctx;
status = dcerpc_register_ep_server(ep_server);
assert_true(NT_STATUS_IS_OK(status));
- status = dcesrv_init_context(s, NULL, NULL, &s->dce_ctx);
+ status = dcesrv_init_context(s, NULL, &srv_callbacks, &s->dce_ctx);
assert_true(NT_STATUS_IS_OK(status));
status = dcesrv_init_ep_server(s->dce_ctx, "samr");