summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/config.mk182
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c3
-rw-r--r--source4/dsdb/samdb/ldb_modules/update_keytab.c4
4 files changed, 102 insertions, 95 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/config.mk b/source4/dsdb/samdb/ldb_modules/config.mk
index de93b5638d..eae190a85f 100644
--- a/source4/dsdb/samdb/ldb_modules/config.mk
+++ b/source4/dsdb/samdb/ldb_modules/config.mk
@@ -4,12 +4,12 @@
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
-INIT_FUNCTION = objectguid_module_module_ops
-OBJ_FILES = \
- objectguid.o
+INIT_FUNCTION = LDB_MODULE(objectguid)
# End MODULE ldb_objectguid
################################################
+ldb_objectguid_OBJ_FILES = dsdb/samdb/ldb_modules/objectguid.o
+
################################################
# Start MODULE ldb_repl_meta_data
[MODULE::ldb_repl_meta_data]
@@ -17,107 +17,113 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC LIBNDR NDR_MISC NDR_DRSUAPI \
NDR_DRSBLOBS LIBNDR
-INIT_FUNCTION = repl_meta_data_module_module_ops
-OBJ_FILES = \
- repl_meta_data.o
+INIT_FUNCTION = LDB_MODULE(repl_meta_data)
# End MODULE ldb_repl_meta_data
################################################
+ldb_repl_meta_data_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/repl_meta_data.o
+
################################################
# Start MODULE ldb_dsdb_cache
[MODULE::ldb_dsdb_cache]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = dsdb_cache_module_module_ops
-OBJ_FILES = \
- dsdb_cache.o
+INIT_FUNCTION = LDB_MODULE(dsdb_cache)
# End MODULE ldb_dsdb_cache
################################################
+ldb_dsdb_cache_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/dsdb_cache.o
+
################################################
# Start MODULE ldb_schema_fsmo
[MODULE::ldb_schema_fsmo]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = schema_fsmo_module_module_ops
-OBJ_FILES = \
- schema_fsmo.o
+INIT_FUNCTION = LDB_MODULE(schema_fsmo)
# End MODULE ldb_schema_fsmo
################################################
+ldb_schema_fsmo_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/schema_fsmo.o
+
################################################
# Start MODULE ldb_naming_fsmo
[MODULE::ldb_naming_fsmo]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = naming_fsmo_module_module_ops
-OBJ_FILES = \
- naming_fsmo.o
+INIT_FUNCTION = LDB_MODULE(naming_fsmo)
# End MODULE ldb_naming_fsmo
################################################
+ldb_naming_fsmo_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/naming_fsmo.o
+
################################################
# Start MODULE ldb_pdc_fsmo
[MODULE::ldb_pdc_fsmo]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = pdc_fsmo_module_module_ops
-OBJ_FILES = \
- pdc_fsmo.o
+INIT_FUNCTION = LDB_MODULE(pdc_fsmo)
# End MODULE ldb_pdc_fsmo
################################################
+ldb_pdc_fsmo_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/pdc_fsmo.o
+
################################################
# Start MODULE ldb_samldb
[MODULE::ldb_samldb]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LDAP_ENCODE NDR_MISC SAMDB
-INIT_FUNCTION = samldb_module_module_ops
-OBJ_FILES = \
- samldb.o
+INIT_FUNCTION = LDB_MODULE(samldb)
#
# End MODULE ldb_samldb
################################################
+ldb_samldb_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/samldb.o
+
################################################
# Start MODULE ldb_samba3sam
[MODULE::ldb_samba3sam]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = &ldb_samba3sam_module_module_ops
-PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER LIBSECURITY \
+INIT_FUNCTION = LDB_MODULE(samba3sam)
+PRIVATE_DEPENDENCIES = LIBTALLOC SMBPASSWD NSS_WRAPPER LIBSECURITY \
NDR_SECURITY
-OBJ_FILES = \
- samba3sam.o
-#
# End MODULE ldb_samldb
################################################
+ldb_samba3sam_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/samba3sam.o
+
################################################
# Start MODULE ldb_simple_ldap_map
[MODULE::ldb_simple_ldap_map]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = &ldb_simple_ldap_map_module_module_ops
-PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map LIBNDR NDR_MISC
+INIT_FUNCTION = LDB_MODULE(simple_ldap_map)
+PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
ENABLE = YES
ALIASES = entryuuid nsuniqueid
-OBJ_FILES = \
- simple_ldap_map.o
-#
# End MODULE ldb_entryuuid
################################################
+ldb_simple_ldap_map_OBJ_FILES = \
+ dsdb/samdb/ldb_modules/simple_ldap_map.o
+
# ################################################
# # Start MODULE ldb_proxy
# [MODULE::ldb_proxy]
# SUBSYSTEM = LIBLDB
-# INIT_FUNCTION = proxy_module_module_ops
+# INIT_FUNCTION = LDB_MODULE(proxy)
# OBJ_FILES = \
# proxy.o
#
@@ -131,103 +137,98 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = rootdse_module_module_ops
-OBJ_FILES = \
- rootdse.o
-#
+INIT_FUNCTION = LDB_MODULE(rootdse)
# End MODULE ldb_rootdse
################################################
+ldb_rootdse_OBJ_FILES = dsdb/samdb/ldb_modules/rootdse.o
+
################################################
# Start MODULE ldb_password_hash
[MODULE::ldb_password_hash]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = password_hash_module_module_ops
-OBJ_FILES = password_hash.o
+INIT_FUNCTION = LDB_MODULE(password_hash)
PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
LIBCLI_AUTH NDR_DRSBLOBS KERBEROS SAMDB
-#
# End MODULE ldb_password_hash
################################################
+ldb_password_hash_OBJ_FILES = dsdb/samdb/ldb_modules/password_hash.o
+
################################################
# Start MODULE ldb_local_password
[MODULE::ldb_local_password]
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = local_password_module_module_ops
-OBJ_FILES = local_password.o
-#
+INIT_FUNCTION = LDB_MODULE(local_password)
# End MODULE ldb_local_password
################################################
+ldb_local_password_OBJ_FILES = dsdb/samdb/ldb_modules/local_password.o
+
################################################
# Start MODULE ldb_kludge_acl
[MODULE::ldb_kludge_acl]
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = &ldb_kludge_acl_module_ops
-OBJ_FILES = \
- kludge_acl.o
-#
+INIT_FUNCTION = LDB_MODULE(kludge_acl)
+
# End MODULE ldb_kludge_acl
################################################
+ldb_kludge_acl_OBJ_FILES = dsdb/samdb/ldb_modules/kludge_acl.o
+
################################################
# Start MODULE ldb_extended_dn
[MODULE::ldb_extended_dn]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR LIBSECURITY SAMDB
-INIT_FUNCTION = &ldb_extended_dn_module_ops
-OBJ_FILES = \
- extended_dn.o
-#
+INIT_FUNCTION = LDB_MODULE(extended_dn)
# End MODULE ldb_extended_dn
################################################
+ldb_extended_dn_OBJ_FILES = dsdb/samdb/ldb_modules/extended_dn.o
+
################################################
# Start MODULE ldb_show_deleted
[MODULE::ldb_show_deleted]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_show_deleted_module_ops
-OBJ_FILES = \
- show_deleted.o
-#
+INIT_FUNCTION = LDB_MODULE(show_deleted)
# End MODULE ldb_show_deleted
################################################
+ldb_show_deleted_OBJ_FILES = dsdb/samdb/ldb_modules/show_deleted.o
+
################################################
# Start MODULE ldb_partition
[MODULE::ldb_partition]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
-INIT_FUNCTION = &ldb_partition_module_ops
-OBJ_FILES = \
- partition.o
-#
+INIT_FUNCTION = LDB_MODULE(partition)
# End MODULE ldb_partition
################################################
+ldb_partition_OBJ_FILES = dsdb/samdb/ldb_modules/partition.o
+
################################################
# Start MODULE ldb_schema
[MODULE::ldb_schema]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBLDB
-INIT_FUNCTION = &ldb_schema_module_ops
-OBJ_FILES = \
- schema.o schema_syntax.o
-#
+INIT_FUNCTION = LDB_MODULE(schema)
# End MODULE ldb_schema
################################################
+ldb_schema_OBJ_FILES = $(addprefix dsdb/samdb/ldb_modules/, schema.o schema_syntax.o)
+
################################################
# Start MODULE ldb_update_kt
[MODULE::ldb_update_keytab]
@@ -235,111 +236,110 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC CREDENTIALS
#Also depends on credentials, but that would loop
-INIT_FUNCTION = &ldb_update_kt_module_ops
-OBJ_FILES = \
- update_keytab.o
-#
+INIT_FUNCTION = LDB_MODULE(update_kt)
# End MODULE ldb_update_kt
################################################
+ldb_update_keytab_OBJ_FILES = dsdb/samdb/ldb_modules/update_keytab.o
+
################################################
# Start MODULE ldb_objectclass
[MODULE::ldb_objectclass]
-INIT_FUNCTION = &ldb_objectclass_module_ops
+INIT_FUNCTION = LDB_MODULE(objectclass)
OUTPUT_TYPE = SHARED_LIBRARY
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY NDR_SECURITY SAMDB
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- objectclass.o
# End MODULE ldb_objectclass
################################################
+ldb_objectclass_OBJ_FILES = dsdb/samdb/ldb_modules/objectclass.o
+
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_rename]
-INIT_FUNCTION = &ldb_subtree_rename_module_ops
+INIT_FUNCTION = LDB_MODULE(subtree_rename)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- subtree_rename.o
# End MODULE ldb_subtree_rename
################################################
+ldb_subtree_rename_OBJ_FILES = dsdb/samdb/ldb_modules/subtree_rename.o
+
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_delete]
-INIT_FUNCTION = &ldb_subtree_delete_module_ops
+INIT_FUNCTION = LDB_MODULE(subtree_delete)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- subtree_delete.o
# End MODULE ldb_subtree_rename
################################################
+ldb_subtree_delete_OBJ_FILES = dsdb/samdb/ldb_modules/subtree_delete.o
+
################################################
# Start MODULE ldb_linked_attributes
[MODULE::ldb_linked_attributes]
-INIT_FUNCTION = &ldb_linked_attributes_module_ops
+INIT_FUNCTION = LDB_MODULE(linked_attributes)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- linked_attributes.o
# End MODULE ldb_linked_attributes
################################################
+ldb_linked_attributes_OBJ_FILES = dsdb/samdb/ldb_modules/linked_attributes.o
+
################################################
# Start MODULE ldb_ranged_results
[MODULE::ldb_ranged_results]
-INIT_FUNCTION = &ldb_ranged_results_module_ops
+INIT_FUNCTION = LDB_MODULE(ranged_results)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- ranged_results.o
# End MODULE ldb_ranged_results
################################################
+ldb_ranged_results_OBJ_FILES = dsdb/samdb/ldb_modules/ranged_results.o
+
################################################
# Start MODULE ldb_anr
[MODULE::ldb_anr]
-INIT_FUNCTION = &ldb_anr_module_ops
+INIT_FUNCTION = LDB_MODULE(anr)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- anr.o
# End MODULE ldb_anr
################################################
+ldb_anr_OBJ_FILES = dsdb/samdb/ldb_modules/anr.o
+
################################################
# Start MODULE ldb_normalise
[MODULE::ldb_normalise]
-INIT_FUNCTION = &ldb_normalise_module_ops
+INIT_FUNCTION = LDB_MODULE(normalise)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- normalise.o
# End MODULE ldb_normalise
################################################
+ldb_normalise_OBJ_FILES = dsdb/samdb/ldb_modules/normalise.o
+
################################################
# Start MODULE ldb_instancetype
[MODULE::ldb_instancetype]
-INIT_FUNCTION = &ldb_instancetype_module_ops
+INIT_FUNCTION = LDB_MODULE(instancetype)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
-PRIVATE_DEPENDENCIES = LIBTALLOC
+PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
SUBSYSTEM = LIBLDB
-OBJ_FILES = \
- instancetype.o
# End MODULE ldb_instancetype
################################################
+ldb_instancetype_OBJ_FILES = dsdb/samdb/ldb_modules/instancetype.o
+
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 3235b24ef9..50f333d095 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -26,6 +26,7 @@
#include "lib/ldb/include/ldb_private.h"
#include "system/time.h"
#include "dsdb/samdb/samdb.h"
+#include "version.h"
struct private_data {
int num_controls;
@@ -202,6 +203,13 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
}
}
+ if (schema && do_attribute_explicit(attrs, "vendorVersion")) {
+ if (ldb_msg_add_fmt(msg, "vendorVersion",
+ "%s", SAMBA_VERSION_STRING) != 0) {
+ goto failed;
+ }
+ }
+
/* TODO: lots more dynamic attributes should be added here */
return LDB_SUCCESS;
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 3b67ca19d3..88590f306b 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -484,8 +484,7 @@ static int samldb_fill_group_object(struct ldb_module *module, const struct ldb_
return ret;
}
-static int samldb_fill_user_or_computer_object(struct ldb_module *module, const struct ldb_message *msg,
- struct ldb_message **ret_msg)
+static int samldb_fill_user_or_computer_object(struct ldb_module *module, const struct ldb_message *msg, struct ldb_message **ret_msg)
{
int ret;
char *name;
diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c b/source4/dsdb/samdb/ldb_modules/update_keytab.c
index 54362dcfd4..b36c2c9b71 100644
--- a/source4/dsdb/samdb/ldb_modules/update_keytab.c
+++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c
@@ -90,7 +90,7 @@ static int add_modified(struct ldb_module *module, struct ldb_dn *dn, bool delet
}
cli_credentials_set_conf(item->creds, ldb_get_opaque(module->ldb, "loadparm"));
- status = cli_credentials_set_secrets(item->creds, ldb_get_opaque(module->ldb, "loadparm"), module->ldb, NULL, filter);
+ status = cli_credentials_set_secrets(item->creds, ldb_get_opaque(module->ldb, "EventContext"), ldb_get_opaque(module->ldb, "loadparm"), module->ldb, NULL, filter);
talloc_free(filter);
if (NT_STATUS_IS_OK(status)) {
if (delete) {
@@ -158,7 +158,7 @@ static int update_kt_end_trans(struct ldb_module *module)
struct dn_list *p;
for (p=data->changed_dns; p; p = p->next) {
int kret;
- kret = cli_credentials_update_keytab(p->creds, ldb_get_opaque(module->ldb, "loadparm"));
+ kret = cli_credentials_update_keytab(p->creds, ldb_get_opaque(module->ldb, "EventContext"), ldb_get_opaque(module->ldb, "loadparm"));
if (kret != 0) {
talloc_free(data->changed_dns);
data->changed_dns = NULL;