summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c6
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c20
-rw-r--r--source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c2
-rw-r--r--source4/lib/ldb/modules/paged_searches.c2
-rw-r--r--source4/lib/ldb/tests/sample_module.c2
5 files changed, 20 insertions, 12 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index fb7100e3c1..995b584f51 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -811,17 +811,17 @@ failed:
return -1;
}
-const struct ldb_backend_ops ldb_ldap_backend_ops {
+_PUBLIC_ const struct ldb_backend_ops ldb_ldap_backend_ops = {
.name = "ldap",
.connect_fn = ildb_connect
};
-const struct ldb_backend_ops ldb_ildap_backend_ops {
+_PUBLIC_ const struct ldb_backend_ops ldb_ildap_backend_ops = {
.name = "ildap",
.connect_fn = ildb_connect
};
-const struct ldb_backend_ops ldb_ldaps_backend_ops {
+_PUBLIC_ const struct ldb_backend_ops ldb_ldaps_backend_ops = {
.name = "ldaps",
.connect_fn = ildb_connect
};
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index d897350c2f..3f6ff3fd5b 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -826,9 +826,17 @@ failed:
return -1;
}
-int ldb_ldap_init(void)
-{
- return ldb_register_backend("ldap", lldb_connect) +
- ldb_register_backend("ldapi", lldb_connect) +
- ldb_register_backend("ldaps", lldb_connect);
-}
+_PUBLIC_ struct ldb_backend_ops ldb_ldap_backend_ops = {
+ .name = "ldap",
+ .connect_fn = lldb_connect
+};
+
+_PUBLIC_ struct ldb_backend_ops ldb_ldapi_backend_ops = {
+ .name = "ldapi",
+ .connect_fn = lldb_connect
+};
+
+_PUBLIC_ struct ldb_backend_ops ldb_ldaps_backend_ops = {
+ .name = "ldaps",
+ .connect_fn = lldb_connect
+};
diff --git a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
index 8742e257f3..214e7eec5f 100644
--- a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
+++ b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
@@ -1903,7 +1903,7 @@ failed:
return -1;
}
-const struct ldb_backend_ops ldb_sqlite3_backend_ops = {
+_PUBLIC_ const struct ldb_backend_ops ldb_sqlite3_backend_ops = {
.name = "sqlite3",
.connect_fn = lsqlite3_connect
};
diff --git a/source4/lib/ldb/modules/paged_searches.c b/source4/lib/ldb/modules/paged_searches.c
index 7406e91c9d..40e87f70d6 100644
--- a/source4/lib/ldb/modules/paged_searches.c
+++ b/source4/lib/ldb/modules/paged_searches.c
@@ -455,7 +455,7 @@ static int ps_init(struct ldb_module *module)
return ldb_next_init(module);
}
-const struct ldb_module_ops ldb_paged_searches_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_paged_searches_module_ops = {
.name = "paged_searches",
.search = ps_search,
.wait = ps_wait,
diff --git a/source4/lib/ldb/tests/sample_module.c b/source4/lib/ldb/tests/sample_module.c
index 1a9e72c907..98d8e865dd 100644
--- a/source4/lib/ldb/tests/sample_module.c
+++ b/source4/lib/ldb/tests/sample_module.c
@@ -32,7 +32,7 @@ int sample_add(struct ldb_module *mod, struct ldb_request *req)
return ldb_next_request(mod, req);
}
-const struct ldb_module_ops ldb_sample_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_sample_module_ops = {
.name = "sample",
.add = sample_add,
};