summaryrefslogtreecommitdiff
path: root/source4/rpc_server/netlogon
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-08-31 08:22:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:57 -0500
commite905fed4e03a50f8c17b9ff0726fccc9558ca8c4 (patch)
treed9c71252d8db4657f0d50513c6cee6d7293e6125 /source4/rpc_server/netlogon
parent25f9e52a5d7a7dce7c98a1f27c9b38ada650d343 (diff)
downloadsamba-e905fed4e03a50f8c17b9ff0726fccc9558ca8c4.tar.gz
samba-e905fed4e03a50f8c17b9ff0726fccc9558ca8c4.tar.bz2
samba-e905fed4e03a50f8c17b9ff0726fccc9558ca8c4.zip
r17956: LSA Cleanup!
This commit cleans up a number of aspects of the LSA interface. Firstly, we do 2 simple searches on opening the LSA policy, to obtain the basic information we need. This also avoids us searching for dnsDomain (an invented attribute). While I was at it, I added and tested new LSA calls, including the enumTrustedDomainsEx call. I have also merged the identical structures lsa_DomainInformation and lsa_DomainList. Also in this commit: Fix netlogon use of uninitialised variables. Andrew Bartlett (This used to be commit 3f3fa7f466df56612064029143fbae8effb668aa)
Diffstat (limited to 'source4/rpc_server/netlogon')
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index dd6bdf3f6a..29b57ec2b2 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -889,7 +889,7 @@ static NTSTATUS netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_call, TALL
struct netr_DomainInfo1 *info1;
int ret, ret1, ret2, i;
NTSTATUS status;
- const struct ldb_dn *partitions_basedn = samdb_partitions_dn(sam_ctx, mem_ctx);
+ const struct ldb_dn *partitions_basedn;
const char *local_domain;
@@ -904,6 +904,8 @@ static NTSTATUS netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_call, TALL
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
+ partitions_basedn = samdb_partitions_dn(sam_ctx, mem_ctx);
+
/* we need to do two searches. The first will pull our primary
domain and the second will pull any trusted domains. Our
primary domain is also a "trusted" domain, so we need to
@@ -1143,7 +1145,7 @@ static WERROR netr_DsrEnumerateDomainTrusts(struct dcesrv_call_state *dce_call,
struct ldb_message **dom_res, **ref_res;
const char * const dom_attrs[] = { "dnsDomain", "objectSid", "objectGUID", NULL };
const char * const ref_attrs[] = { "nETBIOSName", NULL };
- const struct ldb_dn *partitions_basedn = samdb_partitions_dn(sam_ctx, mem_ctx);
+ const struct ldb_dn *partitions_basedn;
ZERO_STRUCT(r->out);
@@ -1152,6 +1154,8 @@ static WERROR netr_DsrEnumerateDomainTrusts(struct dcesrv_call_state *dce_call,
return WERR_GENERAL_FAILURE;
}
+ partitions_basedn = samdb_partitions_dn(sam_ctx, mem_ctx);
+
ret = gendb_search_dn(sam_ctx, mem_ctx, NULL, &dom_res, dom_attrs);
if (ret == -1) {
return WERR_GENERAL_FAILURE;