#include "includes.h"
#include "ntptr/ntptr.h"
-#include "build.h"
#include "param/param.h"
+#include "lib/util/samba_modules.h"
/* the list of currently registered NTPTR backends */
static struct ntptr_backend {
return NT_STATUS_OK;
}
-NTSTATUS ntptr_init(struct loadparm_context *lp_ctx)
+NTSTATUS ntptr_init(void)
{
- init_module_fn static_init[] = { STATIC_ntptr_MODULES, NULL };
- init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntptr");
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_ntptr_MODULES_PROTO;
+ init_module_fn static_init[] = { STATIC_ntptr_MODULES };
+ init_module_fn *shared_init = load_samba_modules(NULL, "ntptr");
run_init_functions(static_init);
run_init_functions(shared_init);
/*
create a ntptr_context with a specified NTPTR backend
*/
-NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
+NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx,
+ struct loadparm_context *lp_ctx,
const char *providor, struct ntptr_context **_ntptr)
{
NTSTATUS status;
NT_STATUS_HAVE_NO_MEMORY(ntptr);
ntptr->private_data = NULL;
ntptr->ops = ntptr_backend_byname(providor);
+ ntptr->ev_ctx = ev_ctx;
ntptr->lp_ctx = lp_ctx;
if (!ntptr->ops) {