@echo "Building plugin $@"
@$(SHLD_MODULE) $(IDMAP_ADEX_OBJ)
-bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o
+bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o winbindd/idmap_rw.o
@echo "Building plugin $@"
- @$(SHLD_MODULE) winbindd/idmap_tdb2.o
+ @$(SHLD_MODULE) winbindd/idmap_tdb2.o winbindd/idmap_rw.o
bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o
@echo "Building plugin $@"
#include "includes.h"
#include "winbindd.h"
+#include "idmap_rw.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
struct idmap_tdb2_context {
struct db_context *db;
const char *script; /* script to provide idmaps */
+ struct idmap_rw_ops *rw_ops;
};
/* High water mark keys */
talloc_free(config_option);
}
+ ctx->rw_ops = talloc_zero(ctx, struct idmap_rw_ops);
+ if (ctx->rw_ops == NULL) {
+ DEBUG(0, ("Out of memory!\n"));
+ ret = NT_STATUS_NO_MEMORY;
+ goto failed;
+ }
+
+ ctx->rw_ops->get_new_id = idmap_tdb2_get_new_id;
+ ctx->rw_ops->set_mapping = idmap_tdb2_set_mapping;
+
dom->private_data = ctx;
ret = idmap_tdb2_open_db(dom);