summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c14
-rw-r--r--source4/dsdb/kcc/kcc_topology.c2
-rw-r--r--source4/dsdb/repl/drepl_ridalloc.c2
-rw-r--r--source4/dsdb/samdb/cracknames.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/pdc_fsmo.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c6
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c3
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_load.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/util.c2
-rw-r--r--source4/dsdb/schema/schema_info_attr.c4
-rw-r--r--source4/dsdb/schema/schema_init.c4
11 files changed, 24 insertions, 21 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index c6870da234..fd98fd8e54 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1061,7 +1061,7 @@ struct ldb_dn *samdb_partitions_dn(struct ldb_context *sam_ctx, TALLOC_CTX *mem_
{
struct ldb_dn *new_dn;
- new_dn = ldb_dn_copy(mem_ctx, samdb_config_dn(sam_ctx));
+ new_dn = ldb_dn_copy(mem_ctx, ldb_get_config_basedn(sam_ctx));
if ( ! ldb_dn_add_child_fmt(new_dn, "CN=Partitions")) {
talloc_free(new_dn);
return NULL;
@@ -1073,7 +1073,7 @@ struct ldb_dn *samdb_infrastructure_dn(struct ldb_context *sam_ctx, TALLOC_CTX *
{
struct ldb_dn *new_dn;
- new_dn = ldb_dn_copy(mem_ctx, samdb_base_dn(sam_ctx));
+ new_dn = ldb_dn_copy(mem_ctx, ldb_get_default_basedn(sam_ctx));
if ( ! ldb_dn_add_child_fmt(new_dn, "CN=Infrastructure")) {
talloc_free(new_dn);
return NULL;
@@ -1085,7 +1085,7 @@ struct ldb_dn *samdb_sites_dn(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx)
{
struct ldb_dn *new_dn;
- new_dn = ldb_dn_copy(mem_ctx, samdb_config_dn(sam_ctx));
+ new_dn = ldb_dn_copy(mem_ctx, ldb_get_config_basedn(sam_ctx));
if ( ! ldb_dn_add_child_fmt(new_dn, "CN=Sites")) {
talloc_free(new_dn);
return NULL;
@@ -1541,7 +1541,8 @@ int samdb_server_reference_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, stru
*/
int samdb_rid_manager_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_dn **dn)
{
- return samdb_reference_dn(ldb, mem_ctx, samdb_base_dn(ldb), "rIDManagerReference", dn);
+ return samdb_reference_dn(ldb, mem_ctx, ldb_get_default_basedn(ldb),
+ "rIDManagerReference", dn);
}
/*
@@ -2117,7 +2118,8 @@ NTSTATUS samdb_create_foreign_security_principal(struct ldb_context *sam_ctx, TA
return NT_STATUS_NO_MEMORY;
}
- ret = dsdb_wellknown_dn(sam_ctx, sidstr, samdb_base_dn(sam_ctx),
+ ret = dsdb_wellknown_dn(sam_ctx, sidstr,
+ ldb_get_default_basedn(sam_ctx),
DS_GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER,
&basedn);
if (ret != LDB_SUCCESS) {
@@ -3014,7 +3016,7 @@ int dsdb_get_deleted_objects_dn(struct ldb_context *ldb,
int dsdb_tombstone_lifetime(struct ldb_context *ldb, uint32_t *lifetime)
{
struct ldb_dn *dn;
- dn = samdb_config_dn(ldb);
+ dn = ldb_get_config_basedn(ldb);
if (!dn) {
return LDB_ERR_NO_SUCH_OBJECT;
}
diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c
index 0b251b781b..72eb5e1137 100644
--- a/source4/dsdb/kcc/kcc_topology.c
+++ b/source4/dsdb/kcc/kcc_topology.c
@@ -1113,7 +1113,7 @@ static NTSTATUS kcctpl_get_all_bridgehead_dcs(struct ldb_context *ldb,
}
site = res->msgs[0];
- schemas_dn = samdb_schema_dn(ldb);
+ schemas_dn = ldb_get_schema_basedn(ldb);
if (!schemas_dn) {
DEBUG(1, (__location__ ": failed to find our own Schemas DN\n"));
diff --git a/source4/dsdb/repl/drepl_ridalloc.c b/source4/dsdb/repl/drepl_ridalloc.c
index 43fc5a2c51..2baf555d3c 100644
--- a/source4/dsdb/repl/drepl_ridalloc.c
+++ b/source4/dsdb/repl/drepl_ridalloc.c
@@ -50,7 +50,7 @@ static WERROR drepl_create_rid_manager_source_dsa(struct dreplsrv_service *servi
return WERR_NOMEM;
}
- sdsa->partition->dn = samdb_base_dn(ldb);
+ sdsa->partition->dn = ldb_get_default_basedn(ldb);
sdsa->partition->nc.dn = ldb_dn_alloc_linearized(sdsa->partition, rid_manager_dn);
ret = dsdb_find_guid_by_dn(ldb, rid_manager_dn, &sdsa->partition->nc.guid);
if (ret != LDB_SUCCESS) {
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index bce00bdb9d..5a807f8431 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -99,7 +99,7 @@ static enum drsuapi_DsNameStatus LDB_lookup_spn_alias(krb5_context context, stru
}
service_dn = ldb_dn_new(tmp_ctx, ldb_ctx, "CN=Directory Service,CN=Windows NT,CN=Services");
- if ( ! ldb_dn_add_base(service_dn, samdb_config_dn(ldb_ctx))) {
+ if ( ! ldb_dn_add_base(service_dn, ldb_get_config_basedn(ldb_ctx))) {
return DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR;
}
service_dn_str = ldb_dn_alloc_linearized(tmp_ctx, service_dn);
@@ -817,7 +817,7 @@ static WERROR DsCrackNameOneFilter(struct ldb_context *sam_ctx, TALLOC_CTX *mem_
search_dn = samdb_result_dn(sam_ctx, mem_ctx, domain_res->msgs[0], "ncName", NULL);
} else {
dsdb_flags = DSDB_SEARCH_SEARCH_ALL_PARTITIONS;
- search_dn = samdb_root_dn(sam_ctx);
+ search_dn = ldb_get_root_basedn(sam_ctx);
}
/* search with the 'phantom root' flag */
diff --git a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
index 00d9a30fd3..0c5afd8e9c 100644
--- a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
@@ -50,7 +50,7 @@ static int pdc_fsmo_init(struct ldb_module *module)
return LDB_ERR_OPERATIONS_ERROR;
}
- pdc_dn = samdb_base_dn(ldb);
+ pdc_dn = ldb_get_default_basedn(ldb);
if (!pdc_dn) {
ldb_debug(ldb, LDB_DEBUG_WARNING,
"pdc_fsmo_init: no domain dn present: (skip loading of domain details)\n");
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index e99fcaa516..d18e41c294 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -288,7 +288,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
const char *dn_str;
if (schema && schema->fsmo.we_are_master) {
- dn_str = ldb_dn_get_linearized(samdb_schema_dn(ldb));
+ dn_str = ldb_dn_get_linearized(ldb_get_schema_basedn(ldb));
if (dn_str && dn_str[0]) {
if (ldb_msg_add_fmt(msg, "validFSMOs", "%s", dn_str) != 0) {
goto failed;
@@ -310,7 +310,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
pdc_fsmo = talloc_get_type(ldb_get_opaque(ldb, "dsdb_pdc_fsmo"),
struct dsdb_pdc_fsmo);
if (pdc_fsmo && pdc_fsmo->we_are_master) {
- dn_str = ldb_dn_get_linearized(samdb_base_dn(ldb));
+ dn_str = ldb_dn_get_linearized(ldb_get_default_basedn(ldb));
if (dn_str && dn_str[0]) {
if (ldb_msg_add_fmt(msg, "validFSMOs", "%s", dn_str) != 0) {
goto failed;
@@ -937,7 +937,7 @@ static int rootdse_schemaupdatenow(struct ldb_module *module, struct ldb_request
int ret;
struct ldb_dn *schema_dn;
- schema_dn = samdb_schema_dn(ldb);
+ schema_dn = ldb_get_schema_basedn(ldb);
if (!schema_dn) {
ldb_reset_err_string(ldb);
ldb_debug(ldb, LDB_DEBUG_WARNING,
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 3b2d283006..c3a95f1618 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -257,7 +257,8 @@ static int samldb_check_samAccountName(struct samldb_ctx *ac)
}
ret = ldb_build_search_req(&req, ldb, ac,
- samdb_base_dn(ldb), LDB_SCOPE_SUBTREE,
+ ldb_get_default_basedn(ldb),
+ LDB_SCOPE_SUBTREE,
filter, NULL,
NULL,
ac, samldb_check_samAccountName_callback,
diff --git a/source4/dsdb/samdb/ldb_modules/schema_load.c b/source4/dsdb/samdb/ldb_modules/schema_load.c
index 50f6888564..b4a68769e6 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_load.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_load.c
@@ -281,7 +281,7 @@ static int schema_load_init(struct ldb_module *module)
return LDB_SUCCESS;
}
- schema_dn = samdb_schema_dn(ldb);
+ schema_dn = ldb_get_schema_basedn(ldb);
if (!schema_dn) {
ldb_reset_err_string(ldb);
ldb_debug(ldb, LDB_DEBUG_WARNING,
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c
index e95777462b..fe0ff7510b 100644
--- a/source4/dsdb/samdb/ldb_modules/util.c
+++ b/source4/dsdb/samdb/ldb_modules/util.c
@@ -528,7 +528,7 @@ int dsdb_module_reference_dn(struct ldb_module *module, TALLOC_CTX *mem_ctx, str
int dsdb_module_rid_manager_dn(struct ldb_module *module, TALLOC_CTX *mem_ctx, struct ldb_dn **dn)
{
return dsdb_module_reference_dn(module, mem_ctx,
- samdb_base_dn(ldb_module_get_ctx(module)),
+ ldb_get_default_basedn(ldb_module_get_ctx(module)),
"rIDManagerReference", dn);
}
diff --git a/source4/dsdb/schema/schema_info_attr.c b/source4/dsdb/schema/schema_info_attr.c
index eee1c79b91..165184739c 100644
--- a/source4/dsdb/schema/schema_info_attr.c
+++ b/source4/dsdb/schema/schema_info_attr.c
@@ -137,7 +137,7 @@ WERROR dsdb_module_schema_info_blob_read(struct ldb_module *ldb_module,
NULL
};
- schema_dn = samdb_schema_dn(ldb_module_get_ctx(ldb_module));
+ schema_dn = ldb_get_schema_basedn(ldb_module_get_ctx(ldb_module));
if (!schema_dn) {
DEBUG(0,("dsdb_module_schema_info_blob_read: no schema dn present!\n"));
return WERR_INTERNAL_DB_CORRUPTION;
@@ -184,7 +184,7 @@ static WERROR _dsdb_schema_info_write_prepare(struct ldb_context *ldb,
struct ldb_dn *schema_dn;
struct ldb_message_element *return_el;
- schema_dn = samdb_schema_dn(ldb);
+ schema_dn = ldb_get_schema_basedn(ldb);
if (!schema_dn) {
DEBUG(0,("_dsdb_schema_info_write_prepare: no schema dn present\n"));
return WERR_INTERNAL_DB_CORRUPTION;
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index eb3400cedc..3405e155d3 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -266,7 +266,7 @@ WERROR dsdb_write_prefixes_from_schema_to_ldb(TALLOC_CTX *mem_ctx, struct ldb_co
TALLOC_CTX *temp_ctx;
struct drsuapi_DsReplicaOIDMapping_Ctr *ctr;
- schema_dn = samdb_schema_dn(ldb);
+ schema_dn = ldb_get_schema_basedn(ldb);
if (!schema_dn) {
DEBUG(0,("dsdb_write_prefixes_from_schema_to_ldb: no schema dn present\n"));
return WERR_FOOBAR;
@@ -334,7 +334,7 @@ WERROR dsdb_read_prefixes_from_ldb(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
NULL
};
- schema_dn = samdb_schema_dn(ldb);
+ schema_dn = ldb_get_schema_basedn(ldb);
if (!schema_dn) {
DEBUG(0,("dsdb_read_prefixes_from_ldb: no schema dn present\n"));
return WERR_FOOBAR;