diff options
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/simple_ldap_map.c | 21 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/wscript_build | 14 |
2 files changed, 26 insertions, 9 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; +} diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build b/source4/dsdb/samdb/ldb_modules/wscript_build index a78b226383..4bf89d294b 100644 --- a/source4/dsdb/samdb/ldb_modules/wscript_build +++ b/source4/dsdb/samdb/ldb_modules/wscript_build @@ -133,13 +133,13 @@ bld.SAMBA_MODULE('ldb_samba3sid', bld.SAMBA_MODULE('ldb_simple_ldap_map', - source='simple_ldap_map.c', - aliases='ldb_entryuuid ldb_nsuniqueid', - subsystem='ldb', - init_function='LDB_MODULE(entryuuid),LDB_MODULE(nsuniqueid)', - internal_module=False, - deps='talloc events ldb ndr LDBSAMBA' - ) + source='simple_ldap_map.c', + subsystem='ldb', + init_function='ldb_simple_ldap_map_init', + module_init_name='ldb_init_module', + internal_module=False, + deps='talloc events ldb ndr LDBSAMBA' + ) bld.SAMBA_MODULE('ldb_rootdse', |