summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/config.mk2
-rw-r--r--source4/dsdb/samdb/ldb_modules/anr.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/config.mk57
-rw-r--r--source4/dsdb/samdb/ldb_modules/dsdb_cache.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/instancetype.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/kludge_acl.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/linked_attributes.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/local_password.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/naming_fsmo.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/normalise.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectguid.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c9
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/pdc_fsmo.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/proxy.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/ranged_results.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba3sam.c17
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_fsmo.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/show_deleted.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/simple_ldap_map.c38
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_delete.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_rename.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/update_keytab.c7
-rw-r--r--source4/dsdb/schema/schema.h2
-rw-r--r--source4/dsdb/schema/schema_init.c14
-rw-r--r--source4/dsdb/schema/schema_syntax.c17
32 files changed, 81 insertions, 252 deletions
diff --git a/source4/dsdb/config.mk b/source4/dsdb/config.mk
index de00b401c8..17752fbbbd 100644
--- a/source4/dsdb/config.mk
+++ b/source4/dsdb/config.mk
@@ -1,6 +1,6 @@
# Directory Service subsystem
-include samdb/ldb_modules/config.mk
+mkinclude samdb/ldb_modules/config.mk
################################################
# Start SUBSYSTEM SAMDB
diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c
index 908d9b088c..1252c9ee42 100644
--- a/source4/dsdb/samdb/ldb_modules/anr.c
+++ b/source4/dsdb/samdb/ldb_modules/anr.c
@@ -295,13 +295,7 @@ static int anr_search(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, req);
}
-static const struct ldb_module_ops anr_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_anr_module_ops = {
.name = "anr",
.search = anr_search
};
-
-int ldb_anr_init(void)
-{
- return ldb_register_module(&anr_ops);
-}
-
diff --git a/source4/dsdb/samdb/ldb_modules/config.mk b/source4/dsdb/samdb/ldb_modules/config.mk
index dc407fbd8a..de93b5638d 100644
--- a/source4/dsdb/samdb/ldb_modules/config.mk
+++ b/source4/dsdb/samdb/ldb_modules/config.mk
@@ -4,7 +4,7 @@
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
-INIT_FUNCTION = objectguid_module_init
+INIT_FUNCTION = objectguid_module_module_ops
OBJ_FILES = \
objectguid.o
# End MODULE ldb_objectguid
@@ -17,7 +17,7 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC LIBNDR NDR_MISC NDR_DRSUAPI \
NDR_DRSBLOBS LIBNDR
-INIT_FUNCTION = repl_meta_data_module_init
+INIT_FUNCTION = repl_meta_data_module_module_ops
OBJ_FILES = \
repl_meta_data.o
# End MODULE ldb_repl_meta_data
@@ -29,7 +29,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = dsdb_cache_module_init
+INIT_FUNCTION = dsdb_cache_module_module_ops
OBJ_FILES = \
dsdb_cache.o
# End MODULE ldb_dsdb_cache
@@ -41,7 +41,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = schema_fsmo_module_init
+INIT_FUNCTION = schema_fsmo_module_module_ops
OBJ_FILES = \
schema_fsmo.o
# End MODULE ldb_schema_fsmo
@@ -53,7 +53,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = naming_fsmo_module_init
+INIT_FUNCTION = naming_fsmo_module_module_ops
OBJ_FILES = \
naming_fsmo.o
# End MODULE ldb_naming_fsmo
@@ -65,7 +65,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = pdc_fsmo_module_init
+INIT_FUNCTION = pdc_fsmo_module_module_ops
OBJ_FILES = \
pdc_fsmo.o
# End MODULE ldb_pdc_fsmo
@@ -77,7 +77,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LDAP_ENCODE NDR_MISC SAMDB
-INIT_FUNCTION = samldb_module_init
+INIT_FUNCTION = samldb_module_module_ops
OBJ_FILES = \
samldb.o
#
@@ -89,7 +89,7 @@ OBJ_FILES = \
[MODULE::ldb_samba3sam]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = ldb_samba3sam_module_init
+INIT_FUNCTION = &ldb_samba3sam_module_module_ops
PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER LIBSECURITY \
NDR_SECURITY
OBJ_FILES = \
@@ -103,7 +103,7 @@ OBJ_FILES = \
[MODULE::ldb_simple_ldap_map]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = ldb_simple_ldap_map_module_init
+INIT_FUNCTION = &ldb_simple_ldap_map_module_module_ops
PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map LIBNDR NDR_MISC
ENABLE = YES
ALIASES = entryuuid nsuniqueid
@@ -117,7 +117,7 @@ OBJ_FILES = \
# # Start MODULE ldb_proxy
# [MODULE::ldb_proxy]
# SUBSYSTEM = LIBLDB
-# INIT_FUNCTION = proxy_module_init
+# INIT_FUNCTION = proxy_module_module_ops
# OBJ_FILES = \
# proxy.o
#
@@ -131,7 +131,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = rootdse_module_init
+INIT_FUNCTION = rootdse_module_module_ops
OBJ_FILES = \
rootdse.o
#
@@ -143,7 +143,7 @@ OBJ_FILES = \
[MODULE::ldb_password_hash]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = password_hash_module_init
+INIT_FUNCTION = password_hash_module_module_ops
OBJ_FILES = password_hash.o
PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
LIBCLI_AUTH NDR_DRSBLOBS KERBEROS SAMDB
@@ -157,7 +157,7 @@ PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = local_password_module_init
+INIT_FUNCTION = local_password_module_module_ops
OBJ_FILES = local_password.o
#
# End MODULE ldb_local_password
@@ -169,7 +169,7 @@ OBJ_FILES = local_password.o
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = ldb_kludge_acl_init
+INIT_FUNCTION = &ldb_kludge_acl_module_ops
OBJ_FILES = \
kludge_acl.o
#
@@ -182,7 +182,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR LIBSECURITY SAMDB
-INIT_FUNCTION = ldb_extended_dn_init
+INIT_FUNCTION = &ldb_extended_dn_module_ops
OBJ_FILES = \
extended_dn.o
#
@@ -195,7 +195,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = ldb_show_deleted_init
+INIT_FUNCTION = &ldb_show_deleted_module_ops
OBJ_FILES = \
show_deleted.o
#
@@ -208,7 +208,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
-INIT_FUNCTION = ldb_partition_init
+INIT_FUNCTION = &ldb_partition_module_ops
OBJ_FILES = \
partition.o
#
@@ -221,7 +221,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBLDB
-INIT_FUNCTION = ldb_schema_init
+INIT_FUNCTION = &ldb_schema_module_ops
OBJ_FILES = \
schema.o schema_syntax.o
#
@@ -235,7 +235,7 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC CREDENTIALS
#Also depends on credentials, but that would loop
-INIT_FUNCTION = ldb_update_kt_init
+INIT_FUNCTION = &ldb_update_kt_module_ops
OBJ_FILES = \
update_keytab.o
#
@@ -245,7 +245,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_objectclass
[MODULE::ldb_objectclass]
-INIT_FUNCTION = ldb_objectclass_init
+INIT_FUNCTION = &ldb_objectclass_module_ops
OUTPUT_TYPE = SHARED_LIBRARY
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY NDR_SECURITY SAMDB
@@ -258,8 +258,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_rename]
-INIT_FUNCTION = ldb_subtree_rename_init
-OUTPUT_TYPE = SHARED_LIBRARY
+INIT_FUNCTION = &ldb_subtree_rename_module_ops
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -271,8 +270,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_delete]
-INIT_FUNCTION = ldb_subtree_delete_init
-OUTPUT_TYPE = SHARED_LIBRARY
+INIT_FUNCTION = &ldb_subtree_delete_module_ops
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -284,7 +282,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_linked_attributes
[MODULE::ldb_linked_attributes]
-INIT_FUNCTION = ldb_linked_attributes_init
+INIT_FUNCTION = &ldb_linked_attributes_module_ops
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
@@ -297,9 +295,8 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_ranged_results
[MODULE::ldb_ranged_results]
-INIT_FUNCTION = ldb_ranged_results_init
+INIT_FUNCTION = &ldb_ranged_results_module_ops
CFLAGS = -Ilib/ldb/include
-OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
OBJ_FILES = \
@@ -310,7 +307,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_anr
[MODULE::ldb_anr]
-INIT_FUNCTION = ldb_anr_init
+INIT_FUNCTION = &ldb_anr_module_ops
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -323,7 +320,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_normalise
[MODULE::ldb_normalise]
-INIT_FUNCTION = ldb_normalise_init
+INIT_FUNCTION = &ldb_normalise_module_ops
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -336,7 +333,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_instancetype
[MODULE::ldb_instancetype]
-INIT_FUNCTION = ldb_instancetype_init
+INIT_FUNCTION = &ldb_instancetype_module_ops
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
diff --git a/source4/dsdb/samdb/ldb_modules/dsdb_cache.c b/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
index 4ca8bbf463..e60605dce1 100644
--- a/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
+++ b/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
@@ -36,12 +36,7 @@ static int dsdb_cache_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops dsdb_cache_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_dsdb_cache_module_ops = {
.name = "dsdb_cache",
.init_context = dsdb_cache_init
};
-
-int dsdb_cache_module_init(void)
-{
- return ldb_register_module(&dsdb_cache_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn.c b/source4/dsdb/samdb/ldb_modules/extended_dn.c
index 802f86570b..84bf5e4843 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn.c
@@ -362,13 +362,8 @@ static int extended_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops extended_dn_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_module_ops = {
.name = "extended_dn",
.search = extended_search,
.init_context = extended_init
};
-
-int ldb_extended_dn_init(void)
-{
- return ldb_register_module(&extended_dn_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/instancetype.c b/source4/dsdb/samdb/ldb_modules/instancetype.c
index 65df294e90..fd5aa5e18a 100644
--- a/source4/dsdb/samdb/ldb_modules/instancetype.c
+++ b/source4/dsdb/samdb/ldb_modules/instancetype.c
@@ -118,13 +118,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
return ret;
}
-static const struct ldb_module_ops instancetype_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_instancetype_module_ops = {
.name = "instancetype",
.add = instancetype_add,
};
-
-
-int ldb_instancetype_init(void)
-{
- return ldb_register_module(&instancetype_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index ea33548b91..e3e1f7ac88 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -471,7 +471,7 @@ done:
return ldb_next_init(module);
}
-static const struct ldb_module_ops kludge_acl_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_kludge_acl_module_ops = {
.name = "kludge_acl",
.search = kludge_acl_search,
.add = kludge_acl_change,
@@ -481,8 +481,3 @@ static const struct ldb_module_ops kludge_acl_ops = {
.extended = kludge_acl_change,
.init_context = kludge_acl_init
};
-
-int ldb_kludge_acl_init(void)
-{
- return ldb_register_module(&kludge_acl_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index b3fdffe566..8685c722aa 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -915,7 +915,7 @@ static int linked_attributes_wait(struct ldb_handle *handle, enum ldb_wait_type
}
}
-static const struct ldb_module_ops linked_attributes_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_linked_attributes_module_ops = {
.name = "linked_attributes",
.add = linked_attributes_add,
.modify = linked_attributes_modify,
@@ -923,8 +923,3 @@ static const struct ldb_module_ops linked_attributes_ops = {
.rename = linked_attributes_rename,
.wait = linked_attributes_wait,
};
-
-int ldb_linked_attributes_init(void)
-{
- return ldb_register_module(&linked_attributes_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c
index 350434df51..dfa98ef0af 100644
--- a/source4/dsdb/samdb/ldb_modules/local_password.c
+++ b/source4/dsdb/samdb/ldb_modules/local_password.c
@@ -843,16 +843,10 @@ static int local_password_wait(struct ldb_handle *handle, enum ldb_wait_type typ
}
}
-static const struct ldb_module_ops local_password_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_local_password_module_ops = {
.name = "local_password",
.add = local_password_add,
.modify = local_password_modify,
.search = local_password_search,
.wait = local_password_wait
};
-
-
-int local_password_module_init(void)
-{
- return ldb_register_module(&local_password_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
index d6b6a24287..084540f68d 100644
--- a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
@@ -117,12 +117,7 @@ static int naming_fsmo_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops naming_fsmo_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_naming_fsmo_module_ops = {
.name = "naming_fsmo",
.init_context = naming_fsmo_init
};
-
-int naming_fsmo_module_init(void)
-{
- return ldb_register_module(&naming_fsmo_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/normalise.c b/source4/dsdb/samdb/ldb_modules/normalise.c
index efc9bb29e8..695393d4e8 100644
--- a/source4/dsdb/samdb/ldb_modules/normalise.c
+++ b/source4/dsdb/samdb/ldb_modules/normalise.c
@@ -105,6 +105,7 @@ static int normalise_search_callback(struct ldb_context *ldb, void *context, str
if (!attribute) {
continue;
}
+ /* Look to see if this attributeSyntax is a DN */
if ((strcmp(attribute->attributeSyntax_oid, "2.5.5.1") != 0) &&
(strcmp(attribute->attributeSyntax_oid, "2.5.5.7") != 0)) {
continue;
@@ -155,12 +156,7 @@ static int normalise_search(struct ldb_module *module, struct ldb_request *req)
}
-static const struct ldb_module_ops normalise_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_normalise_module_ops = {
.name = "normalise",
.search = normalise_search,
};
-
-int ldb_normalise_init(void)
-{
- return ldb_register_module(&normalise_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 737475ca78..e63ad4de56 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -1153,16 +1153,10 @@ static int objectclass_wait(struct ldb_handle *handle, enum ldb_wait_type type)
}
}
-static const struct ldb_module_ops objectclass_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_objectclass_module_ops = {
.name = "objectclass",
.add = objectclass_add,
.modify = objectclass_modify,
.rename = objectclass_rename,
.wait = objectclass_wait
};
-
-int ldb_objectclass_init(void)
-{
- return ldb_register_module(&objectclass_ops);
-}
-
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c b/source4/dsdb/samdb/ldb_modules/objectguid.c
index bf57f5c21b..f62839389d 100644
--- a/source4/dsdb/samdb/ldb_modules/objectguid.c
+++ b/source4/dsdb/samdb/ldb_modules/objectguid.c
@@ -247,14 +247,8 @@ static int objectguid_modify(struct ldb_module *module, struct ldb_request *req)
return ret;
}
-static const struct ldb_module_ops objectguid_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_objectguid_module_ops = {
.name = "objectguid",
.add = objectguid_add,
.modify = objectguid_modify,
};
-
-
-int objectguid_module_init(void)
-{
- return ldb_register_module(&objectguid_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 61b64441a7..78b5a09f78 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -87,7 +87,7 @@ static struct ldb_module *make_module_for_next_request(TALLOC_CTX *mem_ctx,
struct ldb_module *module)
{
struct ldb_module *current;
- static const struct ldb_module_ops ops; /* zero */
+_PUBLIC_ static const struct ldb_module_ops ops; /* zero */
current = talloc_zero(mem_ctx, struct ldb_module);
if (current == NULL) {
return module;
@@ -1030,7 +1030,7 @@ static int partition_wait(struct ldb_handle *handle, enum ldb_wait_type type)
}
}
-static const struct ldb_module_ops partition_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_partition_module_ops = {
.name = "partition",
.init_context = partition_init,
.search = partition_search,
@@ -1045,8 +1045,3 @@ static const struct ldb_module_ops partition_ops = {
.del_transaction = partition_del_trans,
.wait = partition_wait
};
-
-int ldb_partition_init(void)
-{
- return ldb_register_module(&partition_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 57c053d961..aa64700f2f 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -2044,15 +2044,9 @@ static int password_hash_wait(struct ldb_handle *handle, enum ldb_wait_type type
}
}
-static const struct ldb_module_ops password_hash_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_password_hash_module_ops = {
.name = "password_hash",
.add = password_hash_add,
.modify = password_hash_modify,
.wait = password_hash_wait
};
-
-
-int password_hash_module_init(void)
-{
- return ldb_register_module(&password_hash_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
index 0f3293ed1d..09d56d77c9 100644
--- a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
@@ -115,12 +115,7 @@ static int pdc_fsmo_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops pdc_fsmo_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_pdc_fsmo_module_ops = {
.name = "pdc_fsmo",
.init_context = pdc_fsmo_init
};
-
-int pdc_fsmo_module_init(void)
-{
- return ldb_register_module(&pdc_fsmo_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c b/source4/dsdb/samdb/ldb_modules/proxy.c
index 37ee7f9fce..0d065425ca 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -331,12 +331,7 @@ static int proxy_request(struct ldb_module *module, struct ldb_request *req)
}
}
-static const struct ldb_module_ops proxy_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_proxy_module_ops = {
.name = "proxy",
.request = proxy_request
};
-
-int proxy_module_init(void)
-{
- return ldb_register_module(&proxy_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/ranged_results.c b/source4/dsdb/samdb/ldb_modules/ranged_results.c
index c527afc6db..c6ebea1044 100644
--- a/source4/dsdb/samdb/ldb_modules/ranged_results.c
+++ b/source4/dsdb/samdb/ldb_modules/ranged_results.c
@@ -201,12 +201,7 @@ static int rr_search(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, req);
}
-static const struct ldb_module_ops rr_ops = {
+const struct ldb_module_ops ldb_ranged_results_module_ops = {
.name = "ranged_results",
.search = rr_search,
};
-
-int ldb_ranged_results_init(void)
-{
- return ldb_register_module(&rr_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 441dbc9598..dd5faf837a 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1579,15 +1579,10 @@ static int replmd_wait(struct ldb_handle *handle, enum ldb_wait_type type)
}
}
-static const struct ldb_module_ops replmd_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_repl_meta_data_module_ops = {
.name = "repl_meta_data",
.add = replmd_add,
.modify = replmd_modify,
.extended = replmd_extended,
.wait = replmd_wait
};
-
-int repl_meta_data_module_init(void)
-{
- return ldb_register_module(&replmd_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 02f43d7076..3235b24ef9 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -386,15 +386,9 @@ static int rootdse_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops rootdse_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_rootdse_module_ops = {
.name = "rootdse",
.init_context = rootdse_init,
.search = rootdse_search,
.request = rootdse_request
};
-
-int rootdse_module_init(void)
-{
- return ldb_register_module(&rootdse_ops);
-}
-
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sam.c b/source4/dsdb/samdb/ldb_modules/samba3sam.c
index 3a666b5380..88b04b1bb6 100644
--- a/source4/dsdb/samdb/ldb_modules/samba3sam.c
+++ b/source4/dsdb/samdb/ldb_modules/samba3sam.c
@@ -925,21 +925,8 @@ static int samba3sam_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static struct ldb_module_ops samba3sam_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_samba3sam_module_ops = {
+ LDB_MAP_OPS
.name = "samba3sam",
.init_context = samba3sam_init,
};
-
-/* the init function */
-int ldb_samba3sam_module_init(void)
-{
- struct ldb_module_ops ops = ldb_map_get_ops();
- samba3sam_ops.add = ops.add;
- samba3sam_ops.modify = ops.modify;
- samba3sam_ops.del = ops.del;
- samba3sam_ops.rename = ops.rename;
- samba3sam_ops.search = ops.search;
- samba3sam_ops.wait = ops.wait;
-
- return ldb_register_module(&samba3sam_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index baf419c750..178149a886 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -750,14 +750,8 @@ static int samldb_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops samldb_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_samldb_module_ops = {
.name = "samldb",
.init_context = samldb_init,
.add = samldb_add,
};
-
-
-int samldb_module_init(void)
-{
- return ldb_register_module(&samldb_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/schema.c b/source4/dsdb/samdb/ldb_modules/schema.c
index 525193ac8c..ff9530ca92 100644
--- a/source4/dsdb/samdb/ldb_modules/schema.c
+++ b/source4/dsdb/samdb/ldb_modules/schema.c
@@ -1221,7 +1221,7 @@ static int schema_init(struct ldb_module *module)
return LDB_SUCCESS;
}
-static const struct ldb_module_ops schema_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_schema_module_ops = {
.name = "schema",
.init_context = schema_init,
.add = schema_add,
@@ -1230,8 +1230,3 @@ static const struct ldb_module_ops schema_ops = {
.rename = schema_rename,
.wait = schema_wait
};
-
-int ldb_schema_init(void)
-{
- return ldb_register_module(&schema_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
index f9dd131fd4..729fd15202 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
@@ -255,12 +255,7 @@ static int schema_fsmo_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops schema_fsmo_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_schema_fsmo_module_ops = {
.name = "schema_fsmo",
.init_context = schema_fsmo_init
};
-
-int schema_fsmo_module_init(void)
-{
- return ldb_register_module(&schema_fsmo_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/show_deleted.c b/source4/dsdb/samdb/ldb_modules/show_deleted.c
index 19fa63fb6e..361cf226dc 100644
--- a/source4/dsdb/samdb/ldb_modules/show_deleted.c
+++ b/source4/dsdb/samdb/ldb_modules/show_deleted.c
@@ -194,13 +194,8 @@ static int show_deleted_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops show_deleted_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_show_deleted_module_ops = {
.name = "show_deleted",
.search = show_deleted_search,
.init_context = show_deleted_init
};
-
-int ldb_show_deleted_init(void)
-{
- return ldb_register_module(&show_deleted_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
index acf2fd622c..3f4c19d285 100644
--- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
+++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
@@ -793,42 +793,16 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
return LDB_SUCCESS;
}
-static struct ldb_module_ops entryuuid_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_entryuuid_module_ops = {
.name = "entryuuid",
.init_context = entryuuid_init,
- .sequence_number = entryuuid_sequence_number
+ .sequence_number = entryuuid_sequence_number,
+ LDB_MAP_OPS
};
-static struct ldb_module_ops nsuniqueid_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_nsuniqueid_module_ops = {
.name = "nsuniqueid",
.init_context = nsuniqueid_init,
- .sequence_number = entryuuid_sequence_number
+ .sequence_number = entryuuid_sequence_number,
+ LDB_MAP_OPS
};
-
-/* the init function */
-int ldb_simple_ldap_map_module_init(void)
-{
- int ret;
- struct ldb_module_ops ops = ldb_map_get_ops();
- entryuuid_ops.add = ops.add;
- entryuuid_ops.modify = ops.modify;
- entryuuid_ops.del = ops.del;
- entryuuid_ops.rename = ops.rename;
- entryuuid_ops.search = ops.search;
- entryuuid_ops.wait = ops.wait;
- ret = ldb_register_module(&entryuuid_ops);
-
- if (ret) {
- return ret;
- }
-
- nsuniqueid_ops.add = ops.add;
- nsuniqueid_ops.modify = ops.modify;
- nsuniqueid_ops.del = ops.del;
- nsuniqueid_ops.rename = ops.rename;
- nsuniqueid_ops.search = ops.search;
- nsuniqueid_ops.wait = ops.wait;
- ret = ldb_register_module(&nsuniqueid_ops);
-
- return ret;
-}
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_delete.c b/source4/dsdb/samdb/ldb_modules/subtree_delete.c
index e84bf60b32..56ae7b239a 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_delete.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_delete.c
@@ -247,13 +247,8 @@ static int subtree_delete_wait(struct ldb_handle *handle, enum ldb_wait_type typ
}
}
-static const struct ldb_module_ops subtree_delete_ops = {
+const struct ldb_module_ops ldb_subtree_delete_module_ops = {
.name = "subtree_delete",
.del = subtree_delete,
.wait = subtree_delete_wait,
};
-
-int ldb_subtree_delete_init(void)
-{
- return ldb_register_module(&subtree_delete_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index 0964c3fdcd..bf8124e253 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -264,13 +264,8 @@ static int subtree_rename_wait(struct ldb_handle *handle, enum ldb_wait_type typ
}
}
-static const struct ldb_module_ops subtree_rename_ops = {
+const struct ldb_module_ops ldb_subtree_rename_module_ops = {
.name = "subtree_rename",
.rename = subtree_rename,
.wait = subtree_rename_wait,
};
-
-int ldb_subtree_rename_init(void)
-{
- return ldb_register_module(&subtree_rename_ops);
-}
diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c b/source4/dsdb/samdb/ldb_modules/update_keytab.c
index a18efd757a..54362dcfd4 100644
--- a/source4/dsdb/samdb/ldb_modules/update_keytab.c
+++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c
@@ -199,7 +199,7 @@ static int update_kt_init(struct ldb_module *module)
return ldb_next_init(module);
}
-static const struct ldb_module_ops update_kt_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_update_keytab_module_ops = {
.name = "update_keytab",
.init_context = update_kt_init,
.add = update_kt_add,
@@ -209,8 +209,3 @@ static const struct ldb_module_ops update_kt_ops = {
.end_transaction = update_kt_end_trans,
.del_transaction = update_kt_del_trans,
};
-
-int ldb_update_kt_init(void)
-{
- return ldb_register_module(&update_kt_ops);
-}
diff --git a/source4/dsdb/schema/schema.h b/source4/dsdb/schema/schema.h
index 1379ddee9f..bb34235465 100644
--- a/source4/dsdb/schema/schema.h
+++ b/source4/dsdb/schema/schema.h
@@ -149,6 +149,8 @@ struct dsdb_schema {
struct dsdb_attribute *attributes;
struct dsdb_class *classes;
+
+ struct smb_iconv_convenience *iconv_convenience;
};
#include "dsdb/schema/proto.h"
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 6a7463951e..30d0adeda7 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -88,8 +88,7 @@ WERROR dsdb_load_oid_mappings_ldb(struct dsdb_schema *schema,
TALLOC_CTX *mem_ctx = talloc_new(schema);
W_ERROR_HAVE_NO_MEMORY(mem_ctx);
- ndr_err = ndr_pull_struct_blob(prefixMap, mem_ctx, lp_iconv_convenience(global_loadparm), &pfm,
- (ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
+ ndr_err = ndr_pull_struct_blob(prefixMap, mem_ctx, schema->iconv_convenience, &pfm, (ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
talloc_free(mem_ctx);
@@ -181,8 +180,7 @@ WERROR dsdb_get_oid_mappings_ldb(const struct dsdb_schema *schema,
pfm.reserved = 0;
pfm.ctr.dsdb = *ctr;
- ndr_err = ndr_push_struct_blob(prefixMap, mem_ctx, lp_iconv_convenience(global_loadparm), &pfm,
- (ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
+ ndr_err = ndr_push_struct_blob(prefixMap, mem_ctx, schema->iconv_convenience, &pfm, (ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
talloc_free(ctr);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -628,7 +626,7 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
} \
if (_a && _a->value_ctr.num_values >= 1) { \
ssize_t _ret; \
- _ret = convert_string_talloc(mem_ctx, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UNIX, \
+ _ret = convert_string_talloc(mem_ctx, s->iconv_convenience, CH_UTF16, CH_UNIX, \
_a->value_ctr.values[0].blob->data, \
_a->value_ctr.values[0].blob->length, \
(void **)discard_const(&(p)->elem)); \
@@ -665,7 +663,7 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
struct drsuapi_DsReplicaObjectIdentifier3 _id3; \
enum ndr_err_code _ndr_err; \
_ndr_err = ndr_pull_struct_blob_all(_a->value_ctr.values[0].blob, \
- mem_ctx, lp_iconv_convenience(global_loadparm), &_id3,\
+ mem_ctx, s->iconv_convenience, &_id3,\
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);\
if (!NDR_ERR_CODE_IS_SUCCESS(_ndr_err)) { \
NTSTATUS _nt_status = ndr_map_error2ntstatus(_ndr_err); \
@@ -727,7 +725,7 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
&& _a->value_ctr.values[0].blob->length == 16) { \
enum ndr_err_code _ndr_err; \
_ndr_err = ndr_pull_struct_blob_all(_a->value_ctr.values[0].blob, \
- mem_ctx, lp_iconv_convenience(global_loadparm), &(p)->elem, \
+ mem_ctx, s->iconv_convenience, &(p)->elem, \
(ndr_pull_flags_fn_t)ndr_pull_GUID); \
if (!NDR_ERR_CODE_IS_SUCCESS(_ndr_err)) { \
NTSTATUS _nt_status = ndr_map_error2ntstatus(_ndr_err); \
@@ -1157,6 +1155,8 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf
goto nomem;
}
+ schema->iconv_convenience = lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm"));
+
/*
* load the prefixMap attribute from pf
*/
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index 2c133b6424..beacfc49c2 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -767,7 +767,8 @@ static WERROR dsdb_syntax_UNICODE_drsuapi_to_ldb(const struct dsdb_schema *schem
return WERR_FOOBAR;
}
- ret = convert_string_talloc(out->values, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UNIX,
+ ret = convert_string_talloc(out->values, schema->iconv_convenience,
+ CH_UTF16, CH_UNIX,
in->value_ctr.values[i].blob->data,
in->value_ctr.values[i].blob->length,
(void **)&str);
@@ -809,7 +810,7 @@ static WERROR dsdb_syntax_UNICODE_ldb_to_drsuapi(const struct dsdb_schema *schem
out->value_ctr.values[i].blob = &blobs[i];
- ret = convert_string_talloc(blobs, lp_iconv_convenience(global_loadparm), CH_UNIX, CH_UTF16,
+ ret = convert_string_talloc(blobs, schema->iconv_convenience, CH_UNIX, CH_UTF16,
in->values[i].data,
in->values[i].length,
(void **)&blobs[i].data);
@@ -851,7 +852,7 @@ static WERROR dsdb_syntax_DN_drsuapi_to_ldb(const struct dsdb_schema *schema,
}
ndr_err = ndr_pull_struct_blob_all(in->value_ctr.values[i].blob,
- out->values, lp_iconv_convenience(global_loadparm), &id3,
+ out->values, schema->iconv_convenience, &id3,
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
@@ -898,7 +899,7 @@ static WERROR dsdb_syntax_DN_ldb_to_drsuapi(const struct dsdb_schema *schema,
ZERO_STRUCT(id3);
id3.dn = (const char *)in->values[i].data;
- ndr_err = ndr_push_struct_blob(&blobs[i], blobs, lp_iconv_convenience(global_loadparm), &id3, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&blobs[i], blobs, schema->iconv_convenience, &id3, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
return ntstatus_to_werror(status);
@@ -939,7 +940,7 @@ static WERROR dsdb_syntax_DN_BINARY_drsuapi_to_ldb(const struct dsdb_schema *sch
}
ndr_err = ndr_pull_struct_blob_all(in->value_ctr.values[i].blob,
- out->values, lp_iconv_convenience(global_loadparm), &id3b,
+ out->values, schema->iconv_convenience, &id3b,
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
@@ -997,7 +998,7 @@ static WERROR dsdb_syntax_DN_BINARY_ldb_to_drsuapi(const struct dsdb_schema *sch
id3b.dn = (const char *)in->values[i].data;
id3b.binary = data_blob(NULL, 0);
- ndr_err = ndr_push_struct_blob(&blobs[i], blobs, lp_iconv_convenience(global_loadparm), &id3b,
+ ndr_err = ndr_push_struct_blob(&blobs[i], blobs, schema->iconv_convenience, &id3b,
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
@@ -1043,7 +1044,7 @@ static WERROR dsdb_syntax_PRESENTATION_ADDRESS_drsuapi_to_ldb(const struct dsdb_
return WERR_FOOBAR;
}
- ret = convert_string_talloc(out->values, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UNIX,
+ ret = convert_string_talloc(out->values, schema->iconv_convenience, CH_UTF16, CH_UNIX,
in->value_ctr.values[i].blob->data+4,
in->value_ctr.values[i].blob->length-4,
(void **)&str);
@@ -1086,7 +1087,7 @@ static WERROR dsdb_syntax_PRESENTATION_ADDRESS_ldb_to_drsuapi(const struct dsdb_
out->value_ctr.values[i].blob = &blobs[i];
- ret = convert_string_talloc(blobs, lp_iconv_convenience(global_loadparm), CH_UNIX, CH_UTF16,
+ ret = convert_string_talloc(blobs, schema->iconv_convenience, CH_UNIX, CH_UTF16,
in->values[i].data,
in->values[i].length,
(void **)&data);