summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-01 12:39:06 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-01 18:55:19 +1100
commitcea4bdb46747887cf82ed6a6330e1070b4e9f8ba (patch)
tree89a617cad85e8af897e18085a3bb8e6f013cecec /source4/dsdb
parente8f0e3aca9f834c53933dd31316c0b928944b400 (diff)
downloadsamba-cea4bdb46747887cf82ed6a6330e1070b4e9f8ba.tar.gz
samba-cea4bdb46747887cf82ed6a6330e1070b4e9f8ba.tar.bz2
samba-cea4bdb46747887cf82ed6a6330e1070b4e9f8ba.zip
s4-dsdb: convert the extended_dn_out module to the new ldb module style
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn_out.c27
-rw-r--r--source4/dsdb/samdb/ldb_modules/wscript_build14
2 files changed, 31 insertions, 10 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index 7d1826ea6e..b44e595958 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -859,20 +859,41 @@ static int extended_dn_out_fds_init(struct ldb_module *module)
return extended_dn_out_dereference_init(module, attrs);
}
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_out_ldb_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_out_ldb_module_ops = {
.name = "extended_dn_out_ldb",
.search = extended_dn_out_ldb_search,
.init_context = extended_dn_out_ldb_init,
};
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_out_openldap_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_out_openldap_module_ops = {
.name = "extended_dn_out_openldap",
.search = extended_dn_out_openldap_search,
.init_context = extended_dn_out_openldap_init,
};
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_out_fds_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_out_fds_module_ops = {
.name = "extended_dn_out_fds",
.search = extended_dn_out_fds_search,
.init_context = extended_dn_out_fds_init,
};
+
+/*
+ initialise the module
+ */
+_PUBLIC_ int ldb_extended_dn_out_init(const char *ldb_version)
+{
+ int ret;
+ ret = ldb_register_module(&ldb_extended_dn_out_ldb_module_ops);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ ret = ldb_register_module(&ldb_extended_dn_out_openldap_module_ops);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ ret = ldb_register_module(&ldb_extended_dn_out_fds_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 398b5932d7..a78b226383 100644
--- a/source4/dsdb/samdb/ldb_modules/wscript_build
+++ b/source4/dsdb/samdb/ldb_modules/wscript_build
@@ -178,13 +178,13 @@ bld.SAMBA_MODULE('ldb_extended_dn_in',
bld.SAMBA_MODULE('ldb_extended_dn_out',
- source='extended_dn_out.c',
- aliases='ldb_extended_dn_out_ldb ldb_extended_dn_out_openldap ldb_extended_dn_out_fds',
- subsystem='ldb',
- deps='talloc events ndr samba-util SAMDB',
- internal_module=False,
- init_function='LDB_MODULE(extended_dn_out_ldb),LDB_MODULE(extended_dn_out_openldap),LDB_MODULE(extended_dn_out_fds)'
- )
+ source='extended_dn_out.c',
+ init_function='ldb_extended_dn_out_init',
+ module_init_name='ldb_init_module',
+ subsystem='ldb',
+ deps='talloc events ndr samba-util SAMDB',
+ internal_module=False,
+ )
bld.SAMBA_MODULE('ldb_extended_dn_store',