summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ildap
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_ildap')
-rw-r--r--source4/lib/ldb/ldb_ildap/config.mk1
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c21
2 files changed, 15 insertions, 7 deletions
diff --git a/source4/lib/ldb/ldb_ildap/config.mk b/source4/lib/ldb/ldb_ildap/config.mk
index 01d9ec88ff..3062dc886f 100644
--- a/source4/lib/ldb/ldb_ildap/config.mk
+++ b/source4/lib/ldb/ldb_ildap/config.mk
@@ -5,7 +5,6 @@ SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBCLI_LDAP CREDENTIALS
-INIT_FUNCTION = ldb_ildap_init
ALIASES = ldapi ldaps ldap
OBJ_FILES = \
ldb_ildap.o
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index a834e912d4..995b584f51 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -811,9 +811,18 @@ failed:
return -1;
}
-int ldb_ildap_init(void)
-{
- return ldb_register_backend("ldap", ildb_connect) +
- ldb_register_backend("ldapi", ildb_connect) +
- ldb_register_backend("ldaps", ildb_connect);
-}
+_PUBLIC_ const struct ldb_backend_ops ldb_ldap_backend_ops = {
+ .name = "ldap",
+ .connect_fn = ildb_connect
+};
+
+_PUBLIC_ const struct ldb_backend_ops ldb_ildap_backend_ops = {
+ .name = "ildap",
+ .connect_fn = ildb_connect
+};
+
+_PUBLIC_ const struct ldb_backend_ops ldb_ldaps_backend_ops = {
+ .name = "ldaps",
+ .connect_fn = ildb_connect
+};
+