s4-netlogon: merge netr_AccountSync from s3 idl.
[ira/wip.git] / source4 / librpc / idl / netlogon.idl
index 8a36922fdd197ef46cc8c7dc3245d199697d464b..3418f08b00c5b687bf81be5cc58399a15343521b 100644 (file)
@@ -46,7 +46,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in]   [string,charset(UTF16)] uint16 account_name[],
                [in]   [string,charset(UTF16)] uint16 workstation[],
-               [out,unique] netr_UasInfo *info
+               [out,ref]  netr_UasInfo **info
                );
 
 
@@ -62,7 +62,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in] [string,charset(UTF16)] uint16 account_name[],
                [in] [string,charset(UTF16)] uint16 workstation[],
-               [out] netr_UasLogoffInfo info
+               [out,ref] netr_UasLogoffInfo *info
                );
 
 
@@ -80,12 +80,24 @@ interface netlogon
           but it doesn't look as though this structure is reflected at the
           NDR level. Maybe it is left to the application to decode the bindata array.
        */
-       typedef struct {
-               uint16 size;
-               uint16 length;
-               [size_is(size/2),length_is(length/2)] uint16 *bindata;
+       typedef [public] struct {
+               dlong lockout_duration;
+               udlong reset_count;
+               uint32 bad_attempt_lockout;
+               uint32 dummy;
        } netr_AcctLockStr;
 
+       /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
+        *   sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
+        * - MSV1_0_UPDATE_LOGON_STATISTICS
+        *   sets the logon time on network logon
+        * - MSV1_0_RETURN_USER_PARAMETERS
+        *   sets the user parameters in the driveletter
+        * - MSV1_0_RETURN_PROFILE_PATH
+        *   returns the profilepath in the driveletter and
+        *   sets LOGON_PROFILE_PATH_RETURNED user_flag
+        */
+
        typedef [public,bitmap32bit] bitmap {
                MSV1_0_CLEARTEXT_PASSWORD_ALLOWED       = 0x00000002,
                MSV1_0_UPDATE_LOGON_STATISTICS          = 0x00000004,
@@ -143,11 +155,11 @@ interface netlogon
        typedef [public,switch_type(netr_LogonInfoClass)] union {
                [case(NetlogonInteractiveInformation)]           netr_PasswordInfo *password;
                [case(NetlogonNetworkInformation)]               netr_NetworkInfo  *network;
-               [case(NetlogonServiceInformation)]               netr_PasswordInfo *password;
-               [case(NetlogonGenericInformation)]               netr_GenericInfo  *generic;
+               [case(NetlogonServiceInformation)]               netr_PasswordInfo *password;
+               [case(NetlogonGenericInformation)]               netr_GenericInfo  *generic;
                [case(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password;
                [case(NetlogonNetworkTransitiveInformation)]     netr_NetworkInfo  *network;
-               [case(NetlogonServiceTransitiveInformation)]     netr_PasswordInfo *password;
+               [case(NetlogonServiceTransitiveInformation)]     netr_PasswordInfo *password;
        } netr_LogonLevel;
 
        typedef [public,flag(NDR_PAHEX)] struct {
@@ -160,16 +172,17 @@ interface netlogon
 
        /* Flags for user_flags below */
        typedef [public,bitmap32bit] bitmap {
-               NETLOGON_GUEST                  = 0x0001,
-               NETLOGON_NOENCRYPTION           = 0x0002,
-               NETLOGON_CACHED_ACCOUNT         = 0x0004,
-               NETLOGON_USED_LM_PASSWORD       = 0x0008,
-               NETLOGON_EXTRA_SIDS             = 0x0020,
-               NETLOGON_SUBAUTH_SESSION_KEY    = 0x0040,
-               NETLOGON_SERVER_TRUST_ACCOUNT   = 0x0080,
-               NETLOGON_NTLMV2_ENABLED         = 0x0100,
-               NETLOGON_RESOURCE_GROUPS        = 0x0200,
-               NETLOGON_PROFILE_PATH_RETURNED  = 0x0400
+               NETLOGON_GUEST                  = 0x00000001,
+               NETLOGON_NOENCRYPTION           = 0x00000002,
+               NETLOGON_CACHED_ACCOUNT         = 0x00000004,
+               NETLOGON_USED_LM_PASSWORD       = 0x00000008,
+               NETLOGON_EXTRA_SIDS             = 0x00000020,
+               NETLOGON_SUBAUTH_SESSION_KEY    = 0x00000040,
+               NETLOGON_SERVER_TRUST_ACCOUNT   = 0x00000080,
+               NETLOGON_NTLMV2_ENABLED         = 0x00000100,
+               NETLOGON_RESOURCE_GROUPS        = 0x00000200,
+               NETLOGON_PROFILE_PATH_RETURNED  = 0x00000400,
+               NETLOGON_GRACE_LOGON            = 0x01000000
        } netr_UserFlags;
 
        typedef struct {
@@ -291,7 +304,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
                [in,unique] netr_Authenticator *credential,
                [in,out,unique] netr_Authenticator *return_authenticator,
-               [in] uint16 logon_level,
+               [in] netr_LogonInfoClass logon_level,
                [in] [switch_is(logon_level)] netr_LogonLevel logon
                );
        
@@ -446,7 +459,7 @@ interface netlogon
                NTTIME domain_create_time;
                uint32 SecurityInformation;
                sec_desc_buf sdbuf;
-               netr_AcctLockStr account_lockout;
+               lsa_BinaryString account_lockout;
                lsa_String unknown2;
                lsa_String unknown3;
                lsa_String unknown4;
@@ -711,12 +724,12 @@ interface netlogon
        NTSTATUS netr_DatabaseDeltas(
                [in]      [string,charset(UTF16)] uint16 logon_server[],
                [in]      [string,charset(UTF16)] uint16 computername[],
-               [in]      netr_Authenticator credential,
-               [in,out]  netr_Authenticator return_authenticator,
+               [in,ref]  netr_Authenticator *credential,
+               [in,out,ref]  netr_Authenticator *return_authenticator,
                [in]      netr_SamDatabaseID database_id,
-               [in,out]  udlong sequence_num,
-               [in]      uint32 preferredmaximumlength,
-               [out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
+               [in,out,ref]  udlong *sequence_num,
+               [out,ref]     netr_DELTA_ENUM_ARRAY **delta_enum_array,
+               [in]      uint32 preferredmaximumlength
                );
 
 
@@ -754,15 +767,15 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *logon_server,
                [in]     [string,charset(UTF16)] uint16 computername[],
                [in]     netr_Authenticator credential,
-               [in,out] netr_Authenticator return_authenticator,
+               [in,out,ref] netr_Authenticator *return_authenticator,
                [in]     netr_UAS_INFO_0 uas,
                [in]     uint32 count,
                [in]     uint32 level,
                [in]     uint32 buffersize,
-               [out,subcontext(4)] netr_AccountBuffer buffer,
-               [out]    uint32 count_returned,
-               [out]    uint32 total_entries,
-               [out]    netr_UAS_INFO_0 recordid
+               [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
+               [out,ref]    uint32 *count_returned,
+               [out,ref]    uint32 *total_entries,
+               [out,ref]    netr_UAS_INFO_0 *recordid
                );
 
 
@@ -773,15 +786,15 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *logon_server,
                [in]      [string,charset(UTF16)] uint16 computername[],
                [in]      netr_Authenticator credential,
-               [in,out]  netr_Authenticator return_authenticator,
+               [in,out,ref]  netr_Authenticator *return_authenticator,
                [in]      uint32 reference,
                [in]      uint32 level,
                [in]      uint32 buffersize,
-               [out,subcontext(4)] netr_AccountBuffer buffer,
-               [out]     uint32 count_returned,
-               [out]     uint32 total_entries,
-               [out]     uint32 next_reference,
-               [in,out]  netr_UAS_INFO_0 recordid
+               [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
+               [out,ref]     uint32 *count_returned,
+               [out,ref]     uint32 *total_entries,
+               [out,ref]     uint32 *next_reference,
+               [in,out,ref]  netr_UAS_INFO_0 *recordid
                );
 
 
@@ -791,26 +804,32 @@ interface netlogon
        WERROR netr_GetDcName(
                [in]  [string,charset(UTF16)] uint16 logon_server[],
                [in,unique] [string,charset(UTF16)] uint16 *domainname,
-               [out,unique] [string,charset(UTF16)] uint16 *dcname
+               [out,ref] [string,charset(UTF16)] uint16 **dcname
                );
 
        /*****************/
        /* Function 0x0C */
 
+       typedef [bitmap32bit] bitmap {
+               NETLOGON_CTRL_REPL_NEEDED       = 0x0001,
+               NETLOGON_CTRL_REPL_IN_PROGRESS  = 0x0002,
+               NETLOGON_CTRL_REPL_FULL_SYNC    = 0x0004
+       } netr_InfoFlags;
+
        typedef struct {
-               uint32 flags;
+               netr_InfoFlags flags;
                uint32 pdc_connection_status;
        } netr_NETLOGON_INFO_1;
 
        typedef struct {
-               uint32 flags;
+               netr_InfoFlags flags;
                uint32 pdc_connection_status;
-               [string,charset(UTF16)] uint16 trusted_dc_name[];
+               [string,charset(UTF16)] uint16 *trusted_dc_name;
                uint32 tc_connection_status;
        } netr_NETLOGON_INFO_2;
 
        typedef struct {
-               uint32 flags;
+               netr_InfoFlags flags;
                uint32 logon_attempts;
                uint32 unknown1;
                uint32 unknown2;
@@ -838,7 +857,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *logon_server,
                [in]   netr_LogonControlCode function_code,
                [in]   uint32 level,
-               [out,switch_is(level)]  netr_CONTROL_QUERY_INFORMATION info
+               [out,ref,switch_is(level)]  netr_CONTROL_QUERY_INFORMATION *info
                );
 
 
@@ -848,7 +867,7 @@ interface netlogon
        WERROR netr_GetAnyDCName(
                [in,unique] [string,charset(UTF16)] uint16 *logon_server,
                [in,unique] [string,charset(UTF16)] uint16 *domainname,
-               [out,unique] [string,charset(UTF16)] uint16 *dcname
+               [out,ref] [string,charset(UTF16)] uint16 **dcname
                );
 
 
@@ -864,19 +883,16 @@ interface netlogon
 
        WERROR netr_LogonControl2(
                [in,unique] [string,charset(UTF16)] uint16 *logon_server,
-               [in]    uint32 function_code,
+               [in]    netr_LogonControlCode function_code,
                [in]    uint32 level,
-               [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION  data,
-               [out][switch_is(level)]        netr_CONTROL_QUERY_INFORMATION query
+               [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION  *data,
+               [out,ref][switch_is(level)]        netr_CONTROL_QUERY_INFORMATION *query
                );
 
 
-       /* If this flag is not set, then the passwords and LM session keys are
-        * encrypted with DES calls.  (And the user session key is
-        * unencrypted) */ 
-       const int NETLOGON_NEG_ARCFOUR  = 0x00000004;
-       const int NETLOGON_NEG_128BIT   = 0x00004000;
-       const int NETLOGON_NEG_SCHANNEL = 0x40000000;
+       /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
+        * session keys are encrypted with DES calls.  (And the user session key
+        * is unencrypted) */
 
        /*****************/
        /* Function 0x0F */
@@ -907,14 +923,14 @@ interface netlogon
                NETLOGON_NEG_AUTHENTICATED_RPC_LSASS    = 0x20000000,
                NETLOGON_NEG_SCHANNEL                   = 0x40000000 /* AUTHENTICATED_RPC */
        } netr_NegotiateFlags;
+
        NTSTATUS netr_ServerAuthenticate2(
                [in,unique]  [string,charset(UTF16)] uint16 *server_name,
                [in]         [string,charset(UTF16)] uint16 account_name[],
                [in]         netr_SchannelType secure_channel_type,
                [in]         [string,charset(UTF16)] uint16 computer_name[],
                [in,out,ref] netr_Credential *credentials,
-               [in,out,ref] uint32 *negotiate_flags
+               [in,out,ref] netr_NegotiateFlags *negotiate_flags
                );
 
 
@@ -958,7 +974,7 @@ interface netlogon
                [in]   uint32 function_code,
                [in]   uint32 level,
                [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION  data,
-               [out][switch_is(level)]        netr_CONTROL_QUERY_INFORMATION query
+               [out,ref][switch_is(level)]     netr_CONTROL_QUERY_INFORMATION *query
                );
 
        /*****************/
@@ -976,8 +992,25 @@ interface netlogon
        /*****************/
        /* Function 0x14 */
 
-       /* two unkown bits still: DS_IP_VERSION_AGNOSTIC and
-        * DS_TRY_NEXTCLOSEST_SITE - Guenther */
+       /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
+
+       const int DSGETDC_VALID_FLAGS = (DS_FORCE_REDISCOVERY |
+                                        DS_DIRECTORY_SERVICE_REQUIRED |
+                                        DS_DIRECTORY_SERVICE_PREFERRED |
+                                        DS_GC_SERVER_REQUIRED |
+                                        DS_PDC_REQUIRED |
+                                        DS_BACKGROUND_ONLY |
+                                        DS_IP_REQUIRED |
+                                        DS_KDC_REQUIRED |
+                                        DS_TIMESERV_REQUIRED |
+                                        DS_WRITABLE_REQUIRED |
+                                        DS_GOOD_TIMESERV_PREFERRED |
+                                        DS_AVOID_SELF |
+                                        DS_ONLY_LDAP_NEEDED |
+                                        DS_IS_FLAT_NAME |
+                                        DS_IS_DNS_NAME |
+                                        DS_RETURN_FLAT_NAME |
+                                        DS_RETURN_DNS_NAME);
 
        typedef [bitmap32bit] bitmap {
                DS_FORCE_REDISCOVERY            = 0x00000001,
@@ -1007,22 +1040,24 @@ interface netlogon
        } netr_DsRGetDCNameInfo_AddressType;
 
        typedef [bitmap32bit] bitmap {
-               DS_SERVER_PDC            = NBT_SERVER_PDC,
-               DS_SERVER_GC             = NBT_SERVER_GC,
-               DS_SERVER_LDAP           = NBT_SERVER_LDAP,
-               DS_SERVER_DS             = NBT_SERVER_DS,
-               DS_SERVER_KDC            = NBT_SERVER_KDC,
-               DS_SERVER_TIMESERV       = NBT_SERVER_TIMESERV,
-               DS_SERVER_CLOSEST        = NBT_SERVER_CLOSEST,
-               DS_SERVER_WRITABLE       = NBT_SERVER_WRITABLE,
-               DS_SERVER_GOOD_TIMESERV  = NBT_SERVER_GOOD_TIMESERV,
-               DS_SERVER_NDNC           = 0x00000400,
-               DS_DNS_CONTROLLER        = 0x20000000,
-               DS_DNS_DOMAIN            = 0x40000000,
-               DS_DNS_FOREST            = 0x80000000
+               DS_SERVER_PDC                    = NBT_SERVER_PDC,
+               DS_SERVER_GC                     = NBT_SERVER_GC,
+               DS_SERVER_LDAP                   = NBT_SERVER_LDAP,
+               DS_SERVER_DS                     = NBT_SERVER_DS,
+               DS_SERVER_KDC                    = NBT_SERVER_KDC,
+               DS_SERVER_TIMESERV               = NBT_SERVER_TIMESERV,
+               DS_SERVER_CLOSEST                = NBT_SERVER_CLOSEST,
+               DS_SERVER_WRITABLE               = NBT_SERVER_WRITABLE,
+               DS_SERVER_GOOD_TIMESERV          = NBT_SERVER_GOOD_TIMESERV,
+               DS_SERVER_NDNC                   = NBT_SERVER_NDNC,
+               DS_SERVER_SELECT_SECRET_DOMAIN_6 = NBT_SERVER_SELECT_SECRET_DOMAIN_6,
+               DS_SERVER_FULL_SECRET_DOMAIN_6   = NBT_SERVER_FULL_SECRET_DOMAIN_6,
+               DS_DNS_CONTROLLER                = 0x20000000,
+               DS_DNS_DOMAIN                    = 0x40000000,
+               DS_DNS_FOREST                    = 0x80000000
        } netr_DsR_DcFlags;
 
-       typedef struct {
+       typedef [public] struct {
                [string,charset(UTF16)] uint16 *dc_unc;
                [string,charset(UTF16)] uint16 *dc_address;
                netr_DsRGetDCNameInfo_AddressType dc_address_type;
@@ -1040,7 +1075,7 @@ interface netlogon
                [in,unique] GUID *domain_guid,
                [in,unique] GUID *site_guid,
                [in] netr_DsRGetDCName_flags flags,
-               [out,unique] netr_DsRGetDCNameInfo *info
+               [out,ref] netr_DsRGetDCNameInfo **info
                );
 
        /*****************/
@@ -1070,12 +1105,12 @@ interface netlogon
        /****************/
        /* Function 0x1a */
        [public] NTSTATUS netr_ServerAuthenticate3(
-               [in,unique]         [string,charset(UTF16)] uint16 *server_name,
+               [in,unique]  [string,charset(UTF16)] uint16 *server_name,
                [in]         [string,charset(UTF16)] uint16 account_name[],
                [in]         netr_SchannelType secure_channel_type,
                [in]         [string,charset(UTF16)] uint16 computer_name[],
                [in,out,ref] netr_Credential *credentials,
-               [in,out,ref] uint32 *negotiate_flags,
+               [in,out,ref] netr_NegotiateFlags *negotiate_flags,
                [out,ref]    uint32 *rid
                );
 
@@ -1088,18 +1123,29 @@ interface netlogon
                [in,unique] GUID *domain_guid,
                [in,unique] [string,charset(UTF16)] uint16 *site_name,
                [in] netr_DsRGetDCName_flags flags,
-               [out,unique] netr_DsRGetDCNameInfo *info
+               [out,ref] netr_DsRGetDCNameInfo **info
                );
 
+
        /****************/
        /* Function 0x1c */
        WERROR netr_DsRGetSiteName(
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
-               [out,unique] [string,charset(UTF16)] uint16 *site
+               [out,ref] [string,charset(UTF16)] uint16 **site
                );
 
        /****************/
        /* Function 0x1d */
+       typedef [bitmap32bit] bitmap {
+               NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
+               NETR_TRUST_FLAG_OUTBOUND  = 0x00000002,
+               NETR_TRUST_FLAG_TREEROOT  = 0x00000004,
+               NETR_TRUST_FLAG_PRIMARY   = 0x00000008,
+               NETR_TRUST_FLAG_NATIVE    = 0x00000010,
+               NETR_TRUST_FLAG_INBOUND   = 0x00000020,
+               NETR_TRUST_FLAG_MIT_KRB5  = 0x00000080,
+               NETR_TRUST_FLAG_AES       = 0x00000100
+       } netr_TrustFlags;
 
        typedef [flag(NDR_PAHEX)] struct {
                uint16 length;
@@ -1127,26 +1173,61 @@ interface netlogon
                [case(2)] netr_DomainQuery1 *query1;
        } netr_DomainQuery;
 
+       typedef struct {
+               /* these first 3 values come from the fact windows
+                  actually encodes this structure as a UNICODE_STRING
+                  - see MS-NRPC section 2.2.1.3.9 */
+               [value(8)] uint32 length;
+               [value(0)] uint32 dummy;
+               [value(8)] uint32 size;
+               netr_TrustFlags flags;
+               uint32 parent_index;
+               uint32 trust_type;
+               uint32 trust_attributes;
+       } netr_trust_extension;
+
+       typedef struct {
+               uint16 length; /* value is 16 when info != NULL, otherwise 0 */
+               [value(length)] uint16 size;   /* value is 16 when info != NULL, otherwise 0 */
+               netr_trust_extension *info;
+       } netr_trust_extension_container;
+
        typedef struct {
                lsa_String domainname;
                lsa_String fulldomainname;
                lsa_String forest;
                GUID        guid;
                dom_sid2    *sid;
-               netr_BinaryString unknown1[4];
-               uint32      unknown[4];
+               netr_trust_extension_container trust_extension;
+               lsa_String dummystring[3];
+               uint32     dummy[4];
        } netr_DomainTrustInfo;
 
+       typedef struct {
+               uint32 policy_size;
+               [size_is(policy_size)] uint8 *policy;
+       } netr_LsaPolicyInfo;
+
+       typedef [public,bitmap32bit] bitmap {
+               NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS = 0x00000001,
+               NETR_WS_FLAG_HANDLES_SPN_UPDATE     = 0x00000002
+       } netr_WorkstationFlags;
+
        typedef struct {
                netr_DomainTrustInfo domaininfo;
                uint32 num_trusts;
                [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
-               uint32 unknown[14]; /* room for expansion? */
+               netr_LsaPolicyInfo lsa_policy;
+               lsa_String dns_hostname;
+               lsa_String dummystring[3];
+               netr_WorkstationFlags workstation_flags;
+               uint32 supported_enc_types;
+               uint32 dummy[2];
        } netr_DomainInfo1;
 
        typedef union {
                [case(1)] netr_DomainInfo1 *info1;
-               [case(2)] netr_DomainInfo1 *info1;
+               [case(2)] netr_DomainInfo1 *info2;
        } netr_DomainInfo;
        
        NTSTATUS netr_LogonGetDomainInfo(
@@ -1156,7 +1237,7 @@ interface netlogon
                [in,out,ref] netr_Authenticator *return_authenticator,
                [in]         uint32 level,
                [in,switch_is(level)] netr_DomainQuery query,
-               [out,switch_is(level)] netr_DomainInfo info
+               [out,ref,switch_is(level)] netr_DomainInfo *info
                );
 
        typedef [flag(NDR_PAHEX)] struct {
@@ -1221,7 +1302,7 @@ interface netlogon
                [in,unique] GUID *domain_guid,
                [in,unique] [string,charset(UTF16)] uint16 *site_name,
                [in] netr_DsRGetDCName_flags flags,
-               [out,unique] netr_DsRGetDCNameInfo *info
+               [out,ref] netr_DsRGetDCNameInfo **info
                );
 
        /****************/
@@ -1230,14 +1311,6 @@ interface netlogon
 
        /****************/
        /* Function 0x24 */
-       typedef [bitmap32bit] bitmap {
-               NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
-               NETR_TRUST_FLAG_OUTBOUND  = 0x00000002,
-               NETR_TRUST_FLAG_TREEROOT  = 0x00000004,
-               NETR_TRUST_FLAG_PRIMARY   = 0x00000008,
-               NETR_TRUST_FLAG_NATIVE    = 0x00000010,
-               NETR_TRUST_FLAG_INBOUND   = 0x00000020
-       } netr_TrustFlags;
 
        typedef [v1_enum] enum {
                NETR_TRUST_TYPE_DOWNLEVEL       = 1,
@@ -1302,7 +1375,7 @@ interface netlogon
 
        WERROR netr_DsrGetDcSiteCoverageW(
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [out,unique] DcSitesCtr *ctr
+               [out,ref] DcSitesCtr **ctr
                );
 
        /****************/
@@ -1310,7 +1383,7 @@ interface netlogon
        NTSTATUS netr_LogonSamLogonEx(
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
-               [in]  uint16 logon_level,
+               [in]  netr_LogonInfoClass logon_level,
                [in]  [switch_is(logon_level)] netr_LogonLevel logon,
                [in]  uint16 validation_level,
                [out] [switch_is(validation_level)] netr_Validation validation,
@@ -1324,8 +1397,7 @@ interface netlogon
        WERROR netr_DsrEnumerateDomainTrusts(
                [in,unique]          [string,charset(UTF16)] uint16           *server_name,
                [in]                 netr_TrustFlags  trust_flags,
-               [out]                uint32           count,
-               [out,unique,size_is(count)] netr_DomainTrust *trusts
+               [out,ref]            netr_DomainTrustList *trusts
                );
 
 
@@ -1342,7 +1414,7 @@ interface netlogon
        /****************/
        /* Function 0x2a */
        NTSTATUS netr_ServerTrustPasswordsGet(
-               [in,unique]  [string,charset(UTF16)] uint16 *server_name,
+               [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in]  [string,charset(UTF16)] uint16 account_name[],
                [in]  netr_SchannelType secure_channel_type,
                [in]  [string,charset(UTF16)] uint16 computer_name[],
@@ -1384,7 +1456,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
                [in,unique] netr_Authenticator *credential,
                [in,out,unique] netr_Authenticator *return_authenticator,
-               [in]  uint16 logon_level,
+               [in]  netr_LogonInfoClass logon_level,
                [in]  [switch_is(logon_level)] netr_LogonLevel logon,
                [in]  uint16 validation_level,
                [out] [switch_is(validation_level)] netr_Validation validation,