summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 08:41:10 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 08:55:15 +0200
commitad9e4073574125b01b3992081be9b2a4d6852cbf (patch)
tree4bde84e3f1962d64200366a1ddb3d7bcef6e42c8 /source4/dsdb/samdb
parent8e4c34880a11b2b8a7b5fbb228c26301865a4b4d (diff)
downloadsamba-ad9e4073574125b01b3992081be9b2a4d6852cbf.tar.gz
samba-ad9e4073574125b01b3992081be9b2a4d6852cbf.tar.bz2
samba-ad9e4073574125b01b3992081be9b2a4d6852cbf.zip
Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB library.
Diffstat (limited to 'source4/dsdb/samdb')
-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
6 files changed, 10 insertions, 9 deletions
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);
}