return dcesrv_interface_bind_require_integrity(dce_call, iface);
}
+#define DNSSERVER_STATE_MAGIC 0xc9657ab4
struct dnsserver_state {
struct loadparm_context *lp_ctx;
struct ldb_context *samdb;
struct dnsserver_state *dsstate;
struct dnsserver_zone *zones, *z, *znext;
struct dnsserver_partition *partitions, *p;
+ NTSTATUS status;
- dsstate = talloc_get_type(dce_call->context->private_data, struct dnsserver_state);
+ dsstate = dcesrv_iface_state_find_conn(dce_call,
+ DNSSERVER_STATE_MAGIC,
+ struct dnsserver_state);
if (dsstate != NULL) {
return dsstate;
}
- dsstate = talloc_zero(dce_call->context, struct dnsserver_state);
+ dsstate = talloc_zero(dce_call, struct dnsserver_state);
if (dsstate == NULL) {
return NULL;
}
}
}
- dce_call->context->private_data = dsstate;
+ status = dcesrv_iface_state_store_conn(dce_call,
+ DNSSERVER_STATE_MAGIC,
+ dsstate);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto failed;
+ }
return dsstate;