summaryrefslogtreecommitdiff
path: root/source4/rpc_server
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/rpc_server
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/rpc_server')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c4
-rw-r--r--source4/rpc_server/lsa/lsa_init.c4
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c7
3 files changed, 8 insertions, 7 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 76b92db377..e70e863c36 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -625,7 +625,7 @@ static WERROR getncchanges_rid_alloc(struct drsuapi_bind_state *b_state,
talloc_free(ext_res);
- base_dn = samdb_base_dn(ldb);
+ base_dn = ldb_get_default_basedn(ldb);
DEBUG(2,("Allocated RID pool for server %s\n",
GUID_string(mem_ctx, &req8->destination_dsa_guid)));
@@ -752,7 +752,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
case DRSUAPI_EXOP_FSMO_RID_ALLOC:
werr = getncchanges_rid_alloc(b_state, mem_ctx, req8, &r->out.ctr->ctr6);
W_ERROR_NOT_OK_RETURN(werr);
- search_dn = samdb_base_dn(b_state->sam_ctx);
+ search_dn = ldb_get_default_basedn(b_state->sam_ctx);
break;
case DRSUAPI_EXOP_FSMO_REQ_ROLE:
diff --git a/source4/rpc_server/lsa/lsa_init.c b/source4/rpc_server/lsa/lsa_init.c
index 1fadee07f0..486faaacf1 100644
--- a/source4/rpc_server/lsa/lsa_init.c
+++ b/source4/rpc_server/lsa/lsa_init.c
@@ -56,14 +56,14 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call, TALLOC_
/* work out the domain_dn - useful for so many calls its worth
fetching here */
- state->domain_dn = samdb_base_dn(state->sam_ldb);
+ state->domain_dn = ldb_get_default_basedn(state->sam_ldb);
if (!state->domain_dn) {
return NT_STATUS_NO_MEMORY;
}
/* work out the forest root_dn - useful for so many calls its worth
fetching here */
- state->forest_dn = samdb_root_dn(state->sam_ldb);
+ state->forest_dn = ldb_get_root_basedn(state->sam_ldb);
if (!state->forest_dn) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index bb9d6b8399..3fa5c69aea 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1124,7 +1124,7 @@ static NTSTATUS fill_one_domain_info(TALLOC_CTX *mem_ctx,
} else {
char *p;
/* TODO: we need a common function for pulling the forest */
- info->dns_forestname.string = ldb_dn_canonical_string(info, samdb_root_dn(sam_ctx));
+ info->dns_forestname.string = ldb_dn_canonical_string(info, ldb_get_root_basedn(sam_ctx));
if (!info->dns_forestname.string) {
return NT_STATUS_NO_SUCH_DOMAIN;
}
@@ -1236,7 +1236,8 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
* Check that the DNS hostname when it should be updated
* will be used only by maximum one host.
*/
- ret = gendb_search(sam_ctx, mem_ctx, samdb_base_dn(sam_ctx),
+ ret = gendb_search(sam_ctx, mem_ctx,
+ ldb_get_default_basedn(sam_ctx),
&res0, attrs3, "(dNSHostName=%s)",
r->in.query->workstation_info->dns_hostname);
if (ret < 0) {
@@ -1349,7 +1350,7 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
primary domain is also a "trusted" domain, so we need to
put the primary domain into the lists of returned trusts as
well. */
- ret = gendb_search_dn(sam_ctx, mem_ctx, samdb_base_dn(sam_ctx),
+ ret = gendb_search_dn(sam_ctx, mem_ctx, ldb_get_default_basedn(sam_ctx),
&res2, attrs);
if (ret != 1) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;