diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-01 12:39:49 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-01 18:55:19 +1100 |
commit | 014a90f6eff99ab84ad916391e40d63b51196036 (patch) | |
tree | 8095bb5669aa4f87ca0637173eb1e5eb9582dd14 /source4/dsdb/samdb/ldb_modules | |
parent | cea4bdb46747887cf82ed6a6330e1070b4e9f8ba (diff) | |
download | samba-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')
-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', |