From e905fed4e03a50f8c17b9ff0726fccc9558ca8c4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 31 Aug 2006 08:22:13 +0000 Subject: 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) --- source4/librpc/idl/lsa.idl | 56 ++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 19 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index 0953c6d025..3c05ab2e93 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -279,14 +279,9 @@ /*************************************************/ /* Function: 0x0c */ - typedef struct { - lsa_StringLarge name; - dom_sid2 *sid; - } lsa_TrustInformation; - NTSTATUS lsa_CreateTrustedDomain( [in] policy_handle *handle, - [in] lsa_TrustInformation *info, + [in] lsa_DomainInfo *info, [in] uint32 access_mask, [out] policy_handle *trustdom_handle ); @@ -298,14 +293,9 @@ /* w2k3 treats max_size as max_domains*60 */ const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60; - typedef struct { - lsa_StringLarge name; - dom_sid2 *sid; - } lsa_DomainInformation; - typedef struct { uint32 count; - [size_is(count)] lsa_DomainInformation *domains; + [size_is(count)] lsa_DomainInfo *domains; } lsa_DomainList; NTSTATUS lsa_EnumTrustDom ( @@ -341,10 +331,11 @@ [size_is(count)] lsa_TranslatedSid *sids; } lsa_TransSidArray; + const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32; typedef struct { [range(0,1000)] uint32 count; - [size_is(count)] lsa_TrustInformation *domains; - uint32 max_count; + [size_is(count)] lsa_DomainInfo *domains; + uint32 max_size; } lsa_RefDomainList; NTSTATUS lsa_LookupNames ( @@ -674,9 +665,13 @@ ); /* Function: 0x28 */ - NTSTATUS lsa_SetTrustDomainInfo(); + NTSTATUS lsa_SetTrustedDomainInfo(); /* Function: 0x29 */ - NTSTATUS lsa_DeleteTrustDomain(); + NTSTATUS lsa_DeleteTrustedDomain( + [in] policy_handle *handle, + [in] dom_sid2 *dom_sid + ); + /* Function: 0x2a */ NTSTATUS lsa_StorePrivateData(); /* Function: 0x2b */ @@ -725,17 +720,40 @@ [out,unique,switch_is(level)] lsa_TrustedDomainInfo *info ); + /**********************/ /* Function 0x31 */ - NTSTATUS lsa_SetTrustedDomainInfoByName(); + NTSTATUS lsa_SetTrustedDomainInfoByName( + [in] policy_handle *handle, + [in] lsa_String trusted_domain, + [in] lsa_TrustDomInfoEnum level, + [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info + ); /* Function 0x32 */ - NTSTATUS lsa_EnumTrustedDomainsEx(); + + /* w2k3 treats max_size as max_domains*82 */ + const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82; + + typedef struct { + uint32 count; + [size_is(count)] lsa_TrustDomainInfoInfoEx *domains; + } lsa_DomainListEx; + + NTSTATUS lsa_EnumTrustedDomainsEx ( + [in] policy_handle *handle, + [in,out] uint32 *resume_handle, + [out] lsa_DomainListEx *domains, + [in] uint32 max_size + ); + /* Function 0x33 */ NTSTATUS lsa_CreateTrustedDomainEx(); /* Function 0x34 */ - NTSTATUS lsa_CloseTrustedDomainEx(); + NTSTATUS lsa_CloseTrustedDomainEx( + [in,out] policy_handle *handle + ); /* Function 0x35 */ -- cgit