summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-01 12:39:49 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-01 18:55:19 +1100
commit014a90f6eff99ab84ad916391e40d63b51196036 (patch)
tree8095bb5669aa4f87ca0637173eb1e5eb9582dd14 /source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
parentcea4bdb46747887cf82ed6a6330e1070b4e9f8ba (diff)
downloadsamba-014a90f6eff99ab84ad916391e40d63b51196036.tar.gz
samba-014a90f6eff99ab84ad916391e40d63b51196036.tar.bz2
samba-014a90f6eff99ab84ad916391e40d63b51196036.zip
s4-dsdb: convert the simple_ldap_map module to the new module style
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/simple_ldap_map.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/simple_ldap_map.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
index 36c984f947..cee952126d 100644
--- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
+++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
@@ -920,16 +920,33 @@ static int entryuuid_extended(struct ldb_module *module, struct ldb_request *req
return ldb_next_request(module, req);
}
-_PUBLIC_ const struct ldb_module_ops ldb_entryuuid_module_ops = {
+static const struct ldb_module_ops ldb_entryuuid_module_ops = {
.name = "entryuuid",
.init_context = entryuuid_init,
.extended = entryuuid_extended,
LDB_MAP_OPS
};
-_PUBLIC_ const struct ldb_module_ops ldb_nsuniqueid_module_ops = {
+static const struct ldb_module_ops ldb_nsuniqueid_module_ops = {
.name = "nsuniqueid",
.init_context = nsuniqueid_init,
.extended = entryuuid_extended,
LDB_MAP_OPS
};
+
+/*
+ initialise the module
+ */
+_PUBLIC_ int ldb_simple_ldap_map_init(const char *ldb_version)
+{
+ int ret;
+ ret = ldb_register_module(&ldb_entryuuid_module_ops);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ ret = ldb_register_module(&ldb_nsuniqueid_module_ops);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ return LDB_SUCCESS;
+}