who contributed!
*/
+import "misc.idl", "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
+
#include "idl_types.h"
[
uuid("12345678-1234-abcd-ef00-01234567cffb"),
version(1.0),
endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
- pointer_default(unique),
- depends(lsa,samr)
+ pointer_default(unique)
]
interface netlogon
{
- declare bitmap samr_AcctFlags;
+ typedef bitmap samr_AcctFlags samr_AcctFlags;
+ typedef bitmap samr_GroupAttrs samr_GroupAttrs;
- typedef [public] struct {
- [value(strlen_m(r->string)*2)] uint16 size;
- [value(r->size)] uint16 length;
- unistr_noterm *string;
- } netr_String;
-
/*****************/
/* Function 0x00 */
typedef struct {
- unistr *account_name;
+ [string,charset(UTF16)] uint16 *account_name;
uint32 priv;
uint32 auth_flags;
uint32 logon_count;
uint32 password_age;
time_t pw_can_change;
time_t pw_must_change;
- unistr *computer;
- unistr *domain;
- unistr *script_path;
+ [string,charset(UTF16)] uint16 *computer;
+ [string,charset(UTF16)] uint16 *domain;
+ [string,charset(UTF16)] uint16 *script_path;
uint32 unknown;
} netr_UasInfo;
WERROR netr_LogonUasLogon(
- [in] unistr *server_name,
- [in] unistr account_name,
- [in] unistr workstation,
- [out] netr_UasInfo *info
+ [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
);
} netr_UasLogoffInfo;
WERROR netr_LogonUasLogoff(
- [in] unistr *server_name,
- [in] unistr account_name,
- [in] unistr workstation,
+ [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
);
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,
+ MSV1_0_RETURN_USER_PARAMETERS = 0x00000008,
+ MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x00000020,
+ MSV1_0_RETURN_PROFILE_PATH = 0x00000200,
+ MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x00000800
+ } netr_LogonParameterControl;
+
typedef struct {
- netr_String domain_name;
- uint32 parameter_control;
+ lsa_String domain_name;
+ netr_LogonParameterControl parameter_control; /* see MSV1_0_* */
uint32 logon_id_low;
uint32 logon_id_high;
- netr_String account_name;
- netr_String workstation;
+ lsa_String account_name;
+ lsa_String workstation;
} netr_IdentityInfo;
typedef struct {
typedef [flag(NDR_PAHEX)] struct {
uint16 length;
- [value(r->length)] uint16 size;
- [size_is(size),length_is(length)] uint8 *data[];
+ [value(length)] uint16 size;
+ [size_is(length),length_is(length)] uint8 *data;
} netr_ChallengeResponse;
typedef [flag(NDR_PAHEX)] struct {
netr_ChallengeResponse lm;
} netr_NetworkInfo;
- typedef [switch_type(uint16)] union {
- [case(1)] netr_PasswordInfo *password;
- [case(2)] netr_NetworkInfo *network;
- [case(3)] netr_PasswordInfo *password;
- [case(5)] netr_PasswordInfo *password;
- [case(6)] netr_NetworkInfo *network;
- } netr_LogonLevel;
+ typedef [flag(NDR_PAHEX)] struct {
+ netr_IdentityInfo identity_info;
+ lsa_String package_name;
+ uint32 length;
+ [size_is(length)] uint8 *data;
+ } netr_GenericInfo;
- typedef [public] struct {
- uint32 rid;
- uint32 attributes;
- } netr_GroupMembership;
+ typedef enum {
+ NetlogonInteractiveInformation = 1,
+ NetlogonNetworkInformation = 2,
+ NetlogonServiceInformation = 3,
+ NetlogonGenericInformation = 4,
+ NetlogonInteractiveTransitiveInformation = 5,
+ NetlogonNetworkTransitiveInformation = 6,
+ NetlogonServiceTransitiveInformation = 7
+ } netr_LogonInfoClass;
+
+ 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(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password;
+ [case(NetlogonNetworkTransitiveInformation)] netr_NetworkInfo *network;
+ [case(NetlogonServiceTransitiveInformation)] netr_PasswordInfo *password;
+ } netr_LogonLevel;
typedef [public,flag(NDR_PAHEX)] struct {
uint8 key[16];
uint8 key[8];
} netr_LMSessionKey;
+ /* Flags for user_flags below */
+ typedef [public,bitmap32bit] bitmap {
+ 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 {
NTTIME last_logon;
NTTIME last_logoff;
NTTIME last_password_change;
NTTIME allow_password_change;
NTTIME force_password_change;
- netr_String account_name;
- netr_String full_name;
- netr_String logon_script;
- netr_String profile_path;
- netr_String home_directory;
- netr_String home_drive;
+ lsa_String account_name;
+ lsa_String full_name;
+ lsa_String logon_script;
+ lsa_String profile_path;
+ lsa_String home_directory;
+ lsa_String home_drive;
uint16 logon_count;
uint16 bad_password_count;
uint32 rid;
uint32 primary_gid;
- uint32 group_count;
- [size_is(group_count)] netr_GroupMembership *groupids[];
- uint32 user_flags;
+ samr_RidWithAttributeArray groups;
+ netr_UserFlags user_flags;
netr_UserSessionKey key;
- netr_String logon_server;
- netr_String domain;
+ lsa_StringLarge logon_server;
+ lsa_StringLarge domain;
dom_sid2 *domain_sid;
netr_LMSessionKey LMSessKey;
samr_AcctFlags acct_flags;
typedef struct {
dom_sid2 *sid;
- uint32 attribute;
+ samr_GroupAttrs attributes;
} netr_SidAttr;
typedef [public] struct {
netr_SamBaseInfo base;
uint32 sidcount;
- [size_is(sidcount)] netr_SidAttr *sids[];
+ [size_is(sidcount)] netr_SidAttr *sids;
} netr_SamInfo3;
typedef struct {
netr_SamBaseInfo base;
uint32 sidcount;
- [size_is(sidcount)] netr_SidAttr *sids[];
- netr_String forest;
- netr_String principle;
+ [size_is(sidcount)] netr_SidAttr *sids;
+ lsa_String forest;
+ lsa_String principle;
uint32 unknown4[20];
} netr_SamInfo6;
typedef struct {
uint32 pac_size;
- [size_is(pac_size)] uint8 *pac[];
- netr_String logon_domain;
- netr_String logon_server;
- netr_String principal_name;
+ [size_is(pac_size)] uint8 *pac;
+ lsa_String logon_domain;
+ lsa_String logon_server;
+ lsa_String principal_name;
uint32 auth_size;
- [size_is(auth_size)] uint8 *auth[];
+ [size_is(auth_size)] uint8 *auth;
netr_UserSessionKey user_session_key;
uint32 expansionroom[10];
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
} netr_PacInfo;
- typedef [switch_type(uint16)] union {
- [case(2)] netr_SamInfo2 *sam2;
- [case(3)] netr_SamInfo3 *sam3;
+ typedef [flag(NDR_PAHEX)] struct {
+ uint32 length;
+ [size_is(length)] uint8 *data;
+ } netr_GenericInfo2;
+
+ typedef enum {
+ NetlogonValidationUasInfo = 1,
+ NetlogonValidationSamInfo = 2,
+ NetlogonValidationSamInfo2 = 3,
+ NetlogonValidationGenericInfo2 = 5,
+ NetlogonValidationSamInfo4 = 6
+ } netr_ValidationInfoClass;
+
+ typedef [public,switch_type(uint16)] union {
+ [case(NetlogonValidationSamInfo)] netr_SamInfo2 *sam2;
+ [case(NetlogonValidationSamInfo2)] netr_SamInfo3 *sam3;
[case(4)] netr_PacInfo *pac;
- [case(5)] netr_PacInfo *pac;
- [case(6)] netr_SamInfo6 *sam6;
+ [case(NetlogonValidationGenericInfo2)] netr_GenericInfo2 *generic;
+ [case(NetlogonValidationSamInfo4)] netr_SamInfo6 *sam6;
} netr_Validation;
typedef [public, flag(NDR_PAHEX)] struct {
} netr_Authenticator;
NTSTATUS netr_LogonSamLogon(
- [in] unistr *server_name,
- [in] unistr *workstation,
- [in] netr_Authenticator *credential,
- [in][out] netr_Authenticator *return_authenticator,
- [in] uint16 logon_level,
- [in] [switch_is(logon_level)] netr_LogonLevel logon,
- [in] uint16 validation_level,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in,unique] [string,charset(UTF16)] uint16 *computer_name,
+ [in,unique] netr_Authenticator *credential,
+ [in,out,unique] netr_Authenticator *return_authenticator,
+ [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,
- [out] uint8 authoritative
+ [out] uint8 authoritative
);
/* Function 0x03 */
NTSTATUS netr_LogonSamLogoff(
- [in] unistr *server_name,
- [in] unistr *computer_name,
- [in] netr_Authenticator *credential,
- [in][out] netr_Authenticator *return_authenticator,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [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] [switch_is(logon_level)] netr_LogonLevel logon
);
-
+
/*****************/
/* Function 0x04 */
- NTSTATUS netr_ServerReqChallenge(
- [in] unistr *server_name,
- [in] unistr computer_name,
+ [public] NTSTATUS netr_ServerReqChallenge(
+ [in,unique,string,charset(UTF16)] uint16 *server_name,
+ [in,string,charset(UTF16)] uint16 computer_name[],
[in,out,ref] netr_Credential *credentials
);
/*****************/
/* Function 0x05 */
- /* secure channel types */
- /* Only SEC_CHAN_WKSTA can forward requests to other domains. */
-
- typedef enum {
- SEC_CHAN_WKSTA = 2,
- SEC_CHAN_DOMAIN = 4,
- SEC_CHAN_BDC = 6
- } netr_SchannelType;
+ typedef enum netr_SchannelType netr_SchannelType;
NTSTATUS netr_ServerAuthenticate(
- [in] unistr *server_name,
- [in] unistr account_name,
- [in] netr_SchannelType secure_channel_type,
- [in] unistr computer_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
);
/* Function 0x06 */
NTSTATUS netr_ServerPasswordSet(
- [in] unistr *server_name,
- [in] unistr account_name,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
- [in] unistr computer_name,
+ [in] [string,charset(UTF16)] uint16 computer_name[],
[in] netr_Authenticator credential,
[in] samr_Password new_password,
[out] netr_Authenticator return_authenticator
/*****************/
/* Function 0x07 */
- /* SAM database types */
- typedef [v1_enum] enum {
- SAM_DATABASE_DOMAIN = 0, /* Domain users and groups */
- SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */
- SAM_DATABASE_PRIVS = 2 /* Privileges */
- } netr_SamDatabaseID;
+ typedef enum netr_SamDatabaseID netr_SamDatabaseID;
typedef struct {
- unistr *account_name;
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ [string,charset(UTF16)] uint16 *account_name;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
typedef struct {
uint16 length;
- [value(r->length)] uint16 size;
+ [value(length)] uint16 size;
uint32 flags;
samr_Password pwd;
} netr_USER_KEY16;
typedef struct {
uint16 nt_length;
- uint16 nt_size;
+ [value(nt_length)] uint16 nt_size;
uint32 nt_flags;
uint16 lm_length;
- uint16 lm_size;
+ [value(lm_length)] uint16 lm_size;
uint32 lm_flags;
uint8 nt_history[nt_length];
uint8 lm_history[lm_length];
typedef struct {
netr_USER_KEY16 lmpassword;
netr_USER_KEY16 ntpassword;
- netr_PasswordHistory lmhistory;
+ netr_PasswordHistory history;
} netr_USER_KEYS2;
- typedef struct {
+ typedef struct { /* TODO: make this a union! */
netr_USER_KEYS2 keys2;
} netr_USER_KEY_UNION;
} netr_USER_KEYS;
typedef struct {
- bool8 SensitiveDataFlag;
+ boolean8 SensitiveDataFlag;
uint32 DataLength;
/* netr_USER_KEYS encrypted with the session key */
- [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData[];
+ [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
} netr_USER_PRIVATE_INFO;
typedef struct {
- netr_String account_name;
- netr_String full_name;
+ lsa_String account_name;
+ lsa_String full_name;
uint32 rid;
uint32 primary_gid;
- netr_String home_directory;
- netr_String home_drive;
- netr_String logon_script;
- netr_String description;
- netr_String workstations;
+ lsa_String home_directory;
+ lsa_String home_drive;
+ lsa_String logon_script;
+ lsa_String description;
+ lsa_String workstations;
NTTIME last_logon;
NTTIME last_logoff;
samr_LogonHours logon_hours;
samr_AcctFlags acct_flags;
samr_Password lmpassword;
samr_Password ntpassword;
- bool8 nt_password_present;
- bool8 lm_password_present;
- bool8 password_expired;
- netr_String comment;
- netr_String parameters;
+ boolean8 nt_password_present;
+ boolean8 lm_password_present;
+ boolean8 password_expired;
+ lsa_String comment;
+ lsa_String parameters;
uint16 country_code;
uint16 code_page;
netr_USER_PRIVATE_INFO user_private_info;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_String profile_path;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String profile_path;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
} netr_DELTA_USER;
typedef struct {
- netr_String domain_name;
- netr_String comment;
- NTTIME force_logoff_time;
+ lsa_String domain_name;
+ lsa_String oem_information; /* comment */
+ dlong force_logoff_time;
uint16 min_password_length;
uint16 password_history_length;
/* yes, these are signed. They are in negative 100ns */
NTTIME domain_create_time;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_AcctLockStr account_lockout;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_BinaryString account_lockout;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 logon_to_chgpass;
uint32 unknown6;
uint32 unknown7;
} netr_DELTA_DOMAIN;
typedef struct {
- netr_String group_name;
+ lsa_String group_name;
uint32 rid;
uint32 attributes;
- netr_String description;
+ lsa_String description;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
} netr_DELTA_GROUP;
typedef struct {
- netr_String OldName;
- netr_String NewName;
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String OldName;
+ lsa_String NewName;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
} netr_DELTA_RENAME;
typedef struct {
- [size_is(num_rids)] uint32 *rids[];
- [size_is(num_rids)] uint32 *attribs[];
+ [size_is(num_rids)] uint32 *rids;
+ [size_is(num_rids)] uint32 *attribs;
uint32 num_rids;
uint32 unknown1;
uint32 unknown2;
} netr_DELTA_GROUP_MEMBER;
typedef struct {
- netr_String alias_name;
+ lsa_String alias_name;
uint32 rid;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_String description;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String description;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
typedef struct {
uint32 maxlogsize;
NTTIME auditretentionperiod;
- bool8 auditingmode;
+ boolean8 auditingmode;
uint32 maxauditeventcount;
- [size_is(maxauditeventcount+1)] uint32 *eventauditoptions[];
- netr_String primary_domain_name;
+ [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
+ lsa_String primary_domain_name;
dom_sid2 *sid;
netr_QUOTA_LIMITS quota_limits;
udlong sequence_num;
NTTIME db_create_time;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
} netr_DELTA_POLICY;
typedef struct {
- netr_String domain_name;
+ lsa_String domain_name;
uint32 num_controllers;
- [size_is(num_controllers)] netr_String *controller_names[];
+ [size_is(num_controllers)] lsa_String *controller_names;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 posix_offset;
uint32 unknown6;
uint32 unknown7;
typedef struct {
uint32 privilege_entries;
uint32 privilege_control;
- [size_is(privilege_entries)] uint32 *privilege_attrib[];
- [size_is(privilege_entries)] netr_String *privilege_name[];
+ [size_is(privilege_entries)] uint32 *privilege_attrib;
+ [size_is(privilege_entries)] lsa_String *privilege_name;
netr_QUOTA_LIMITS quotalimits;
uint32 system_flags;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
typedef struct {
uint32 len;
uint32 maxlen;
- [size_is(maxlen)][length_is(len)] uint8 *cipher_data[];
+ [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
} netr_CIPHER_VALUE;
typedef struct {
NTTIME old_cipher_set_time;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
- netr_String unknown1;
- netr_String unknown2;
- netr_String unknown3;
- netr_String unknown4;
+ lsa_String unknown1;
+ lsa_String unknown2;
+ lsa_String unknown3;
+ lsa_String unknown4;
uint32 unknown5;
uint32 unknown6;
uint32 unknown7;
[case(NETR_DELTA_DELETE_TRUST)] dom_sid2 *sid;
[case(NETR_DELTA_ACCOUNT)] dom_sid2 *sid;
[case(NETR_DELTA_DELETE_ACCOUNT)] dom_sid2 *sid;
- [case(NETR_DELTA_SECRET)] unistr *name;
- [case(NETR_DELTA_DELETE_SECRET)] unistr *name;
+ [case(NETR_DELTA_SECRET)] [string,charset(UTF16)] uint16 *name;
+ [case(NETR_DELTA_DELETE_SECRET)] [string,charset(UTF16)] uint16 *name;
[case(NETR_DELTA_DELETE_GROUP2)] uint32 rid;
[case(NETR_DELTA_DELETE_USER2)] uint32 rid;
[case(NETR_DELTA_MODIFY_COUNT)] ;
typedef struct {
uint32 num_deltas;
- [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum[];
+ [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
} netr_DELTA_ENUM_ARRAY;
NTSTATUS netr_DatabaseDeltas(
- [in] unistr logon_server,
- [in] unistr computername,
+ [in] [string,charset(UTF16)] uint16 logon_server[],
+ [in] [string,charset(UTF16)] uint16 computername[],
[in] netr_Authenticator credential,
[in,out] netr_Authenticator return_authenticator,
[in] netr_SamDatabaseID database_id,
[in,out] udlong sequence_num,
[in] uint32 preferredmaximumlength,
- [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
+ [out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
);
/* Function 0x08 */
NTSTATUS netr_DatabaseSync(
- [in] unistr logon_server,
- [in] unistr computername,
+ [in] [string,charset(UTF16)] uint16 logon_server[],
+ [in] [string,charset(UTF16)] uint16 computername[],
[in] netr_Authenticator credential,
[in,out] netr_Authenticator return_authenticator,
[in] netr_SamDatabaseID database_id,
[in,out] uint32 sync_context,
[in] uint32 preferredmaximumlength,
- [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
+ [out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
);
} netr_AccountBuffer;
NTSTATUS netr_AccountDeltas(
- [in] unistr *logon_server,
- [in] unistr computername,
+ [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] netr_UAS_INFO_0 uas,
/* Function 0x0A */
NTSTATUS netr_AccountSync(
- [in] unistr *logon_server,
- [in] unistr computername,
+ [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] uint32 reference,
/*****************/
/* Function 0x0B */
- NTSTATUS netr_GetDcName(
- [in] unistr logon_server,
- [in] unistr *domainname,
- [out] unistr *dcname
+ WERROR netr_GetDcName(
+ [in] [string,charset(UTF16)] uint16 logon_server[],
+ [in,unique] [string,charset(UTF16)] uint16 *domainname,
+ [out,unique] [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;
- unistr 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;
/* function_code values */
typedef [v1_enum] enum {
+ NETLOGON_CONTROL_SYNC = 2,
NETLOGON_CONTROL_REDISCOVER = 5,
NETLOGON_CONTROL_TC_QUERY = 6,
NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7,
} netr_LogonControlCode;
WERROR netr_LogonControl(
- [in] unistr *logon_server,
+ [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
/* Function 0x0D */
WERROR netr_GetAnyDCName(
- [in] unistr *logon_server,
- [in] unistr *domainname,
- [out] unistr *dcname
+ [in,unique] [string,charset(UTF16)] uint16 *logon_server,
+ [in,unique] [string,charset(UTF16)] uint16 *domainname,
+ [out,unique] [string,charset(UTF16)] uint16 *dcname
);
/* Function 0x0E */
typedef union {
- [case(NETLOGON_CONTROL_REDISCOVER)] unistr *domain;
- [case(NETLOGON_CONTROL_TC_QUERY)] unistr *domain;
- [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] unistr *domain;
+ [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
+ [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
+ [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
[case(NETLOGON_CONTROL_SET_DBFLAG)] uint32 debug_level;
} netr_CONTROL_DATA_INFORMATION;
WERROR netr_LogonControl2(
- [in] unistr *logon_server,
+ [in,unique] [string,charset(UTF16)] uint16 *logon_server,
[in] uint32 function_code,
[in] uint32 level,
[in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
);
- /* 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 */
+ typedef [bitmap32bit] bitmap {
+ NETLOGON_NEG_ACCOUNT_LOCKOUT = 0x00000001,
+ NETLOGON_NEG_PERSISTENT_SAMREPL = 0x00000002,
+ NETLOGON_NEG_ARCFOUR = 0x00000004,
+ NETLOGON_NEG_PROMOTION_COUNT = 0x00000008,
+ NETLOGON_NEG_CHANGELOG_BDC = 0x00000010,
+ NETLOGON_NEG_FULL_SYNC_REPL = 0x00000020,
+ NETLOGON_NEG_MULTIPLE_SIDS = 0x00000040,
+ NETLOGON_NEG_REDO = 0x00000080,
+ NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL = 0x00000100,
+ NETLOGON_NEG_SEND_PASSWORD_INFO_PDC = 0x00000200,
+ NETLOGON_NEG_GENERIC_PASSTHROUGH = 0x00000400,
+ NETLOGON_NEG_CONCURRENT_RPC = 0x00000800,
+ NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL = 0x00001000,
+ NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL = 0x00002000,
+ NETLOGON_NEG_128BIT = 0x00004000, /* STRONG_KEYS */
+ NETLOGON_NEG_TRANSITIVE_TRUSTS = 0x00008000,
+ NETLOGON_NEG_DNS_DOMAIN_TRUSTS = 0x00010000,
+ NETLOGON_NEG_PASSWORD_SET2 = 0x00020000,
+ NETLOGON_NEG_GETDOMAININFO = 0x00040000,
+ NETLOGON_NEG_CROSS_FOREST_TRUSTS = 0x00080000,
+ NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION = 0x00100000,
+ NETLOGON_NEG_RODC_PASSTHROUGH = 0x00200000,
+ NETLOGON_NEG_AUTHENTICATED_RPC_LSASS = 0x20000000,
+ NETLOGON_NEG_SCHANNEL = 0x40000000 /* AUTHENTICATED_RPC */
+ } netr_NegotiateFlags;
+
NTSTATUS netr_ServerAuthenticate2(
- [in] unistr *server_name,
- [in] unistr account_name,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
- [in] unistr computer_name,
+ [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
);
/* Function 0x10 */
NTSTATUS netr_DatabaseSync2(
- [in] unistr logon_server,
- [in] unistr computername,
+ [in] [string,charset(UTF16)] uint16 logon_server[],
+ [in] [string,charset(UTF16)] uint16 computername[],
[in] netr_Authenticator credential,
[in,out] netr_Authenticator return_authenticator,
[in] netr_SamDatabaseID database_id,
[in] uint16 restart_state,
[in,out] uint32 sync_context,
[in] uint32 preferredmaximumlength,
- [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
+ [out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
);
/* i'm not at all sure how this call works */
NTSTATUS netr_DatabaseRedo(
- [in] unistr logon_server,
- [in] unistr computername,
+ [in] [string,charset(UTF16)] uint16 logon_server[],
+ [in] [string,charset(UTF16)] uint16 computername[],
[in] netr_Authenticator credential,
[in,out] netr_Authenticator return_authenticator,
- [in][size_is(change_log_entry_size)] uint8 *change_log_entry[],
+ [in,unique][size_is(change_log_entry_size)] uint8 *change_log_entry,
[in] uint32 change_log_entry_size,
- [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
+ [out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
);
/* Function 0x12 */
WERROR netr_LogonControl2Ex(
- [in] unistr *logon_server,
+ [in,unique] [string,charset(UTF16)] uint16 *logon_server,
[in] uint32 function_code,
[in] uint32 level,
[in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
/*****************/
/* Function 0x13 */
- WERROR netr_NETRENUMERATETRUSTEDDOMAINS() ;
+ typedef struct {
+ uint32 length;
+ [size_is(length)] uint8 *data;
+ } netr_Blob;
+
+ WERROR netr_NetrEnumerateTrustedDomains(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [out,ref] netr_Blob *trusted_domains_blob
+ );
/*****************/
- /* Function 0x14 */
- WERROR netr_DSRGETDCNAME() ;
+ /* Function 0x14 */
+
+ /* 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,
+ DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010,
+ DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020,
+ DS_GC_SERVER_REQUIRED = 0x00000040,
+ DS_PDC_REQUIRED = 0x00000080,
+ DS_BACKGROUND_ONLY = 0x00000100,
+ DS_IP_REQUIRED = 0x00000200,
+ DS_KDC_REQUIRED = 0x00000400,
+ DS_TIMESERV_REQUIRED = 0x00000800,
+ DS_WRITABLE_REQUIRED = 0x00001000,
+ DS_GOOD_TIMESERV_PREFERRED = 0x00002000,
+ DS_AVOID_SELF = 0x00004000,
+ DS_ONLY_LDAP_NEEDED = 0x00008000,
+ DS_IS_FLAT_NAME = 0x00010000,
+ DS_IS_DNS_NAME = 0x00020000,
+ DS_TRY_NEXTCLOSEST_SITE = 0x00040000,
+ DS_DIRECTORY_SERVICE_6_REQUIRED = 0x00080000,
+ DS_RETURN_DNS_NAME = 0x40000000,
+ DS_RETURN_FLAT_NAME = 0x80000000
+ } netr_DsRGetDCName_flags;
+
+ typedef [v1_enum] enum {
+ DS_ADDRESS_TYPE_INET = 1,
+ DS_ADDRESS_TYPE_NETBIOS = 2
+ } 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 = 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 {
+ [string,charset(UTF16)] uint16 *dc_unc;
+ [string,charset(UTF16)] uint16 *dc_address;
+ netr_DsRGetDCNameInfo_AddressType dc_address_type;
+ GUID domain_guid;
+ [string,charset(UTF16)] uint16 *domain_name;
+ [string,charset(UTF16)] uint16 *forest_name;
+ netr_DsR_DcFlags dc_flags;
+ [string,charset(UTF16)] uint16 *dc_site_name;
+ [string,charset(UTF16)] uint16 *client_site_name;
+ } netr_DsRGetDCNameInfo;
+
+ WERROR netr_DsRGetDCName(
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *domain_name,
+ [in,unique] GUID *domain_guid,
+ [in,unique] GUID *site_guid,
+ [in] netr_DsRGetDCName_flags flags,
+ [out,unique] netr_DsRGetDCNameInfo *info
+ );
/*****************/
/* Function 0x15 */
- WERROR netr_NETRLOGONDUMMYROUTINE1();
+ [todo] WERROR netr_NETRLOGONDUMMYROUTINE1();
/****************/
/* Function 0x16 */
- WERROR netr_NETRLOGONSETSERVICEBITS();
+ [todo] WERROR netr_NETRLOGONSETSERVICEBITS();
/****************/
/* Function 0x17 */
- WERROR netr_NETRLOGONGETTRUSTRID();
+ WERROR netr_LogonGetTrustRid(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in,unique] [string,charset(UTF16)] uint16 *domain_name,
+ [out,ref] uint32 *rid
+ );
/****************/
/* Function 0x18 */
- WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
+ [todo] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
/****************/
/* Function 0x19 */
- WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
+ [todo] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
/****************/
/* Function 0x1a */
- NTSTATUS netr_ServerAuthenticate3(
- [in] unistr *server_name,
- [in] unistr account_name,
+ [public] NTSTATUS netr_ServerAuthenticate3(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
- [in] unistr computer_name,
+ [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
);
/****************/
/* Function 0x1b */
- WERROR netr_DSRGETDCNAMEX();
+
+ WERROR netr_DsRGetDCNameEx(
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *domain_name,
+ [in,unique] GUID *domain_guid,
+ [in,unique] [string,charset(UTF16)] uint16 *site_name,
+ [in] netr_DsRGetDCName_flags flags,
+ [out,unique] netr_DsRGetDCNameInfo *info
+ );
/****************/
/* Function 0x1c */
- WERROR netr_DSRGETSITENAME();
+ WERROR netr_DsRGetSiteName(
+ [in,unique] [string,charset(UTF16)] uint16 *computer_name,
+ [out,unique] [string,charset(UTF16)] uint16 *site
+ );
/****************/
/* Function 0x1d */
-
- typedef struct {
- uint32 length;
- [size_is(length)] uint8 *data[];
- } netr_Blob;
+ 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;
uint16 size;
- [size_is(size/2),length_is(length/2)] uint16 *data[];
+ [size_is(size/2),length_is(length/2)] uint16 *data;
} netr_BinaryString;
typedef struct {
netr_Blob blob;
- unistr *workstation_domain;
- unistr *workstation_site;
- unistr *unknown1;
- unistr *unknown2;
- unistr *unknown3;
- unistr *unknown4;
+ [string,charset(UTF16)] uint16 *workstation_domain;
+ [string,charset(UTF16)] uint16 *workstation_site;
+ [string,charset(UTF16)] uint16 *unknown1;
+ [string,charset(UTF16)] uint16 *unknown2;
+ [string,charset(UTF16)] uint16 *unknown3;
+ [string,charset(UTF16)] uint16 *unknown4;
netr_BinaryString blob2;
- netr_String product;
- netr_String unknown5;
- netr_String unknown6;
+ lsa_String product;
+ lsa_String unknown5;
+ lsa_String unknown6;
uint32 unknown7[4];
} netr_DomainQuery1;
} netr_DomainQuery;
typedef struct {
- netr_String domainname;
- netr_String fulldomainname;
- netr_String forest;
+ /* 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? */
+ [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
+ 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(
- [in] unistr server_name,
- [in] unistr *computer_name,
+ [in] [string,charset(UTF16)] uint16 server_name[],
+ [in,unique] [string,charset(UTF16)] uint16 *computer_name,
[in,ref] netr_Authenticator *credential,
[in,out,ref] netr_Authenticator *return_authenticator,
[in] uint32 level,
);
typedef [flag(NDR_PAHEX)] struct {
- uint16 data[256];
+ uint8 data[512];
uint32 length;
} netr_CryptPassword;
/*****************/
/* Function 0x1e */
NTSTATUS netr_ServerPasswordSet2(
- [in] unistr *server_name,
- [in] unistr account_name,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
- [in] unistr computer_name,
+ [in] [string,charset(UTF16)] uint16 computer_name[],
[in] netr_Authenticator credential,
[in] netr_CryptPassword new_password,
[out] netr_Authenticator return_authenticator
/****************/
/* Function 0x1f */
- WERROR netr_NETRSERVERPASSWORDGET();
+ WERROR netr_ServerPasswordGet(
+ [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,ref] netr_Authenticator *credential,
+ [out,ref] netr_Authenticator *return_authenticator,
+ [out,ref] samr_Password *password
+ );
/****************/
/* Function 0x20 */
- WERROR netr_NETRLOGONSENDTOSAM();
+ [todo] WERROR netr_NETRLOGONSENDTOSAM();
/****************/
/* Function 0x21 */
- WERROR netr_DSRADDRESSTOSITENAMESW();
+ typedef struct {
+ uint32 count;
+ [size_is(count)] lsa_String *sitename;
+ } netr_DsRAddressToSitenamesWCtr;
+
+ typedef struct {
+ [size_is(size)] uint8 *buffer;
+ uint32 size;
+ } netr_DsRAddress;
+
+ WERROR netr_DsRAddressToSitenamesW(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in] [range(0,32000)] uint32 count,
+ [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
+ [out] [ref] netr_DsRAddressToSitenamesWCtr **ctr
+ );
/****************/
/* Function 0x22 */
- typedef struct {
- unistr *dc_unc;
- unistr *dc_address;
- int32 dc_address_type;
- GUID domain_guid;
- unistr *domain_name;
- unistr *forest_name;
- uint32 dc_flags;
- unistr *dc_site_name;
- unistr *client_site_name;
- } netr_DrsGetDCNameEx2Info;
-
- WERROR netr_DrsGetDCNameEx2(
- [in] unistr *server_unc,
- [in] unistr *client_account,
- [in] uint32 mask,
- [in] unistr *domain_name,
- [in] GUID *domain_guid,
- [in] unistr *site_name,
- [in] uint32 flags,
- [out] netr_DrsGetDCNameEx2Info *info
+ WERROR netr_DsRGetDCNameEx2(
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *client_account,
+ [in] samr_AcctFlags mask,
+ [in,unique] [string,charset(UTF16)] uint16 *domain_name,
+ [in,unique] GUID *domain_guid,
+ [in,unique] [string,charset(UTF16)] uint16 *site_name,
+ [in] netr_DsRGetDCName_flags flags,
+ [out,unique] netr_DsRGetDCNameInfo *info
);
/****************/
/* Function 0x23 */
- WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
+ [todo] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
/****************/
/* Function 0x24 */
- WERROR netr_NETRENUMERATETRUSTEDDOMAINSEX();
-
- /****************/
- /* Function 0x25 */
- WERROR netr_DSRADDRESSTOSITENAMESEXW();
-
- /****************/
- /* Function 0x26 */
- WERROR netr_DSRGETDCSITECOVERAGEW();
-
- /****************/
- /* Function 0x27 */
- NTSTATUS netr_LogonSamLogonEx(
- [in] unistr *server_name,
- [in] unistr *workstation,
- [in] uint16 logon_level,
- [in] [switch_is(logon_level)] netr_LogonLevel logon,
- [in] uint16 validation_level,
- [out] [switch_is(validation_level)] netr_Validation validation,
- [out] uint8 authoritative,
- [in,out] uint32 flags
- );
-
- /****************/
- /* Function 0x28 */
-
- 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,
} netr_TrustAttributes;
typedef struct {
- unistr *netbios_name;
- unistr *dns_name;
+ [string,charset(UTF16)] uint16 *netbios_name;
+ [string,charset(UTF16)] uint16 *dns_name;
netr_TrustFlags trust_flags;
uint32 parent_index;
netr_TrustType trust_type;
GUID guid;
} netr_DomainTrust;
+ typedef struct {
+ uint32 count;
+ [size_is(count)] netr_DomainTrust *array;
+ } netr_DomainTrustList;
+
+ WERROR netr_NetrEnumerateTrustedDomainsEx(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [out,ref] netr_DomainTrustList *dom_trust_list
+ );
+
+ /****************/
+ /* Function 0x25 */
+ typedef struct {
+ uint32 count;
+ [size_is(count)] lsa_String *sitename;
+ [size_is(count)] lsa_String *subnetname;
+ } netr_DsRAddressToSitenamesExWCtr;
+
+ WERROR netr_DsRAddressToSitenamesExW(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in] [range(0,32000)] uint32 count,
+ [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
+ [out] [ref] netr_DsRAddressToSitenamesExWCtr **ctr
+ );
+
+ /****************/
+ /* Function 0x26 */
+
+ typedef struct {
+ uint32 num_sites;
+ [size_is(num_sites)] [unique] lsa_String *sites;
+ } DcSitesCtr;
+
+ WERROR netr_DsrGetDcSiteCoverageW(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [out,unique] DcSitesCtr *ctr
+ );
+
+ /****************/
+ /* Function 0x27 */
+ NTSTATUS netr_LogonSamLogonEx(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in,unique] [string,charset(UTF16)] uint16 *computer_name,
+ [in] uint16 logon_level,
+ [in] [switch_is(logon_level)] netr_LogonLevel logon,
+ [in] uint16 validation_level,
+ [out] [switch_is(validation_level)] netr_Validation validation,
+ [out] uint8 authoritative,
+ [in,out] uint32 flags
+ );
+
+ /****************/
+ /* Function 0x28 */
+
WERROR netr_DsrEnumerateDomainTrusts(
- [in] unistr *server_name,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
[in] netr_TrustFlags trust_flags,
[out] uint32 count,
- [out,size_is(count)] netr_DomainTrust *trusts[]
+ [out,unique,size_is(count)] netr_DomainTrust *trusts
);
/****************/
/* Function 0x29 */
- WERROR netr_DSRDEREGISTERDNSHOSTRECORDS();
+ WERROR netr_DsrDeregisterDNSHostRecords(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in,unique] [string,charset(UTF16)] uint16 *domain,
+ [in,unique] GUID *domain_guid,
+ [in,unique] GUID *dsa_guid,
+ [in,ref] [string,charset(UTF16)] uint16 *dns_host
+ );
/****************/
/* Function 0x2a */
- WERROR netr_NETRSERVERTRUSTPASSWORDSGET();
+ NTSTATUS netr_ServerTrustPasswordsGet(
+ [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,ref] netr_Authenticator *credential,
+ [out,ref] netr_Authenticator *return_authenticator,
+ [out,ref] samr_Password *password,
+ [out,ref] samr_Password *password2
+ );
/****************/
/* Function 0x2b */
- WERROR netr_DSRGETFORESTTRUSTINFORMATION();
+
+ const int DS_GFTI_UPDATE_TDO = 0x1;
+
+ WERROR netr_DsRGetForestTrustInformation(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in,unique] [string,charset(UTF16)] uint16 *trusted_domain_name,
+ [in] uint32 flags,
+ [out,ref] lsa_ForestTrustInformation **forest_trust_info
+ );
/****************/
/* Function 0x2c */
- WERROR netr_NETRGETFORESTTRUSTINFORMATION();
+ WERROR netr_GetForestTrustInformation(
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [in,ref] [string,charset(UTF16)] uint16 *trusted_domain_name,
+ [in,ref] netr_Authenticator *credential,
+ [out,ref] netr_Authenticator *return_authenticator,
+ [in] uint32 flags,
+ [out,ref] lsa_ForestTrustInformation **forest_trust_info
+ );
/****************/
/* Function 0x2d */
/* this is the ADS varient. I don't yet know what the "flags" are for */
NTSTATUS netr_LogonSamLogonWithFlags(
- [in] unistr *server_name,
- [in] unistr *workstation,
- [in] netr_Authenticator *credential,
- [in][out] netr_Authenticator *return_authenticator,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
+ [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] [switch_is(logon_level)] netr_LogonLevel logon,
[in] uint16 validation_level,
/****************/
/* Function 0x2e */
- WERROR netr_NETRSERVERGETTRUSTINFO();
+ [todo] WERROR netr_NETRSERVERGETTRUSTINFO();
}