summaryrefslogtreecommitdiff
path: root/source4/rpc_server/lsa/dcesrv_lsa.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-14 23:47:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:07 -0500
commit7c3af0d06a254c6b0e4d8f57ebc26e2923fd8beb (patch)
tree4595eab9262b78472fe36adddcc09f19f43118b0 /source4/rpc_server/lsa/dcesrv_lsa.c
parentb3076a39b9d92ed3600eceb82f129e8c0f36a6bd (diff)
downloadsamba-7c3af0d06a254c6b0e4d8f57ebc26e2923fd8beb.tar.gz
samba-7c3af0d06a254c6b0e4d8f57ebc26e2923fd8beb.tar.bz2
samba-7c3af0d06a254c6b0e4d8f57ebc26e2923fd8beb.zip
r16236: Add a proper baseDN to a large number of queries. Searching the NULL
baseDN won't work once the partitions module is loaded. Andrew Bartlett (This used to be commit c4ab9e8a754ca4a23a47f38a2344df305b4a351d)
Diffstat (limited to 'source4/rpc_server/lsa/dcesrv_lsa.c')
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 982de469f6..17f9754c3b 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -221,6 +221,7 @@ static NTSTATUS lsa_get_policy_state(struct dcesrv_call_state *dce_call, TALLOC_
struct lsa_policy_state **_state)
{
struct lsa_policy_state *state;
+ const struct ldb_dn *partitions_basedn = ldb_dn_string_compose(mem_ctx, samdb_base_dn(mem_ctx), "CN=Partitions,CN=Configuration");
state = talloc(mem_ctx, struct lsa_policy_state);
if (!state) {
@@ -246,7 +247,7 @@ static NTSTATUS lsa_get_policy_state(struct dcesrv_call_state *dce_call, TALLOC_
}
state->domain_name
- = samdb_search_string(state->sam_ldb, state, NULL, "nETBIOSName",
+ = samdb_search_string(state->sam_ldb, state, partitions_basedn, "nETBIOSName",
"(&(objectclass=crossRef)(ncName=%s))", ldb_dn_linearize(mem_ctx, state->domain_dn));
if (!state->domain_name) {