@echo "Building plugin $@"
@$(SHLD_MODULE) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ)
-bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o
+bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
@echo "Building plugin $@"
- @$(SHLD_MODULE) winbindd/idmap_ldap.o
+ @$(SHLD_MODULE) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
bin/weird.@SHLIBEXT@: $(BINARY_PREREQS) $(DEVEL_HELP_WEIRD_OBJ)
@echo "Building plugin $@"
#include "includes.h"
#include "winbindd.h"
+#include "idmap_rw.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
char *user_dn;
bool anon;
struct idmap_ldap_alloc_context *alloc;
+ struct idmap_rw_ops *rw_ops;
};
#define CHECK_ALLOC_DONE(mem) do { \
Initialise idmap database.
********************************/
+static NTSTATUS idmap_ldap_set_mapping(struct idmap_domain *dom,
+ const struct id_map *map);
+
static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom,
const char *params)
{
ctx->suffix = talloc_strdup(ctx, tmp);
CHECK_ALLOC_DONE(ctx->suffix);
+ ctx->rw_ops = talloc_zero(ctx, struct idmap_rw_ops);
+ CHECK_ALLOC_DONE(ctx->rw_ops);
+
+ ctx->rw_ops->get_new_id = idmap_ldap_get_new_id;
+ ctx->rw_ops->set_mapping = idmap_ldap_set_mapping;
+
ret = smbldap_init(ctx, winbind_event_context(), ctx->url,
&ctx->smbldap_state);
if (!NT_STATUS_IS_OK(ret)) {