| 1 | /*
|
|---|
| 2 | netlogon interface
|
|---|
| 3 | much of this was derived from the ethereal sources - thanks to everyone
|
|---|
| 4 | who contributed!
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | import "misc.idl", "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
|
|---|
| 8 |
|
|---|
| 9 | #include "idl_types.h"
|
|---|
| 10 |
|
|---|
| 11 | cpp_quote("#define netr_DeltaEnum8Bit netr_DeltaEnum")
|
|---|
| 12 | cpp_quote("#define netr_SamDatabaseID8Bit netr_SamDatabaseID")
|
|---|
| 13 |
|
|---|
| 14 | [
|
|---|
| 15 | uuid("12345678-1234-abcd-ef00-01234567cffb"),
|
|---|
| 16 | version(1.0),
|
|---|
| 17 | endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
|
|---|
| 18 | helper("../librpc/ndr/ndr_netlogon.h"),
|
|---|
| 19 | pointer_default(unique)
|
|---|
| 20 | ]
|
|---|
| 21 |
|
|---|
| 22 | interface netlogon
|
|---|
| 23 | {
|
|---|
| 24 | typedef bitmap samr_AcctFlags samr_AcctFlags;
|
|---|
| 25 | typedef bitmap samr_GroupAttrs samr_GroupAttrs;
|
|---|
| 26 | typedef enum netr_DeltaEnum8Bit netr_DeltaEnum8Bit;
|
|---|
| 27 | typedef enum netr_SamDatabaseID8Bit netr_SamDatabaseID8Bit;
|
|---|
| 28 |
|
|---|
| 29 | /*****************/
|
|---|
| 30 | /* Function 0x00 */
|
|---|
| 31 |
|
|---|
| 32 | typedef struct {
|
|---|
| 33 | [string,charset(UTF16)] uint16 *account_name;
|
|---|
| 34 | uint32 priv;
|
|---|
| 35 | uint32 auth_flags;
|
|---|
| 36 | uint32 logon_count;
|
|---|
| 37 | uint32 bad_pw_count;
|
|---|
| 38 | time_t last_logon;
|
|---|
| 39 | time_t last_logoff;
|
|---|
| 40 | time_t logoff_time;
|
|---|
| 41 | time_t kickoff_time;
|
|---|
| 42 | uint32 password_age;
|
|---|
| 43 | time_t pw_can_change;
|
|---|
| 44 | time_t pw_must_change;
|
|---|
| 45 | [string,charset(UTF16)] uint16 *computer;
|
|---|
| 46 | [string,charset(UTF16)] uint16 *domain;
|
|---|
| 47 | [string,charset(UTF16)] uint16 *script_path;
|
|---|
| 48 | uint32 unknown;
|
|---|
| 49 | } netr_UasInfo;
|
|---|
| 50 |
|
|---|
| 51 | WERROR netr_LogonUasLogon(
|
|---|
| 52 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 53 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 54 | [in] [string,charset(UTF16)] uint16 *workstation,
|
|---|
| 55 | [out,ref] netr_UasInfo **info
|
|---|
| 56 | );
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 | /*****************/
|
|---|
| 60 | /* Function 0x01 */
|
|---|
| 61 |
|
|---|
| 62 | typedef struct {
|
|---|
| 63 | uint32 duration;
|
|---|
| 64 | uint16 logon_count;
|
|---|
| 65 | } netr_UasLogoffInfo;
|
|---|
| 66 |
|
|---|
| 67 | WERROR netr_LogonUasLogoff(
|
|---|
| 68 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 69 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 70 | [in] [string,charset(UTF16)] uint16 *workstation,
|
|---|
| 71 | [out,ref] netr_UasLogoffInfo *info
|
|---|
| 72 | );
|
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 | /*****************/
|
|---|
| 76 | /* Function 0x02 */
|
|---|
| 77 |
|
|---|
| 78 | /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
|
|---|
| 79 | that the structure of the bindata looks like this:
|
|---|
| 80 |
|
|---|
| 81 | dlong lockout_duration;
|
|---|
| 82 | udlong reset_count;
|
|---|
| 83 | uint32 bad_attempt_lockout;
|
|---|
| 84 | uint32 dummy;
|
|---|
| 85 |
|
|---|
| 86 | but it doesn't look as though this structure is reflected at the
|
|---|
| 87 | NDR level. Maybe it is left to the application to decode the bindata array.
|
|---|
| 88 | */
|
|---|
| 89 | typedef [public] struct {
|
|---|
| 90 | dlong lockout_duration;
|
|---|
| 91 | udlong reset_count;
|
|---|
| 92 | uint32 bad_attempt_lockout;
|
|---|
| 93 | uint32 dummy;
|
|---|
| 94 | } netr_AcctLockStr;
|
|---|
| 95 |
|
|---|
| 96 | /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
|
|---|
| 97 | * sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
|
|---|
| 98 | * - MSV1_0_UPDATE_LOGON_STATISTICS
|
|---|
| 99 | * sets the logon time on network logon
|
|---|
| 100 | * - MSV1_0_RETURN_USER_PARAMETERS
|
|---|
| 101 | * sets the user parameters in the driveletter
|
|---|
| 102 | * - MSV1_0_RETURN_PROFILE_PATH
|
|---|
| 103 | * returns the profilepath in the driveletter and
|
|---|
| 104 | * sets LOGON_PROFILE_PATH_RETURNED user_flag
|
|---|
| 105 | */
|
|---|
| 106 |
|
|---|
| 107 | typedef [public,bitmap32bit] bitmap {
|
|---|
| 108 | MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x00000002,
|
|---|
| 109 | MSV1_0_UPDATE_LOGON_STATISTICS = 0x00000004,
|
|---|
| 110 | MSV1_0_RETURN_USER_PARAMETERS = 0x00000008,
|
|---|
| 111 | MSV1_0_DONT_TRY_GUEST_ACCOUNT = 0x00000010,
|
|---|
| 112 | MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x00000020,
|
|---|
| 113 | MSV1_0_RETURN_PASSWORD_EXPIRY = 0x00000040,
|
|---|
| 114 | MSV1_0_USE_CLIENT_CHALLENGE = 0x00000080,
|
|---|
| 115 | MSV1_0_TRY_GUEST_ACCOUNT_ONLY = 0x00000100,
|
|---|
| 116 | MSV1_0_RETURN_PROFILE_PATH = 0x00000200,
|
|---|
| 117 | MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY = 0x00000400,
|
|---|
| 118 | MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x00000800,
|
|---|
| 119 | MSV1_0_DISABLE_PERSONAL_FALLBACK = 0x00001000,
|
|---|
| 120 | MSV1_0_ALLOW_FORCE_GUEST = 0x00002000,
|
|---|
| 121 | MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED = 0x00004000,
|
|---|
| 122 | MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY = 0x00008000,
|
|---|
| 123 | MSV1_0_ALLOW_MSVCHAPV2 = 0x00010000,
|
|---|
| 124 | MSV1_0_S4U2SELF = 0x00020000,
|
|---|
| 125 | MSV1_0_CHECK_LOGONHOURS_FOR_S4U = 0x00040000,
|
|---|
| 126 | MSV1_0_SUBAUTHENTICATION_DLL_EX = 0x00100000
|
|---|
| 127 | } netr_LogonParameterControl;
|
|---|
| 128 |
|
|---|
| 129 | typedef struct {
|
|---|
| 130 | lsa_String domain_name;
|
|---|
| 131 | netr_LogonParameterControl parameter_control; /* see MSV1_0_* */
|
|---|
| 132 | uint32 logon_id_low;
|
|---|
| 133 | uint32 logon_id_high;
|
|---|
| 134 | lsa_String account_name;
|
|---|
| 135 | lsa_String workstation;
|
|---|
| 136 | } netr_IdentityInfo;
|
|---|
| 137 |
|
|---|
| 138 | typedef struct {
|
|---|
| 139 | netr_IdentityInfo identity_info;
|
|---|
| 140 | samr_Password lmpassword;
|
|---|
| 141 | samr_Password ntpassword;
|
|---|
| 142 | } netr_PasswordInfo;
|
|---|
| 143 |
|
|---|
| 144 | typedef [flag(NDR_PAHEX)] struct {
|
|---|
| 145 | uint16 length;
|
|---|
| 146 | [value(length)] uint16 size;
|
|---|
| 147 | [size_is(length),length_is(length)] uint8 *data;
|
|---|
| 148 | } netr_ChallengeResponse;
|
|---|
| 149 |
|
|---|
| 150 | typedef [flag(NDR_PAHEX)] struct {
|
|---|
| 151 | netr_IdentityInfo identity_info;
|
|---|
| 152 | uint8 challenge[8];
|
|---|
| 153 | netr_ChallengeResponse nt;
|
|---|
| 154 | netr_ChallengeResponse lm;
|
|---|
| 155 | } netr_NetworkInfo;
|
|---|
| 156 |
|
|---|
| 157 | typedef [flag(NDR_PAHEX)] struct {
|
|---|
| 158 | netr_IdentityInfo identity_info;
|
|---|
| 159 | lsa_String package_name;
|
|---|
| 160 | uint32 length;
|
|---|
| 161 | [size_is(length)] uint8 *data;
|
|---|
| 162 | } netr_GenericInfo;
|
|---|
| 163 |
|
|---|
| 164 | typedef enum {
|
|---|
| 165 | NetlogonInteractiveInformation = 1,
|
|---|
| 166 | NetlogonNetworkInformation = 2,
|
|---|
| 167 | NetlogonServiceInformation = 3,
|
|---|
| 168 | NetlogonGenericInformation = 4,
|
|---|
| 169 | NetlogonInteractiveTransitiveInformation = 5,
|
|---|
| 170 | NetlogonNetworkTransitiveInformation = 6,
|
|---|
| 171 | NetlogonServiceTransitiveInformation = 7
|
|---|
| 172 | } netr_LogonInfoClass;
|
|---|
| 173 |
|
|---|
| 174 | typedef [public,switch_type(netr_LogonInfoClass)] union {
|
|---|
| 175 | [case(NetlogonInteractiveInformation)] netr_PasswordInfo *password;
|
|---|
| 176 | [case(NetlogonNetworkInformation)] netr_NetworkInfo *network;
|
|---|
| 177 | [case(NetlogonServiceInformation)] netr_PasswordInfo *password;
|
|---|
| 178 | [case(NetlogonGenericInformation)] netr_GenericInfo *generic;
|
|---|
| 179 | [case(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password;
|
|---|
| 180 | [case(NetlogonNetworkTransitiveInformation)] netr_NetworkInfo *network;
|
|---|
| 181 | [case(NetlogonServiceTransitiveInformation)] netr_PasswordInfo *password;
|
|---|
| 182 | } netr_LogonLevel;
|
|---|
| 183 |
|
|---|
| 184 | typedef [public,flag(NDR_PAHEX)] struct {
|
|---|
| 185 | uint8 key[16];
|
|---|
| 186 | } netr_UserSessionKey;
|
|---|
| 187 |
|
|---|
| 188 | typedef [public,flag(NDR_PAHEX)] struct {
|
|---|
| 189 | uint8 key[8];
|
|---|
| 190 | } netr_LMSessionKey;
|
|---|
| 191 |
|
|---|
| 192 | /* Flags for user_flags below */
|
|---|
| 193 | typedef [public,bitmap32bit] bitmap {
|
|---|
| 194 | NETLOGON_GUEST = 0x00000001,
|
|---|
| 195 | NETLOGON_NOENCRYPTION = 0x00000002,
|
|---|
| 196 | NETLOGON_CACHED_ACCOUNT = 0x00000004,
|
|---|
| 197 | NETLOGON_USED_LM_PASSWORD = 0x00000008,
|
|---|
| 198 | NETLOGON_EXTRA_SIDS = 0x00000020,
|
|---|
| 199 | NETLOGON_SUBAUTH_SESSION_KEY = 0x00000040,
|
|---|
| 200 | NETLOGON_SERVER_TRUST_ACCOUNT = 0x00000080,
|
|---|
| 201 | NETLOGON_NTLMV2_ENABLED = 0x00000100,
|
|---|
| 202 | NETLOGON_RESOURCE_GROUPS = 0x00000200,
|
|---|
| 203 | NETLOGON_PROFILE_PATH_RETURNED = 0x00000400,
|
|---|
| 204 | NETLOGON_GRACE_LOGON = 0x01000000
|
|---|
| 205 | } netr_UserFlags;
|
|---|
| 206 |
|
|---|
| 207 | typedef struct {
|
|---|
| 208 | NTTIME last_logon;
|
|---|
| 209 | NTTIME last_logoff;
|
|---|
| 210 | NTTIME acct_expiry;
|
|---|
| 211 | NTTIME last_password_change;
|
|---|
| 212 | NTTIME allow_password_change;
|
|---|
| 213 | NTTIME force_password_change;
|
|---|
| 214 | lsa_String account_name;
|
|---|
| 215 | lsa_String full_name;
|
|---|
| 216 | lsa_String logon_script;
|
|---|
| 217 | lsa_String profile_path;
|
|---|
| 218 | lsa_String home_directory;
|
|---|
| 219 | lsa_String home_drive;
|
|---|
| 220 | uint16 logon_count;
|
|---|
| 221 | uint16 bad_password_count;
|
|---|
| 222 | uint32 rid;
|
|---|
| 223 | uint32 primary_gid;
|
|---|
| 224 | samr_RidWithAttributeArray groups;
|
|---|
| 225 | netr_UserFlags user_flags;
|
|---|
| 226 | netr_UserSessionKey key;
|
|---|
| 227 | lsa_StringLarge logon_server;
|
|---|
| 228 | lsa_StringLarge domain;
|
|---|
| 229 | dom_sid2 *domain_sid;
|
|---|
| 230 | netr_LMSessionKey LMSessKey;
|
|---|
| 231 | samr_AcctFlags acct_flags;
|
|---|
| 232 | uint32 unknown[7];
|
|---|
| 233 | } netr_SamBaseInfo;
|
|---|
| 234 |
|
|---|
| 235 | typedef struct {
|
|---|
| 236 | netr_SamBaseInfo base;
|
|---|
| 237 | } netr_SamInfo2;
|
|---|
| 238 |
|
|---|
| 239 | typedef struct {
|
|---|
| 240 | dom_sid2 *sid;
|
|---|
| 241 | samr_GroupAttrs attributes;
|
|---|
| 242 | } netr_SidAttr;
|
|---|
| 243 |
|
|---|
| 244 | typedef [public] struct {
|
|---|
| 245 | netr_SamBaseInfo base;
|
|---|
| 246 | uint32 sidcount;
|
|---|
| 247 | [size_is(sidcount)] netr_SidAttr *sids;
|
|---|
| 248 | } netr_SamInfo3;
|
|---|
| 249 |
|
|---|
| 250 | typedef struct {
|
|---|
| 251 | netr_SamBaseInfo base;
|
|---|
| 252 | uint32 sidcount;
|
|---|
| 253 | [size_is(sidcount)] netr_SidAttr *sids;
|
|---|
| 254 | lsa_String forest;
|
|---|
| 255 | lsa_String principle;
|
|---|
| 256 | uint32 unknown4[20];
|
|---|
| 257 | } netr_SamInfo6;
|
|---|
| 258 |
|
|---|
| 259 | typedef struct {
|
|---|
| 260 | uint32 pac_size;
|
|---|
| 261 | [size_is(pac_size)] uint8 *pac;
|
|---|
| 262 | lsa_String logon_domain;
|
|---|
| 263 | lsa_String logon_server;
|
|---|
| 264 | lsa_String principal_name;
|
|---|
| 265 | uint32 auth_size;
|
|---|
| 266 | [size_is(auth_size)] uint8 *auth;
|
|---|
| 267 | netr_UserSessionKey user_session_key;
|
|---|
| 268 | uint32 expansionroom[10];
|
|---|
| 269 | lsa_String unknown1;
|
|---|
| 270 | lsa_String unknown2;
|
|---|
| 271 | lsa_String unknown3;
|
|---|
| 272 | lsa_String unknown4;
|
|---|
| 273 | } netr_PacInfo;
|
|---|
| 274 |
|
|---|
| 275 | typedef [flag(NDR_PAHEX)] struct {
|
|---|
| 276 | uint32 length;
|
|---|
| 277 | [size_is(length)] uint8 *data;
|
|---|
| 278 | } netr_GenericInfo2;
|
|---|
| 279 |
|
|---|
| 280 | typedef enum {
|
|---|
| 281 | NetlogonValidationUasInfo = 1,
|
|---|
| 282 | NetlogonValidationSamInfo = 2,
|
|---|
| 283 | NetlogonValidationSamInfo2 = 3,
|
|---|
| 284 | NetlogonValidationGenericInfo2 = 5,
|
|---|
| 285 | NetlogonValidationSamInfo4 = 6
|
|---|
| 286 | } netr_ValidationInfoClass;
|
|---|
| 287 |
|
|---|
| 288 | typedef [public,switch_type(uint16)] union {
|
|---|
| 289 | [case(NetlogonValidationSamInfo)] netr_SamInfo2 *sam2;
|
|---|
| 290 | [case(NetlogonValidationSamInfo2)] netr_SamInfo3 *sam3;
|
|---|
| 291 | [case(4)] netr_PacInfo *pac;
|
|---|
| 292 | [case(NetlogonValidationGenericInfo2)] netr_GenericInfo2 *generic;
|
|---|
| 293 | [case(NetlogonValidationSamInfo4)] netr_SamInfo6 *sam6;
|
|---|
| 294 | } netr_Validation;
|
|---|
| 295 |
|
|---|
| 296 | typedef [public, flag(NDR_PAHEX)] struct {
|
|---|
| 297 | uint8 data[8];
|
|---|
| 298 | } netr_Credential;
|
|---|
| 299 |
|
|---|
| 300 | typedef [public] struct {
|
|---|
| 301 | netr_Credential cred;
|
|---|
| 302 | time_t timestamp;
|
|---|
| 303 | } netr_Authenticator;
|
|---|
| 304 |
|
|---|
| 305 | NTSTATUS netr_LogonSamLogon(
|
|---|
| 306 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 307 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 308 | [in,unique] netr_Authenticator *credential,
|
|---|
| 309 | [in,out,unique] netr_Authenticator *return_authenticator,
|
|---|
| 310 | [in] netr_LogonInfoClass logon_level,
|
|---|
| 311 | [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
|
|---|
| 312 | [in] uint16 validation_level,
|
|---|
| 313 | [out,ref] [switch_is(validation_level)] netr_Validation *validation,
|
|---|
| 314 | [out,ref] uint8 *authoritative
|
|---|
| 315 | );
|
|---|
| 316 |
|
|---|
| 317 |
|
|---|
| 318 | /*****************/
|
|---|
| 319 | /* Function 0x03 */
|
|---|
| 320 |
|
|---|
| 321 | NTSTATUS netr_LogonSamLogoff(
|
|---|
| 322 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 323 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 324 | [in,unique] netr_Authenticator *credential,
|
|---|
| 325 | [in,out,unique] netr_Authenticator *return_authenticator,
|
|---|
| 326 | [in] netr_LogonInfoClass logon_level,
|
|---|
| 327 | [in] [switch_is(logon_level)] netr_LogonLevel logon
|
|---|
| 328 | );
|
|---|
| 329 |
|
|---|
| 330 |
|
|---|
| 331 |
|
|---|
| 332 | /*****************/
|
|---|
| 333 | /* Function 0x04 */
|
|---|
| 334 |
|
|---|
| 335 | [public] NTSTATUS netr_ServerReqChallenge(
|
|---|
| 336 | [in,unique,string,charset(UTF16)] uint16 *server_name,
|
|---|
| 337 | [in,string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 338 | [in,ref] netr_Credential *credentials,
|
|---|
| 339 | [out,ref] netr_Credential *return_credentials
|
|---|
| 340 | );
|
|---|
| 341 |
|
|---|
| 342 |
|
|---|
| 343 | /*****************/
|
|---|
| 344 | /* Function 0x05 */
|
|---|
| 345 |
|
|---|
| 346 | typedef enum netr_SchannelType netr_SchannelType;
|
|---|
| 347 |
|
|---|
| 348 | NTSTATUS netr_ServerAuthenticate(
|
|---|
| 349 | [in,unique,string,charset(UTF16)] uint16 *server_name,
|
|---|
| 350 | [in,string,charset(UTF16)] uint16 *account_name,
|
|---|
| 351 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 352 | [in,string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 353 | [in,ref] netr_Credential *credentials,
|
|---|
| 354 | [out,ref] netr_Credential *return_credentials
|
|---|
| 355 | );
|
|---|
| 356 |
|
|---|
| 357 |
|
|---|
| 358 | /*****************/
|
|---|
| 359 | /* Function 0x06 */
|
|---|
| 360 |
|
|---|
| 361 | NTSTATUS netr_ServerPasswordSet(
|
|---|
| 362 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 363 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 364 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 365 | [in] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 366 | [in,ref] netr_Authenticator *credential,
|
|---|
| 367 | [out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 368 | [in,ref] samr_Password *new_password
|
|---|
| 369 | );
|
|---|
| 370 |
|
|---|
| 371 |
|
|---|
| 372 | /*****************/
|
|---|
| 373 | /* Function 0x07 */
|
|---|
| 374 |
|
|---|
| 375 | typedef enum netr_SamDatabaseID netr_SamDatabaseID;
|
|---|
| 376 |
|
|---|
| 377 | typedef struct {
|
|---|
| 378 | [string,charset(UTF16)] uint16 *account_name;
|
|---|
| 379 | lsa_String unknown1;
|
|---|
| 380 | lsa_String unknown2;
|
|---|
| 381 | lsa_String unknown3;
|
|---|
| 382 | lsa_String unknown4;
|
|---|
| 383 | uint32 unknown5;
|
|---|
| 384 | uint32 unknown6;
|
|---|
| 385 | uint32 unknown7;
|
|---|
| 386 | uint32 unknown8;
|
|---|
| 387 | } netr_DELTA_DELETE_USER;
|
|---|
| 388 |
|
|---|
| 389 | typedef struct {
|
|---|
| 390 | uint16 length;
|
|---|
| 391 | [value(length)] uint16 size;
|
|---|
| 392 | uint32 flags;
|
|---|
| 393 | samr_Password pwd;
|
|---|
| 394 | } netr_USER_KEY16;
|
|---|
| 395 |
|
|---|
| 396 | typedef struct {
|
|---|
| 397 | uint16 nt_length;
|
|---|
| 398 | [value(nt_length)] uint16 nt_size;
|
|---|
| 399 | uint32 nt_flags;
|
|---|
| 400 | uint16 lm_length;
|
|---|
| 401 | [value(lm_length)] uint16 lm_size;
|
|---|
| 402 | uint32 lm_flags;
|
|---|
| 403 | uint8 nt_history[nt_length];
|
|---|
| 404 | uint8 lm_history[lm_length];
|
|---|
| 405 | } netr_PasswordHistory;
|
|---|
| 406 |
|
|---|
| 407 | typedef struct {
|
|---|
| 408 | netr_USER_KEY16 lmpassword;
|
|---|
| 409 | netr_USER_KEY16 ntpassword;
|
|---|
| 410 | netr_PasswordHistory history;
|
|---|
| 411 | } netr_USER_KEYS2;
|
|---|
| 412 |
|
|---|
| 413 | typedef struct { /* TODO: make this a union! */
|
|---|
| 414 | netr_USER_KEYS2 keys2;
|
|---|
| 415 | } netr_USER_KEY_UNION;
|
|---|
| 416 |
|
|---|
| 417 | typedef [public] struct {
|
|---|
| 418 | uint32 version;
|
|---|
| 419 | netr_USER_KEY_UNION keys;
|
|---|
| 420 | } netr_USER_KEYS;
|
|---|
| 421 |
|
|---|
| 422 | typedef struct {
|
|---|
| 423 | boolean8 SensitiveDataFlag;
|
|---|
| 424 | uint32 DataLength;
|
|---|
| 425 |
|
|---|
| 426 | /* netr_USER_KEYS encrypted with the session key */
|
|---|
| 427 | [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
|
|---|
| 428 | } netr_USER_PRIVATE_INFO;
|
|---|
| 429 |
|
|---|
| 430 | typedef struct {
|
|---|
| 431 | lsa_String account_name;
|
|---|
| 432 | lsa_String full_name;
|
|---|
| 433 | uint32 rid;
|
|---|
| 434 | uint32 primary_gid;
|
|---|
| 435 | lsa_String home_directory;
|
|---|
| 436 | lsa_String home_drive;
|
|---|
| 437 | lsa_String logon_script;
|
|---|
| 438 | lsa_String description;
|
|---|
| 439 | lsa_String workstations;
|
|---|
| 440 | NTTIME last_logon;
|
|---|
| 441 | NTTIME last_logoff;
|
|---|
| 442 | samr_LogonHours logon_hours;
|
|---|
| 443 | uint16 bad_password_count;
|
|---|
| 444 | uint16 logon_count;
|
|---|
| 445 | NTTIME last_password_change;
|
|---|
| 446 | NTTIME acct_expiry;
|
|---|
| 447 | samr_AcctFlags acct_flags;
|
|---|
| 448 | samr_Password lmpassword;
|
|---|
| 449 | samr_Password ntpassword;
|
|---|
| 450 | boolean8 nt_password_present;
|
|---|
| 451 | boolean8 lm_password_present;
|
|---|
| 452 | boolean8 password_expired;
|
|---|
| 453 | lsa_String comment;
|
|---|
| 454 | lsa_BinaryString parameters;
|
|---|
| 455 | uint16 country_code;
|
|---|
| 456 | uint16 code_page;
|
|---|
| 457 | netr_USER_PRIVATE_INFO user_private_info;
|
|---|
| 458 | uint32 SecurityInformation;
|
|---|
| 459 | sec_desc_buf sdbuf;
|
|---|
| 460 | lsa_String profile_path;
|
|---|
| 461 | lsa_String unknown2;
|
|---|
| 462 | lsa_String unknown3;
|
|---|
| 463 | lsa_String unknown4;
|
|---|
| 464 | uint32 unknown5;
|
|---|
| 465 | uint32 unknown6;
|
|---|
| 466 | uint32 unknown7;
|
|---|
| 467 | uint32 unknown8;
|
|---|
| 468 | } netr_DELTA_USER;
|
|---|
| 469 |
|
|---|
| 470 | typedef struct {
|
|---|
| 471 | lsa_String domain_name;
|
|---|
| 472 | lsa_String oem_information; /* comment */
|
|---|
| 473 | dlong force_logoff_time;
|
|---|
| 474 | uint16 min_password_length;
|
|---|
| 475 | uint16 password_history_length;
|
|---|
| 476 | /* yes, these are signed. They are in negative 100ns */
|
|---|
| 477 | dlong max_password_age;
|
|---|
| 478 | dlong min_password_age;
|
|---|
| 479 | udlong sequence_num;
|
|---|
| 480 | NTTIME domain_create_time;
|
|---|
| 481 | uint32 SecurityInformation;
|
|---|
| 482 | sec_desc_buf sdbuf;
|
|---|
| 483 | lsa_BinaryString account_lockout;
|
|---|
| 484 | lsa_String unknown2;
|
|---|
| 485 | lsa_String unknown3;
|
|---|
| 486 | lsa_String unknown4;
|
|---|
| 487 | uint32 logon_to_chgpass;
|
|---|
| 488 | uint32 unknown6;
|
|---|
| 489 | uint32 unknown7;
|
|---|
| 490 | uint32 unknown8;
|
|---|
| 491 | } netr_DELTA_DOMAIN;
|
|---|
| 492 |
|
|---|
| 493 | typedef struct {
|
|---|
| 494 | lsa_String group_name;
|
|---|
| 495 | uint32 rid;
|
|---|
| 496 | uint32 attributes;
|
|---|
| 497 | lsa_String description;
|
|---|
| 498 | uint32 SecurityInformation;
|
|---|
| 499 | sec_desc_buf sdbuf;
|
|---|
| 500 | lsa_String unknown1;
|
|---|
| 501 | lsa_String unknown2;
|
|---|
| 502 | lsa_String unknown3;
|
|---|
| 503 | lsa_String unknown4;
|
|---|
| 504 | uint32 unknown5;
|
|---|
| 505 | uint32 unknown6;
|
|---|
| 506 | uint32 unknown7;
|
|---|
| 507 | uint32 unknown8;
|
|---|
| 508 | } netr_DELTA_GROUP;
|
|---|
| 509 |
|
|---|
| 510 | typedef struct {
|
|---|
| 511 | lsa_String OldName;
|
|---|
| 512 | lsa_String NewName;
|
|---|
| 513 | lsa_String unknown1;
|
|---|
| 514 | lsa_String unknown2;
|
|---|
| 515 | lsa_String unknown3;
|
|---|
| 516 | lsa_String unknown4;
|
|---|
| 517 | uint32 unknown5;
|
|---|
| 518 | uint32 unknown6;
|
|---|
| 519 | uint32 unknown7;
|
|---|
| 520 | uint32 unknown8;
|
|---|
| 521 | } netr_DELTA_RENAME;
|
|---|
| 522 |
|
|---|
| 523 | typedef struct {
|
|---|
| 524 | [size_is(num_rids)] uint32 *rids;
|
|---|
| 525 | [size_is(num_rids)] uint32 *attribs;
|
|---|
| 526 | uint32 num_rids;
|
|---|
| 527 | uint32 unknown1;
|
|---|
| 528 | uint32 unknown2;
|
|---|
| 529 | uint32 unknown3;
|
|---|
| 530 | uint32 unknown4;
|
|---|
| 531 | } netr_DELTA_GROUP_MEMBER;
|
|---|
| 532 |
|
|---|
| 533 | typedef struct {
|
|---|
| 534 | lsa_String alias_name;
|
|---|
| 535 | uint32 rid;
|
|---|
| 536 | uint32 SecurityInformation;
|
|---|
| 537 | sec_desc_buf sdbuf;
|
|---|
| 538 | lsa_String description;
|
|---|
| 539 | lsa_String unknown2;
|
|---|
| 540 | lsa_String unknown3;
|
|---|
| 541 | lsa_String unknown4;
|
|---|
| 542 | uint32 unknown5;
|
|---|
| 543 | uint32 unknown6;
|
|---|
| 544 | uint32 unknown7;
|
|---|
| 545 | uint32 unknown8;
|
|---|
| 546 | } netr_DELTA_ALIAS;
|
|---|
| 547 |
|
|---|
| 548 | typedef struct {
|
|---|
| 549 | lsa_SidArray sids;
|
|---|
| 550 | uint32 unknown1;
|
|---|
| 551 | uint32 unknown2;
|
|---|
| 552 | uint32 unknown3;
|
|---|
| 553 | uint32 unknown4;
|
|---|
| 554 | } netr_DELTA_ALIAS_MEMBER;
|
|---|
| 555 |
|
|---|
| 556 | typedef struct {
|
|---|
| 557 | uint32 pagedpoollimit;
|
|---|
| 558 | uint32 nonpagedpoollimit;
|
|---|
| 559 | uint32 minimumworkingsetsize;
|
|---|
| 560 | uint32 maximumworkingsetsize;
|
|---|
| 561 | uint32 pagefilelimit;
|
|---|
| 562 | NTTIME timelimit;
|
|---|
| 563 | } netr_QUOTA_LIMITS;
|
|---|
| 564 |
|
|---|
| 565 | typedef struct {
|
|---|
| 566 | uint32 maxlogsize;
|
|---|
| 567 | NTTIME auditretentionperiod;
|
|---|
| 568 | boolean8 auditingmode;
|
|---|
| 569 | uint32 maxauditeventcount;
|
|---|
| 570 | [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
|
|---|
| 571 | lsa_String primary_domain_name;
|
|---|
| 572 | dom_sid2 *sid;
|
|---|
| 573 | netr_QUOTA_LIMITS quota_limits;
|
|---|
| 574 | udlong sequence_num;
|
|---|
| 575 | NTTIME db_create_time;
|
|---|
| 576 | uint32 SecurityInformation;
|
|---|
| 577 | sec_desc_buf sdbuf;
|
|---|
| 578 | lsa_String unknown1;
|
|---|
| 579 | lsa_String unknown2;
|
|---|
| 580 | lsa_String unknown3;
|
|---|
| 581 | lsa_String unknown4;
|
|---|
| 582 | uint32 unknown5;
|
|---|
| 583 | uint32 unknown6;
|
|---|
| 584 | uint32 unknown7;
|
|---|
| 585 | uint32 unknown8;
|
|---|
| 586 | } netr_DELTA_POLICY;
|
|---|
| 587 |
|
|---|
| 588 | typedef struct {
|
|---|
| 589 | lsa_String domain_name;
|
|---|
| 590 | uint32 num_controllers;
|
|---|
| 591 | [size_is(num_controllers)] lsa_String *controller_names;
|
|---|
| 592 | uint32 SecurityInformation;
|
|---|
| 593 | sec_desc_buf sdbuf;
|
|---|
| 594 | lsa_String unknown1;
|
|---|
| 595 | lsa_String unknown2;
|
|---|
| 596 | lsa_String unknown3;
|
|---|
| 597 | lsa_String unknown4;
|
|---|
| 598 | uint32 posix_offset;
|
|---|
| 599 | uint32 unknown6;
|
|---|
| 600 | uint32 unknown7;
|
|---|
| 601 | uint32 unknown8;
|
|---|
| 602 | } netr_DELTA_TRUSTED_DOMAIN;
|
|---|
| 603 |
|
|---|
| 604 | typedef struct {
|
|---|
| 605 | uint16 unknown;
|
|---|
| 606 | } netr_DELTA_DELETE_TRUST;
|
|---|
| 607 |
|
|---|
| 608 | typedef struct {
|
|---|
| 609 | uint32 privilege_entries;
|
|---|
| 610 | uint32 privilege_control;
|
|---|
| 611 | [size_is(privilege_entries)] uint32 *privilege_attrib;
|
|---|
| 612 | [size_is(privilege_entries)] lsa_String *privilege_name;
|
|---|
| 613 | netr_QUOTA_LIMITS quotalimits;
|
|---|
| 614 | uint32 system_flags;
|
|---|
| 615 | uint32 SecurityInformation;
|
|---|
| 616 | sec_desc_buf sdbuf;
|
|---|
| 617 | lsa_String unknown1;
|
|---|
| 618 | lsa_String unknown2;
|
|---|
| 619 | lsa_String unknown3;
|
|---|
| 620 | lsa_String unknown4;
|
|---|
| 621 | uint32 unknown5;
|
|---|
| 622 | uint32 unknown6;
|
|---|
| 623 | uint32 unknown7;
|
|---|
| 624 | uint32 unknown8;
|
|---|
| 625 | } netr_DELTA_ACCOUNT;
|
|---|
| 626 |
|
|---|
| 627 | typedef struct {
|
|---|
| 628 | uint16 unknown;
|
|---|
| 629 | } netr_DELTA_DELETE_ACCOUNT;
|
|---|
| 630 |
|
|---|
| 631 | typedef struct {
|
|---|
| 632 | uint16 unknown;
|
|---|
| 633 | } netr_DELTA_DELETE_SECRET;
|
|---|
| 634 |
|
|---|
| 635 | typedef struct {
|
|---|
| 636 | uint32 len;
|
|---|
| 637 | uint32 maxlen;
|
|---|
| 638 | [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
|
|---|
| 639 | } netr_CIPHER_VALUE;
|
|---|
| 640 |
|
|---|
| 641 | typedef struct {
|
|---|
| 642 | netr_CIPHER_VALUE current_cipher;
|
|---|
| 643 | NTTIME current_cipher_set_time;
|
|---|
| 644 | netr_CIPHER_VALUE old_cipher;
|
|---|
| 645 | NTTIME old_cipher_set_time;
|
|---|
| 646 | uint32 SecurityInformation;
|
|---|
| 647 | sec_desc_buf sdbuf;
|
|---|
| 648 | lsa_String unknown1;
|
|---|
| 649 | lsa_String unknown2;
|
|---|
| 650 | lsa_String unknown3;
|
|---|
| 651 | lsa_String unknown4;
|
|---|
| 652 | uint32 unknown5;
|
|---|
| 653 | uint32 unknown6;
|
|---|
| 654 | uint32 unknown7;
|
|---|
| 655 | uint32 unknown8;
|
|---|
| 656 | } netr_DELTA_SECRET;
|
|---|
| 657 |
|
|---|
| 658 | typedef enum {
|
|---|
| 659 | NETR_DELTA_DOMAIN = 1,
|
|---|
| 660 | NETR_DELTA_GROUP = 2,
|
|---|
| 661 | NETR_DELTA_DELETE_GROUP = 3,
|
|---|
| 662 | NETR_DELTA_RENAME_GROUP = 4,
|
|---|
| 663 | NETR_DELTA_USER = 5,
|
|---|
| 664 | NETR_DELTA_DELETE_USER = 6,
|
|---|
| 665 | NETR_DELTA_RENAME_USER = 7,
|
|---|
| 666 | NETR_DELTA_GROUP_MEMBER = 8,
|
|---|
| 667 | NETR_DELTA_ALIAS = 9,
|
|---|
| 668 | NETR_DELTA_DELETE_ALIAS = 10,
|
|---|
| 669 | NETR_DELTA_RENAME_ALIAS = 11,
|
|---|
| 670 | NETR_DELTA_ALIAS_MEMBER = 12,
|
|---|
| 671 | NETR_DELTA_POLICY = 13,
|
|---|
| 672 | NETR_DELTA_TRUSTED_DOMAIN = 14,
|
|---|
| 673 | NETR_DELTA_DELETE_TRUST = 15,
|
|---|
| 674 | NETR_DELTA_ACCOUNT = 16,
|
|---|
| 675 | NETR_DELTA_DELETE_ACCOUNT = 17,
|
|---|
| 676 | NETR_DELTA_SECRET = 18,
|
|---|
| 677 | NETR_DELTA_DELETE_SECRET = 19,
|
|---|
| 678 | NETR_DELTA_DELETE_GROUP2 = 20,
|
|---|
| 679 | NETR_DELTA_DELETE_USER2 = 21,
|
|---|
| 680 | NETR_DELTA_MODIFY_COUNT = 22
|
|---|
| 681 | } netr_DeltaEnum;
|
|---|
| 682 |
|
|---|
| 683 | typedef [switch_type(netr_DeltaEnum)] union {
|
|---|
| 684 | [case(NETR_DELTA_DOMAIN)] netr_DELTA_DOMAIN *domain;
|
|---|
| 685 | [case(NETR_DELTA_GROUP)] netr_DELTA_GROUP *group;
|
|---|
| 686 | [case(NETR_DELTA_DELETE_GROUP)] ; /* rid only */
|
|---|
| 687 | [case(NETR_DELTA_RENAME_GROUP)] netr_DELTA_RENAME *rename_group;
|
|---|
| 688 | [case(NETR_DELTA_USER)] netr_DELTA_USER *user;
|
|---|
| 689 | [case(NETR_DELTA_DELETE_USER)] ; /* rid only */
|
|---|
| 690 | [case(NETR_DELTA_RENAME_USER)] netr_DELTA_RENAME *rename_user;
|
|---|
| 691 | [case(NETR_DELTA_GROUP_MEMBER)] netr_DELTA_GROUP_MEMBER *group_member;
|
|---|
| 692 | [case(NETR_DELTA_ALIAS)] netr_DELTA_ALIAS *alias;
|
|---|
| 693 | [case(NETR_DELTA_DELETE_ALIAS)] ; /* rid only */
|
|---|
| 694 | [case(NETR_DELTA_RENAME_ALIAS)] netr_DELTA_RENAME *rename_alias;
|
|---|
| 695 | [case(NETR_DELTA_ALIAS_MEMBER)] netr_DELTA_ALIAS_MEMBER *alias_member;
|
|---|
| 696 | [case(NETR_DELTA_POLICY)] netr_DELTA_POLICY *policy;
|
|---|
| 697 | [case(NETR_DELTA_TRUSTED_DOMAIN)] netr_DELTA_TRUSTED_DOMAIN *trusted_domain;
|
|---|
| 698 | [case(NETR_DELTA_DELETE_TRUST)] netr_DELTA_DELETE_TRUST delete_trust;
|
|---|
| 699 | [case(NETR_DELTA_ACCOUNT)] netr_DELTA_ACCOUNT *account;
|
|---|
| 700 | [case(NETR_DELTA_DELETE_ACCOUNT)] netr_DELTA_DELETE_ACCOUNT delete_account;
|
|---|
| 701 | [case(NETR_DELTA_SECRET)] netr_DELTA_SECRET *secret;
|
|---|
| 702 | [case(NETR_DELTA_DELETE_SECRET)] netr_DELTA_DELETE_SECRET delete_secret;
|
|---|
| 703 | [case(NETR_DELTA_DELETE_GROUP2)] netr_DELTA_DELETE_USER *delete_group;
|
|---|
| 704 | [case(NETR_DELTA_DELETE_USER2)] netr_DELTA_DELETE_USER *delete_user;
|
|---|
| 705 | [case(NETR_DELTA_MODIFY_COUNT)] udlong *modified_count;
|
|---|
| 706 | } netr_DELTA_UNION;
|
|---|
| 707 |
|
|---|
| 708 | typedef [switch_type(netr_DeltaEnum)] union {
|
|---|
| 709 | [case(NETR_DELTA_DOMAIN)] uint32 rid;
|
|---|
| 710 | [case(NETR_DELTA_GROUP)] uint32 rid;
|
|---|
| 711 | [case(NETR_DELTA_DELETE_GROUP)] uint32 rid;
|
|---|
| 712 | [case(NETR_DELTA_RENAME_GROUP)] uint32 rid;
|
|---|
| 713 | [case(NETR_DELTA_USER)] uint32 rid;
|
|---|
| 714 | [case(NETR_DELTA_DELETE_USER)] uint32 rid;
|
|---|
| 715 | [case(NETR_DELTA_RENAME_USER)] uint32 rid;
|
|---|
| 716 | [case(NETR_DELTA_GROUP_MEMBER)] uint32 rid;
|
|---|
| 717 | [case(NETR_DELTA_ALIAS)] uint32 rid;
|
|---|
| 718 | [case(NETR_DELTA_DELETE_ALIAS)] uint32 rid;
|
|---|
| 719 | [case(NETR_DELTA_RENAME_ALIAS)] uint32 rid;
|
|---|
| 720 | [case(NETR_DELTA_ALIAS_MEMBER)] uint32 rid;
|
|---|
| 721 | [case(NETR_DELTA_POLICY)] dom_sid2 *sid;
|
|---|
| 722 | [case(NETR_DELTA_TRUSTED_DOMAIN)] dom_sid2 *sid;
|
|---|
| 723 | [case(NETR_DELTA_DELETE_TRUST)] dom_sid2 *sid;
|
|---|
| 724 | [case(NETR_DELTA_ACCOUNT)] dom_sid2 *sid;
|
|---|
| 725 | [case(NETR_DELTA_DELETE_ACCOUNT)] dom_sid2 *sid;
|
|---|
| 726 | [case(NETR_DELTA_SECRET)] [string,charset(UTF16)] uint16 *name;
|
|---|
| 727 | [case(NETR_DELTA_DELETE_SECRET)] [string,charset(UTF16)] uint16 *name;
|
|---|
| 728 | [case(NETR_DELTA_DELETE_GROUP2)] uint32 rid;
|
|---|
| 729 | [case(NETR_DELTA_DELETE_USER2)] uint32 rid;
|
|---|
| 730 | [case(NETR_DELTA_MODIFY_COUNT)] ;
|
|---|
| 731 | } netr_DELTA_ID_UNION;
|
|---|
| 732 |
|
|---|
| 733 | typedef struct {
|
|---|
| 734 | netr_DeltaEnum delta_type;
|
|---|
| 735 | [switch_is(delta_type)] netr_DELTA_ID_UNION delta_id_union;
|
|---|
| 736 | [switch_is(delta_type)] netr_DELTA_UNION delta_union;
|
|---|
| 737 | } netr_DELTA_ENUM;
|
|---|
| 738 |
|
|---|
| 739 | typedef struct {
|
|---|
| 740 | uint32 num_deltas;
|
|---|
| 741 | [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
|
|---|
| 742 | } netr_DELTA_ENUM_ARRAY;
|
|---|
| 743 |
|
|---|
| 744 | NTSTATUS netr_DatabaseDeltas(
|
|---|
| 745 | [in] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 746 | [in] [string,charset(UTF16)] uint16 *computername,
|
|---|
| 747 | [in,ref] netr_Authenticator *credential,
|
|---|
| 748 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 749 | [in] netr_SamDatabaseID database_id,
|
|---|
| 750 | [in,out,ref] udlong *sequence_num,
|
|---|
| 751 | [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
|
|---|
| 752 | [in] uint32 preferredmaximumlength
|
|---|
| 753 | );
|
|---|
| 754 |
|
|---|
| 755 |
|
|---|
| 756 | /*****************/
|
|---|
| 757 | /* Function 0x08 */
|
|---|
| 758 |
|
|---|
| 759 | NTSTATUS netr_DatabaseSync(
|
|---|
| 760 | [in] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 761 | [in] [string,charset(UTF16)] uint16 *computername,
|
|---|
| 762 | [in,ref] netr_Authenticator *credential,
|
|---|
| 763 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 764 | [in] netr_SamDatabaseID database_id,
|
|---|
| 765 | [in,out,ref] uint32 *sync_context,
|
|---|
| 766 | [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
|
|---|
| 767 | [in] uint32 preferredmaximumlength
|
|---|
| 768 | );
|
|---|
| 769 |
|
|---|
| 770 |
|
|---|
| 771 | /*****************/
|
|---|
| 772 | /* Function 0x09 */
|
|---|
| 773 |
|
|---|
| 774 | /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
|
|---|
| 775 |
|
|---|
| 776 | typedef [flag(NDR_PAHEX)] struct {
|
|---|
| 777 | uint8 computer_name[16];
|
|---|
| 778 | uint32 timecreated;
|
|---|
| 779 | uint32 serial_number;
|
|---|
| 780 | } netr_UAS_INFO_0;
|
|---|
| 781 |
|
|---|
| 782 | typedef struct {
|
|---|
| 783 | [flag(NDR_REMAINING)] DATA_BLOB blob;
|
|---|
| 784 | } netr_AccountBuffer;
|
|---|
| 785 |
|
|---|
| 786 | NTSTATUS netr_AccountDeltas(
|
|---|
| 787 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 788 | [in] [string,charset(UTF16)] uint16 *computername,
|
|---|
| 789 | [in] netr_Authenticator credential,
|
|---|
| 790 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 791 | [in] netr_UAS_INFO_0 uas,
|
|---|
| 792 | [in] uint32 count,
|
|---|
| 793 | [in] uint32 level,
|
|---|
| 794 | [in] uint32 buffersize,
|
|---|
| 795 | [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
|
|---|
| 796 | [out,ref] uint32 *count_returned,
|
|---|
| 797 | [out,ref] uint32 *total_entries,
|
|---|
| 798 | [out,ref] netr_UAS_INFO_0 *recordid
|
|---|
| 799 | );
|
|---|
| 800 |
|
|---|
| 801 |
|
|---|
| 802 | /*****************/
|
|---|
| 803 | /* Function 0x0A */
|
|---|
| 804 |
|
|---|
| 805 | NTSTATUS netr_AccountSync(
|
|---|
| 806 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 807 | [in] [string,charset(UTF16)] uint16 *computername,
|
|---|
| 808 | [in] netr_Authenticator credential,
|
|---|
| 809 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 810 | [in] uint32 reference,
|
|---|
| 811 | [in] uint32 level,
|
|---|
| 812 | [in] uint32 buffersize,
|
|---|
| 813 | [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
|
|---|
| 814 | [out,ref] uint32 *count_returned,
|
|---|
| 815 | [out,ref] uint32 *total_entries,
|
|---|
| 816 | [out,ref] uint32 *next_reference,
|
|---|
| 817 | [in,out,ref] netr_UAS_INFO_0 *recordid
|
|---|
| 818 | );
|
|---|
| 819 |
|
|---|
| 820 |
|
|---|
| 821 | /*****************/
|
|---|
| 822 | /* Function 0x0B */
|
|---|
| 823 |
|
|---|
| 824 | WERROR netr_GetDcName(
|
|---|
| 825 | [in] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 826 | [in,unique] [string,charset(UTF16)] uint16 *domainname,
|
|---|
| 827 | [out,ref] [string,charset(UTF16)] uint16 **dcname
|
|---|
| 828 | );
|
|---|
| 829 |
|
|---|
| 830 | /*****************/
|
|---|
| 831 | /* Function 0x0C */
|
|---|
| 832 |
|
|---|
| 833 | typedef [bitmap32bit] bitmap {
|
|---|
| 834 | NETLOGON_REPLICATION_NEEDED = 0x00000001,
|
|---|
| 835 | NETLOGON_REPLICATION_IN_PROGRESS = 0x00000002,
|
|---|
| 836 | NETLOGON_FULL_SYNC_REPLICATION = 0x00000004,
|
|---|
| 837 | NETLOGON_REDO_NEEDED = 0x00000008,
|
|---|
| 838 | NETLOGON_HAS_IP = 0x00000010,
|
|---|
| 839 | NETLOGON_HAS_TIMESERV = 0x00000020,
|
|---|
| 840 | NETLOGON_DNS_UPDATE_FAILURE = 0x00000040,
|
|---|
| 841 | NETLOGON_VERIFY_STATUS_RETURNED = 0x00000080
|
|---|
| 842 | } netr_InfoFlags;
|
|---|
| 843 |
|
|---|
| 844 | typedef struct {
|
|---|
| 845 | netr_InfoFlags flags;
|
|---|
| 846 | WERROR pdc_connection_status;
|
|---|
| 847 | } netr_NETLOGON_INFO_1;
|
|---|
| 848 |
|
|---|
| 849 | typedef struct {
|
|---|
| 850 | netr_InfoFlags flags;
|
|---|
| 851 | WERROR pdc_connection_status;
|
|---|
| 852 | [string,charset(UTF16)] uint16 *trusted_dc_name;
|
|---|
| 853 | WERROR tc_connection_status;
|
|---|
| 854 | } netr_NETLOGON_INFO_2;
|
|---|
| 855 |
|
|---|
| 856 | typedef struct {
|
|---|
| 857 | netr_InfoFlags flags;
|
|---|
| 858 | uint32 logon_attempts;
|
|---|
| 859 | uint32 unknown1;
|
|---|
| 860 | uint32 unknown2;
|
|---|
| 861 | uint32 unknown3;
|
|---|
| 862 | uint32 unknown4;
|
|---|
| 863 | uint32 unknown5;
|
|---|
| 864 | } netr_NETLOGON_INFO_3;
|
|---|
| 865 |
|
|---|
| 866 | typedef struct {
|
|---|
| 867 | [string,charset(UTF16)] uint16 *trusted_dc_name;
|
|---|
| 868 | [string,charset(UTF16)] uint16 *trusted_domain_name;
|
|---|
| 869 | } netr_NETLOGON_INFO_4;
|
|---|
| 870 |
|
|---|
| 871 | typedef union {
|
|---|
| 872 | [case(1)] netr_NETLOGON_INFO_1 *info1;
|
|---|
| 873 | [case(2)] netr_NETLOGON_INFO_2 *info2;
|
|---|
| 874 | [case(3)] netr_NETLOGON_INFO_3 *info3;
|
|---|
| 875 | [case(4)] netr_NETLOGON_INFO_4 *info4;
|
|---|
| 876 | [default] ;
|
|---|
| 877 | } netr_CONTROL_QUERY_INFORMATION;
|
|---|
| 878 |
|
|---|
| 879 | /* function_code values */
|
|---|
| 880 | typedef [v1_enum] enum {
|
|---|
| 881 | NETLOGON_CONTROL_QUERY = 0x00000001,
|
|---|
| 882 | NETLOGON_CONTROL_REPLICATE = 0x00000002,
|
|---|
| 883 | NETLOGON_CONTROL_SYNCHRONIZE = 0x00000003,
|
|---|
| 884 | NETLOGON_CONTROL_PDC_REPLICATE = 0x00000004,
|
|---|
| 885 | NETLOGON_CONTROL_REDISCOVER = 0x00000005,
|
|---|
| 886 | NETLOGON_CONTROL_TC_QUERY = 0x00000006,
|
|---|
| 887 | NETLOGON_CONTROL_TRANSPORT_NOTIFY = 0x00000007,
|
|---|
| 888 | NETLOGON_CONTROL_FIND_USER = 0x00000008,
|
|---|
| 889 | NETLOGON_CONTROL_CHANGE_PASSWORD = 0x00000009,
|
|---|
| 890 | NETLOGON_CONTROL_TC_VERIFY = 0x0000000A,
|
|---|
| 891 | NETLOGON_CONTROL_FORCE_DNS_REG = 0x0000000B,
|
|---|
| 892 | NETLOGON_CONTROL_QUERY_DNS_REG = 0x0000000C,
|
|---|
| 893 | NETLOGON_CONTROL_BACKUP_CHANGE_LOG = 0x0000FFFC,
|
|---|
| 894 | NETLOGON_CONTROL_TRUNCATE_LOG = 0x0000FFFD,
|
|---|
| 895 | NETLOGON_CONTROL_SET_DBFLAG = 0x0000FFFE,
|
|---|
| 896 | NETLOGON_CONTROL_BREAKPOINT = 0x0000FFFF
|
|---|
| 897 | } netr_LogonControlCode;
|
|---|
| 898 |
|
|---|
| 899 | WERROR netr_LogonControl(
|
|---|
| 900 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 901 | [in] netr_LogonControlCode function_code,
|
|---|
| 902 | [in] uint32 level,
|
|---|
| 903 | [out,ref,switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
|
|---|
| 904 | );
|
|---|
| 905 |
|
|---|
| 906 |
|
|---|
| 907 | /*****************/
|
|---|
| 908 | /* Function 0x0D */
|
|---|
| 909 |
|
|---|
| 910 | WERROR netr_GetAnyDCName(
|
|---|
| 911 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 912 | [in,unique] [string,charset(UTF16)] uint16 *domainname,
|
|---|
| 913 | [out,ref] [string,charset(UTF16)] uint16 **dcname
|
|---|
| 914 | );
|
|---|
| 915 |
|
|---|
| 916 |
|
|---|
| 917 | /*****************/
|
|---|
| 918 | /* Function 0x0E */
|
|---|
| 919 |
|
|---|
| 920 | typedef union {
|
|---|
| 921 | [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
|
|---|
| 922 | [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
|
|---|
| 923 | [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
|
|---|
| 924 | [case(NETLOGON_CONTROL_CHANGE_PASSWORD)] [string,charset(UTF16)] uint16 *domain;
|
|---|
| 925 | [case(NETLOGON_CONTROL_TC_VERIFY)] [string,charset(UTF16)] uint16 *domain;
|
|---|
| 926 | [case(NETLOGON_CONTROL_FIND_USER)] [string,charset(UTF16)] uint16 *user;
|
|---|
| 927 | [case(NETLOGON_CONTROL_SET_DBFLAG)] uint32 debug_level;
|
|---|
| 928 | [default] ;
|
|---|
| 929 | } netr_CONTROL_DATA_INFORMATION;
|
|---|
| 930 |
|
|---|
| 931 | WERROR netr_LogonControl2(
|
|---|
| 932 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 933 | [in] netr_LogonControlCode function_code,
|
|---|
| 934 | [in] uint32 level,
|
|---|
| 935 | [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
|
|---|
| 936 | [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
|
|---|
| 937 | );
|
|---|
| 938 |
|
|---|
| 939 |
|
|---|
| 940 | /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
|
|---|
| 941 | * session keys are encrypted with DES calls. (And the user session key
|
|---|
| 942 | * is unencrypted) */
|
|---|
| 943 |
|
|---|
| 944 | /*****************/
|
|---|
| 945 | /* Function 0x0F */
|
|---|
| 946 |
|
|---|
| 947 | typedef [public,bitmap32bit] bitmap {
|
|---|
| 948 | NETLOGON_NEG_ACCOUNT_LOCKOUT = 0x00000001,
|
|---|
| 949 | NETLOGON_NEG_PERSISTENT_SAMREPL = 0x00000002,
|
|---|
| 950 | NETLOGON_NEG_ARCFOUR = 0x00000004,
|
|---|
| 951 | NETLOGON_NEG_PROMOTION_COUNT = 0x00000008,
|
|---|
| 952 | NETLOGON_NEG_CHANGELOG_BDC = 0x00000010,
|
|---|
| 953 | NETLOGON_NEG_FULL_SYNC_REPL = 0x00000020,
|
|---|
| 954 | NETLOGON_NEG_MULTIPLE_SIDS = 0x00000040,
|
|---|
| 955 | NETLOGON_NEG_REDO = 0x00000080,
|
|---|
| 956 | NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL = 0x00000100,
|
|---|
| 957 | NETLOGON_NEG_SEND_PASSWORD_INFO_PDC = 0x00000200,
|
|---|
| 958 | NETLOGON_NEG_GENERIC_PASSTHROUGH = 0x00000400,
|
|---|
| 959 | NETLOGON_NEG_CONCURRENT_RPC = 0x00000800,
|
|---|
| 960 | NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL = 0x00001000,
|
|---|
| 961 | NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL = 0x00002000,
|
|---|
| 962 | NETLOGON_NEG_STRONG_KEYS = 0x00004000,
|
|---|
| 963 | NETLOGON_NEG_TRANSITIVE_TRUSTS = 0x00008000,
|
|---|
| 964 | NETLOGON_NEG_DNS_DOMAIN_TRUSTS = 0x00010000,
|
|---|
| 965 | NETLOGON_NEG_PASSWORD_SET2 = 0x00020000,
|
|---|
| 966 | NETLOGON_NEG_GETDOMAININFO = 0x00040000,
|
|---|
| 967 | NETLOGON_NEG_CROSS_FOREST_TRUSTS = 0x00080000,
|
|---|
| 968 | NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION = 0x00100000,
|
|---|
| 969 | NETLOGON_NEG_RODC_PASSTHROUGH = 0x00200000,
|
|---|
| 970 | NETLOGON_NEG_SUPPORTS_AES_SHA2 = 0x00400000,
|
|---|
| 971 | NETLOGON_NEG_SUPPORTS_AES = 0x01000000,
|
|---|
| 972 | NETLOGON_NEG_AUTHENTICATED_RPC_LSASS = 0x20000000,
|
|---|
| 973 | NETLOGON_NEG_AUTHENTICATED_RPC = 0x40000000
|
|---|
| 974 | } netr_NegotiateFlags;
|
|---|
| 975 |
|
|---|
| 976 | const uint32 NETLOGON_NEG_128BIT = NETLOGON_NEG_STRONG_KEYS;
|
|---|
| 977 | const uint32 NETLOGON_NEG_SCHANNEL = NETLOGON_NEG_AUTHENTICATED_RPC;
|
|---|
| 978 |
|
|---|
| 979 | NTSTATUS netr_ServerAuthenticate2(
|
|---|
| 980 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 981 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 982 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 983 | [in] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 984 | [in,ref] netr_Credential *credentials,
|
|---|
| 985 | [out,ref] netr_Credential *return_credentials,
|
|---|
| 986 | [in,out,ref] netr_NegotiateFlags *negotiate_flags
|
|---|
| 987 | );
|
|---|
| 988 |
|
|---|
| 989 |
|
|---|
| 990 | /*****************/
|
|---|
| 991 | /* Function 0x10 */
|
|---|
| 992 |
|
|---|
| 993 | typedef enum {
|
|---|
| 994 | SYNCSTATE_NORMAL_STATE = 0,
|
|---|
| 995 | SYNCSTATE_DOMAIN_STATE = 1,
|
|---|
| 996 | SYNCSTATE_GROUP_STATE = 2,
|
|---|
| 997 | SYNCSTATE_UAS_BUILT_IN_GROUP_STATE = 3,
|
|---|
| 998 | SYNCSTATE_USER_STATE = 4,
|
|---|
| 999 | SYNCSTATE_GROUP_MEMBER_STATE = 5,
|
|---|
| 1000 | SYNCSTATE_ALIAS_STATE = 6,
|
|---|
| 1001 | SYNCSTATE_ALIAS_MEMBER_STATE = 7,
|
|---|
| 1002 | SYNCSTATE_SAM_DONE_STATE = 8
|
|---|
| 1003 | } SyncStateEnum;
|
|---|
| 1004 |
|
|---|
| 1005 | NTSTATUS netr_DatabaseSync2(
|
|---|
| 1006 | [in] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 1007 | [in] [string,charset(UTF16)] uint16 *computername,
|
|---|
| 1008 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1009 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1010 | [in] netr_SamDatabaseID database_id,
|
|---|
| 1011 | [in] SyncStateEnum restart_state,
|
|---|
| 1012 | [in,out,ref] uint32 *sync_context,
|
|---|
| 1013 | [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
|
|---|
| 1014 | [in] uint32 preferredmaximumlength
|
|---|
| 1015 | );
|
|---|
| 1016 |
|
|---|
| 1017 |
|
|---|
| 1018 | /*****************/
|
|---|
| 1019 | /* Function 0x11 */
|
|---|
| 1020 |
|
|---|
| 1021 | /* i'm not at all sure how this call works */
|
|---|
| 1022 |
|
|---|
| 1023 | typedef [bitmap16bit] bitmap {
|
|---|
| 1024 | NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED = 0x0001,
|
|---|
| 1025 | NETR_CHANGELOG_CHANGED_PASSWORD = 0x0002,
|
|---|
| 1026 | NETR_CHANGELOG_SID_INCLUDED = 0x0004,
|
|---|
| 1027 | NETR_CHANGELOG_NAME_INCLUDED = 0x0008,
|
|---|
| 1028 | NETR_CHANGELOG_FIRST_PROMOTION_OBJ = 0x0010
|
|---|
| 1029 | } netr_ChangeLogFlags;
|
|---|
| 1030 |
|
|---|
| 1031 | typedef [nodiscriminant] union {
|
|---|
| 1032 | [case(NETR_CHANGELOG_SID_INCLUDED)] dom_sid object_sid;
|
|---|
| 1033 | [case(NETR_CHANGELOG_NAME_INCLUDED)] nstring object_name;
|
|---|
| 1034 | [default];
|
|---|
| 1035 | } netr_ChangeLogObject;
|
|---|
| 1036 |
|
|---|
| 1037 | typedef [public,gensize] struct {
|
|---|
| 1038 | uint32 serial_number1;
|
|---|
| 1039 | uint32 serial_number2;
|
|---|
| 1040 | uint32 object_rid;
|
|---|
| 1041 | netr_ChangeLogFlags flags;
|
|---|
| 1042 | netr_SamDatabaseID8Bit db_index;
|
|---|
| 1043 | netr_DeltaEnum8Bit delta_type;
|
|---|
| 1044 | [switch_is(flags & (NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED))] netr_ChangeLogObject object;
|
|---|
| 1045 | } netr_ChangeLogEntry;
|
|---|
| 1046 |
|
|---|
| 1047 | NTSTATUS netr_DatabaseRedo(
|
|---|
| 1048 | [in] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 1049 | [in] [string,charset(UTF16)] uint16 *computername,
|
|---|
| 1050 | [in] netr_Authenticator *credential,
|
|---|
| 1051 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1052 | [in] [subcontext(4),subcontext_size(change_log_entry_size)] netr_ChangeLogEntry change_log_entry,
|
|---|
| 1053 | [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry, ndr->iconv_convenience, ndr->flags))] uint32 change_log_entry_size,
|
|---|
| 1054 | [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array
|
|---|
| 1055 | );
|
|---|
| 1056 |
|
|---|
| 1057 |
|
|---|
| 1058 | /*****************/
|
|---|
| 1059 | /* Function 0x12 */
|
|---|
| 1060 |
|
|---|
| 1061 | WERROR netr_LogonControl2Ex(
|
|---|
| 1062 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
|---|
| 1063 | [in] netr_LogonControlCode function_code,
|
|---|
| 1064 | [in] uint32 level,
|
|---|
| 1065 | [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
|
|---|
| 1066 | [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
|
|---|
| 1067 | );
|
|---|
| 1068 |
|
|---|
| 1069 | /*****************/
|
|---|
| 1070 | /* Function 0x13 */
|
|---|
| 1071 | typedef struct {
|
|---|
| 1072 | uint32 length;
|
|---|
| 1073 | [size_is(length)] uint8 *data;
|
|---|
| 1074 | } netr_Blob;
|
|---|
| 1075 |
|
|---|
| 1076 | WERROR netr_NetrEnumerateTrustedDomains(
|
|---|
| 1077 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1078 | [out,ref] netr_Blob *trusted_domains_blob
|
|---|
| 1079 | );
|
|---|
| 1080 |
|
|---|
| 1081 | /*****************/
|
|---|
| 1082 | /* Function 0x14 */
|
|---|
| 1083 |
|
|---|
| 1084 | /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
|
|---|
| 1085 |
|
|---|
| 1086 | const int DSGETDC_VALID_FLAGS = (DS_FORCE_REDISCOVERY |
|
|---|
| 1087 | DS_DIRECTORY_SERVICE_REQUIRED |
|
|---|
| 1088 | DS_DIRECTORY_SERVICE_PREFERRED |
|
|---|
| 1089 | DS_GC_SERVER_REQUIRED |
|
|---|
| 1090 | DS_PDC_REQUIRED |
|
|---|
| 1091 | DS_BACKGROUND_ONLY |
|
|---|
| 1092 | DS_IP_REQUIRED |
|
|---|
| 1093 | DS_KDC_REQUIRED |
|
|---|
| 1094 | DS_TIMESERV_REQUIRED |
|
|---|
| 1095 | DS_WRITABLE_REQUIRED |
|
|---|
| 1096 | DS_GOOD_TIMESERV_PREFERRED |
|
|---|
| 1097 | DS_AVOID_SELF |
|
|---|
| 1098 | DS_ONLY_LDAP_NEEDED |
|
|---|
| 1099 | DS_IS_FLAT_NAME |
|
|---|
| 1100 | DS_IS_DNS_NAME |
|
|---|
| 1101 | DS_RETURN_FLAT_NAME |
|
|---|
| 1102 | DS_RETURN_DNS_NAME);
|
|---|
| 1103 |
|
|---|
| 1104 | typedef [bitmap32bit] bitmap {
|
|---|
| 1105 | DS_FORCE_REDISCOVERY = 0x00000001,
|
|---|
| 1106 | DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010,
|
|---|
| 1107 | DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020,
|
|---|
| 1108 | DS_GC_SERVER_REQUIRED = 0x00000040,
|
|---|
| 1109 | DS_PDC_REQUIRED = 0x00000080,
|
|---|
| 1110 | DS_BACKGROUND_ONLY = 0x00000100,
|
|---|
| 1111 | DS_IP_REQUIRED = 0x00000200,
|
|---|
| 1112 | DS_KDC_REQUIRED = 0x00000400,
|
|---|
| 1113 | DS_TIMESERV_REQUIRED = 0x00000800,
|
|---|
| 1114 | DS_WRITABLE_REQUIRED = 0x00001000,
|
|---|
| 1115 | DS_GOOD_TIMESERV_PREFERRED = 0x00002000,
|
|---|
| 1116 | DS_AVOID_SELF = 0x00004000,
|
|---|
| 1117 | DS_ONLY_LDAP_NEEDED = 0x00008000,
|
|---|
| 1118 | DS_IS_FLAT_NAME = 0x00010000,
|
|---|
| 1119 | DS_IS_DNS_NAME = 0x00020000,
|
|---|
| 1120 | DS_TRY_NEXTCLOSEST_SITE = 0x00040000,
|
|---|
| 1121 | DS_DIRECTORY_SERVICE_6_REQUIRED = 0x00080000,
|
|---|
| 1122 | DS_WEB_SERVICE_REQUIRED = 0x00100000,
|
|---|
| 1123 | DS_RETURN_DNS_NAME = 0x40000000,
|
|---|
| 1124 | DS_RETURN_FLAT_NAME = 0x80000000
|
|---|
| 1125 | } netr_DsRGetDCName_flags;
|
|---|
| 1126 |
|
|---|
| 1127 | typedef [v1_enum] enum {
|
|---|
| 1128 | DS_ADDRESS_TYPE_INET = 1,
|
|---|
| 1129 | DS_ADDRESS_TYPE_NETBIOS = 2
|
|---|
| 1130 | } netr_DsRGetDCNameInfo_AddressType;
|
|---|
| 1131 |
|
|---|
| 1132 | typedef [bitmap32bit] bitmap {
|
|---|
| 1133 | DS_SERVER_PDC = NBT_SERVER_PDC,
|
|---|
| 1134 | DS_SERVER_GC = NBT_SERVER_GC,
|
|---|
| 1135 | DS_SERVER_LDAP = NBT_SERVER_LDAP,
|
|---|
| 1136 | DS_SERVER_DS = NBT_SERVER_DS,
|
|---|
| 1137 | DS_SERVER_KDC = NBT_SERVER_KDC,
|
|---|
| 1138 | DS_SERVER_TIMESERV = NBT_SERVER_TIMESERV,
|
|---|
| 1139 | DS_SERVER_CLOSEST = NBT_SERVER_CLOSEST,
|
|---|
| 1140 | DS_SERVER_WRITABLE = NBT_SERVER_WRITABLE,
|
|---|
| 1141 | DS_SERVER_GOOD_TIMESERV = NBT_SERVER_GOOD_TIMESERV,
|
|---|
| 1142 | DS_SERVER_NDNC = NBT_SERVER_NDNC,
|
|---|
| 1143 | DS_SERVER_SELECT_SECRET_DOMAIN_6 = NBT_SERVER_SELECT_SECRET_DOMAIN_6,
|
|---|
| 1144 | DS_SERVER_FULL_SECRET_DOMAIN_6 = NBT_SERVER_FULL_SECRET_DOMAIN_6,
|
|---|
| 1145 | DS_DNS_CONTROLLER = 0x20000000,
|
|---|
| 1146 | DS_DNS_DOMAIN = 0x40000000,
|
|---|
| 1147 | DS_DNS_FOREST = 0x80000000
|
|---|
| 1148 | } netr_DsR_DcFlags;
|
|---|
| 1149 |
|
|---|
| 1150 | typedef [public] struct {
|
|---|
| 1151 | [string,charset(UTF16)] uint16 *dc_unc;
|
|---|
| 1152 | [string,charset(UTF16)] uint16 *dc_address;
|
|---|
| 1153 | netr_DsRGetDCNameInfo_AddressType dc_address_type;
|
|---|
| 1154 | GUID domain_guid;
|
|---|
| 1155 | [string,charset(UTF16)] uint16 *domain_name;
|
|---|
| 1156 | [string,charset(UTF16)] uint16 *forest_name;
|
|---|
| 1157 | netr_DsR_DcFlags dc_flags;
|
|---|
| 1158 | [string,charset(UTF16)] uint16 *dc_site_name;
|
|---|
| 1159 | [string,charset(UTF16)] uint16 *client_site_name;
|
|---|
| 1160 | } netr_DsRGetDCNameInfo;
|
|---|
| 1161 |
|
|---|
| 1162 | WERROR netr_DsRGetDCName(
|
|---|
| 1163 | [in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
|---|
| 1164 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
|---|
| 1165 | [in,unique] GUID *domain_guid,
|
|---|
| 1166 | [in,unique] GUID *site_guid,
|
|---|
| 1167 | [in] netr_DsRGetDCName_flags flags,
|
|---|
| 1168 | [out,ref] netr_DsRGetDCNameInfo **info
|
|---|
| 1169 | );
|
|---|
| 1170 |
|
|---|
| 1171 | /*****************/
|
|---|
| 1172 | /* Function 0x15 */
|
|---|
| 1173 | typedef [switch_type(uint32)] union {
|
|---|
| 1174 | [case(1)] netr_NegotiateFlags server_capabilities;
|
|---|
| 1175 | } netr_Capabilities;
|
|---|
| 1176 |
|
|---|
| 1177 | NTSTATUS netr_LogonGetCapabilities(
|
|---|
| 1178 | [in] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1179 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1180 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1181 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1182 | [in] uint32 query_level,
|
|---|
| 1183 | [out,ref,switch_is(query_level)] netr_Capabilities *capabilities
|
|---|
| 1184 | );
|
|---|
| 1185 |
|
|---|
| 1186 | /****************/
|
|---|
| 1187 | /* Function 0x16 */
|
|---|
| 1188 | [todo] WERROR netr_NETRLOGONSETSERVICEBITS();
|
|---|
| 1189 |
|
|---|
| 1190 | /****************/
|
|---|
| 1191 | /* Function 0x17 */
|
|---|
| 1192 | WERROR netr_LogonGetTrustRid(
|
|---|
| 1193 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1194 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
|---|
| 1195 | [out,ref] uint32 *rid
|
|---|
| 1196 | );
|
|---|
| 1197 |
|
|---|
| 1198 | /****************/
|
|---|
| 1199 | /* Function 0x18 */
|
|---|
| 1200 | [todo] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
|
|---|
| 1201 |
|
|---|
| 1202 | /****************/
|
|---|
| 1203 | /* Function 0x19 */
|
|---|
| 1204 | [todo] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
|
|---|
| 1205 |
|
|---|
| 1206 | /****************/
|
|---|
| 1207 | /* Function 0x1a */
|
|---|
| 1208 | [public] NTSTATUS netr_ServerAuthenticate3(
|
|---|
| 1209 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1210 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 1211 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 1212 | [in] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1213 | [in,ref] netr_Credential *credentials,
|
|---|
| 1214 | [out,ref] netr_Credential *return_credentials,
|
|---|
| 1215 | [in,out,ref] netr_NegotiateFlags *negotiate_flags,
|
|---|
| 1216 | [out,ref] uint32 *rid
|
|---|
| 1217 | );
|
|---|
| 1218 |
|
|---|
| 1219 | /****************/
|
|---|
| 1220 | /* Function 0x1b */
|
|---|
| 1221 |
|
|---|
| 1222 | WERROR netr_DsRGetDCNameEx(
|
|---|
| 1223 | [in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
|---|
| 1224 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
|---|
| 1225 | [in,unique] GUID *domain_guid,
|
|---|
| 1226 | [in,unique] [string,charset(UTF16)] uint16 *site_name,
|
|---|
| 1227 | [in] netr_DsRGetDCName_flags flags,
|
|---|
| 1228 | [out,ref] netr_DsRGetDCNameInfo **info
|
|---|
| 1229 | );
|
|---|
| 1230 |
|
|---|
| 1231 |
|
|---|
| 1232 | /****************/
|
|---|
| 1233 | /* Function 0x1c */
|
|---|
| 1234 | WERROR netr_DsRGetSiteName(
|
|---|
| 1235 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1236 | [out,ref] [string,charset(UTF16)] uint16 **site
|
|---|
| 1237 | );
|
|---|
| 1238 |
|
|---|
| 1239 | /****************/
|
|---|
| 1240 | /* Function 0x1d */
|
|---|
| 1241 | typedef [bitmap32bit] bitmap {
|
|---|
| 1242 | NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
|
|---|
| 1243 | NETR_TRUST_FLAG_OUTBOUND = 0x00000002,
|
|---|
| 1244 | NETR_TRUST_FLAG_TREEROOT = 0x00000004,
|
|---|
| 1245 | NETR_TRUST_FLAG_PRIMARY = 0x00000008,
|
|---|
| 1246 | NETR_TRUST_FLAG_NATIVE = 0x00000010,
|
|---|
| 1247 | NETR_TRUST_FLAG_INBOUND = 0x00000020,
|
|---|
| 1248 | NETR_TRUST_FLAG_MIT_KRB5 = 0x00000080,
|
|---|
| 1249 | NETR_TRUST_FLAG_AES = 0x00000100
|
|---|
| 1250 | } netr_TrustFlags;
|
|---|
| 1251 |
|
|---|
| 1252 | typedef [bitmap32bit] bitmap {
|
|---|
| 1253 | NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS = 0x00000001,
|
|---|
| 1254 | NETR_WS_FLAG_HANDLES_SPN_UPDATE = 0x00000002
|
|---|
| 1255 | } netr_WorkstationFlags;
|
|---|
| 1256 |
|
|---|
| 1257 | typedef [bitmap16bit] bitmap {
|
|---|
| 1258 | NETR_VER_SUITE_BACKOFFICE = 0x0004,
|
|---|
| 1259 | NETR_VER_SUITE_BLADE = 0x0400,
|
|---|
| 1260 | NETR_VER_SUITE_COMPUTE_SERVER = 0x4000,
|
|---|
| 1261 | NETR_VER_SUITE_DATACENTER = 0x0080,
|
|---|
| 1262 | NETR_VER_SUITE_ENTERPRISE = 0x0002,
|
|---|
| 1263 | NETR_VER_SUITE_EMBEDDEDNT = 0x0040,
|
|---|
| 1264 | NETR_VER_SUITE_PERSONAL = 0x0200,
|
|---|
| 1265 | NETR_VER_SUITE_SINGLEUSERTS = 0x0100,
|
|---|
| 1266 | NETR_VER_SUITE_SMALLBUSINESS = 0x0001,
|
|---|
| 1267 | NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED = 0x0020,
|
|---|
| 1268 | NETR_VER_SUITE_STORAGE_SERVER = 0x2000,
|
|---|
| 1269 | NETR_VER_SUITE_TERMINAL = 0x0010,
|
|---|
| 1270 | NETR_VER_SUITE_WH_SERVER = 0x8000
|
|---|
| 1271 | } netr_SuiteMask;
|
|---|
| 1272 |
|
|---|
| 1273 | typedef [bitmap8bit] bitmap {
|
|---|
| 1274 | NETR_VER_NT_DOMAIN_CONTROLLER = 0x02,
|
|---|
| 1275 | NETR_VER_NT_SERVER = 0x03,
|
|---|
| 1276 | NETR_VER_NT_WORKSTATION = 0x01
|
|---|
| 1277 | } netr_ProductType;
|
|---|
| 1278 |
|
|---|
| 1279 | typedef struct {
|
|---|
| 1280 | uint32 policy_size;
|
|---|
| 1281 | [size_is(policy_size)] uint8 *policy;
|
|---|
| 1282 | } netr_LsaPolicyInformation;
|
|---|
| 1283 |
|
|---|
| 1284 | typedef struct {
|
|---|
| 1285 | [value(284)] uint32 OSVersionInfoSize;
|
|---|
| 1286 | uint32 MajorVersion;
|
|---|
| 1287 | uint32 MinorVersion;
|
|---|
| 1288 | uint32 BuildNumber;
|
|---|
| 1289 | uint32 PlatformId;
|
|---|
| 1290 | [subcontext(0),subcontext_size(256)] nstring CSDVersion;
|
|---|
| 1291 | uint16 ServicePackMajor;
|
|---|
| 1292 | uint16 ServicePackMinor;
|
|---|
| 1293 | netr_SuiteMask SuiteMask;
|
|---|
| 1294 | netr_ProductType ProductType;
|
|---|
| 1295 | uint8 Reserved;
|
|---|
| 1296 | } netr_OsVersionInfoEx;
|
|---|
| 1297 |
|
|---|
| 1298 | typedef struct {
|
|---|
| 1299 | /* these first 3 values come from the fact windows
|
|---|
| 1300 | actually encodes this structure as a UNICODE_STRING
|
|---|
| 1301 | - see MS-NRPC section 2.2.1.3.9 */
|
|---|
| 1302 | /* 142 * 2 = 284 (length of structure "netr_OsVersionInfoEx") */
|
|---|
| 1303 | [value(142)] uint32 length;
|
|---|
| 1304 | [value(0)] uint32 dummy;
|
|---|
| 1305 | [value(142)] uint32 size;
|
|---|
| 1306 | netr_OsVersionInfoEx os;
|
|---|
| 1307 | } netr_OsVersion;
|
|---|
| 1308 |
|
|---|
| 1309 | typedef struct {
|
|---|
| 1310 | /* value is 284 when info != os, otherwise 0 (for length and
|
|---|
| 1311 | size) */
|
|---|
| 1312 | [value(os == NULL ? 0 : 284)] uint16 length;
|
|---|
| 1313 | [value(os == NULL ? 0 : 284)] uint16 size;
|
|---|
| 1314 | netr_OsVersion *os;
|
|---|
| 1315 | } netr_OsVersionContainer;
|
|---|
| 1316 |
|
|---|
| 1317 | typedef struct {
|
|---|
| 1318 | netr_LsaPolicyInformation lsa_policy;
|
|---|
| 1319 | [string,charset(UTF16)] uint16 *dns_hostname;
|
|---|
| 1320 | [string,charset(UTF16)] uint16 *sitename;
|
|---|
| 1321 | [string,charset(UTF16)] uint16 *dummy1;
|
|---|
| 1322 | [string,charset(UTF16)] uint16 *dummy2;
|
|---|
| 1323 | [string,charset(UTF16)] uint16 *dummy3;
|
|---|
| 1324 | [string,charset(UTF16)] uint16 *dummy4;
|
|---|
| 1325 | netr_OsVersionContainer os_version;
|
|---|
| 1326 | lsa_String os_name;
|
|---|
| 1327 | lsa_String dummy_string3;
|
|---|
| 1328 | lsa_String dummy_string4;
|
|---|
| 1329 | netr_WorkstationFlags workstation_flags;
|
|---|
| 1330 | uint32 dummy_long2;
|
|---|
| 1331 | uint32 dummy_long3;
|
|---|
| 1332 | uint32 dummy_long4;
|
|---|
| 1333 | } netr_WorkstationInformation;
|
|---|
| 1334 |
|
|---|
| 1335 | typedef union {
|
|---|
| 1336 | [case(1)] netr_WorkstationInformation *workstation_info;
|
|---|
| 1337 | [case(2)] netr_WorkstationInformation *lsa_policy_info;
|
|---|
| 1338 | } netr_WorkstationInfo;
|
|---|
| 1339 |
|
|---|
| 1340 | typedef struct {
|
|---|
| 1341 | /* these first 3 values come from the fact windows
|
|---|
| 1342 | actually encodes this structure as a UNICODE_STRING
|
|---|
| 1343 | - see MS-NRPC section 2.2.1.3.9 */
|
|---|
| 1344 | [value(8)] uint32 length;
|
|---|
| 1345 | [value(0)] uint32 dummy;
|
|---|
| 1346 | [value(8)] uint32 size;
|
|---|
| 1347 | netr_TrustFlags flags;
|
|---|
| 1348 | uint32 parent_index;
|
|---|
| 1349 | uint32 trust_type;
|
|---|
| 1350 | uint32 trust_attributes;
|
|---|
| 1351 | } netr_trust_extension;
|
|---|
| 1352 |
|
|---|
| 1353 | typedef struct {
|
|---|
| 1354 | uint16 length; /* value is 16 when info != NULL, otherwise 0 */
|
|---|
| 1355 | [value(length)] uint16 size; /* value is 16 when info != NULL, otherwise 0 */
|
|---|
| 1356 | netr_trust_extension *info;
|
|---|
| 1357 | } netr_trust_extension_container;
|
|---|
| 1358 |
|
|---|
| 1359 | typedef struct {
|
|---|
| 1360 | lsa_StringLarge domainname;
|
|---|
| 1361 | lsa_StringLarge dns_domainname;
|
|---|
| 1362 | lsa_StringLarge dns_forestname;
|
|---|
| 1363 | GUID domain_guid;
|
|---|
| 1364 | dom_sid2 *domain_sid;
|
|---|
| 1365 | netr_trust_extension_container trust_extension;
|
|---|
| 1366 | lsa_StringLarge dummy_string2;
|
|---|
| 1367 | lsa_StringLarge dummy_string3;
|
|---|
| 1368 | lsa_StringLarge dummy_string4;
|
|---|
| 1369 | uint32 dummy_long1;
|
|---|
| 1370 | uint32 dummy_long2;
|
|---|
| 1371 | uint32 dummy_long3;
|
|---|
| 1372 | uint32 dummy_long4;
|
|---|
| 1373 | } netr_OneDomainInfo;
|
|---|
| 1374 |
|
|---|
| 1375 | typedef [public,bitmap32bit] bitmap {
|
|---|
| 1376 | ENC_CRC32 = 0x00000001,
|
|---|
| 1377 | ENC_RSA_MD5 = 0x00000002,
|
|---|
| 1378 | ENC_RC4_HMAC_MD5 = 0x00000004,
|
|---|
| 1379 | ENC_HMAC_SHA1_96_AES128 = 0x00000008,
|
|---|
| 1380 | ENC_HMAC_SHA1_96_AES256 = 0x00000010
|
|---|
| 1381 | } netr_SupportedEncTypes;
|
|---|
| 1382 |
|
|---|
| 1383 | typedef struct {
|
|---|
| 1384 | netr_OneDomainInfo primary_domain;
|
|---|
| 1385 | uint32 trusted_domain_count;
|
|---|
| 1386 | [size_is(trusted_domain_count)] netr_OneDomainInfo *trusted_domains;
|
|---|
| 1387 | netr_LsaPolicyInformation lsa_policy;
|
|---|
| 1388 | lsa_StringLarge dns_hostname;
|
|---|
| 1389 | lsa_StringLarge dummy_string2;
|
|---|
| 1390 | lsa_StringLarge dummy_string3;
|
|---|
| 1391 | lsa_StringLarge dummy_string4;
|
|---|
| 1392 | netr_WorkstationFlags workstation_flags;
|
|---|
| 1393 | netr_SupportedEncTypes supported_enc_types;
|
|---|
| 1394 | uint32 dummy_long3;
|
|---|
| 1395 | uint32 dummy_long4;
|
|---|
| 1396 | } netr_DomainInformation;
|
|---|
| 1397 |
|
|---|
| 1398 | typedef union {
|
|---|
| 1399 | [case(1)] netr_DomainInformation *domain_info;
|
|---|
| 1400 | [case(2)] netr_LsaPolicyInformation *lsa_policy_info;
|
|---|
| 1401 | } netr_DomainInfo;
|
|---|
| 1402 |
|
|---|
| 1403 | NTSTATUS netr_LogonGetDomainInfo(
|
|---|
| 1404 | [in] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1405 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1406 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1407 | [in,out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1408 | [in] uint32 level,
|
|---|
| 1409 | [in,ref,switch_is(level)] netr_WorkstationInfo *query,
|
|---|
| 1410 | [out,ref,switch_is(level)] netr_DomainInfo *info
|
|---|
| 1411 | );
|
|---|
| 1412 |
|
|---|
| 1413 | /*****************/
|
|---|
| 1414 | /* Function 0x1e */
|
|---|
| 1415 |
|
|---|
| 1416 | /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
|
|---|
| 1417 |
|
|---|
| 1418 | /* someone's birthday ? */
|
|---|
| 1419 | const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT = 0x02231968;
|
|---|
| 1420 |
|
|---|
| 1421 | typedef struct {
|
|---|
| 1422 | uint32 ReservedField;
|
|---|
| 1423 | uint32 PasswordVersionNumber;
|
|---|
| 1424 | uint32 PasswordVersionPresent;
|
|---|
| 1425 | } NL_PASSWORD_VERSION;
|
|---|
| 1426 |
|
|---|
| 1427 | typedef [flag(NDR_PAHEX)] struct {
|
|---|
| 1428 | uint8 data[512];
|
|---|
| 1429 | uint32 length;
|
|---|
| 1430 | } netr_CryptPassword;
|
|---|
| 1431 |
|
|---|
| 1432 | NTSTATUS netr_ServerPasswordSet2(
|
|---|
| 1433 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1434 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 1435 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 1436 | [in] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1437 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1438 | [out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1439 | [in,ref] netr_CryptPassword *new_password
|
|---|
| 1440 | );
|
|---|
| 1441 |
|
|---|
| 1442 | /****************/
|
|---|
| 1443 | /* Function 0x1f */
|
|---|
| 1444 | WERROR netr_ServerPasswordGet(
|
|---|
| 1445 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1446 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 1447 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 1448 | [in] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1449 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1450 | [out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1451 | [out,ref] samr_Password *password
|
|---|
| 1452 | );
|
|---|
| 1453 |
|
|---|
| 1454 | /****************/
|
|---|
| 1455 | /* Function 0x20 */
|
|---|
| 1456 | [todo] WERROR netr_NETRLOGONSENDTOSAM();
|
|---|
| 1457 |
|
|---|
| 1458 | /****************/
|
|---|
| 1459 | /* Function 0x21 */
|
|---|
| 1460 | typedef struct {
|
|---|
| 1461 | uint32 count;
|
|---|
| 1462 | [size_is(count)] lsa_String *sitename;
|
|---|
| 1463 | } netr_DsRAddressToSitenamesWCtr;
|
|---|
| 1464 |
|
|---|
| 1465 | typedef struct {
|
|---|
| 1466 | [size_is(size)] uint8 *buffer;
|
|---|
| 1467 | uint32 size;
|
|---|
| 1468 | } netr_DsRAddress;
|
|---|
| 1469 |
|
|---|
| 1470 | WERROR netr_DsRAddressToSitenamesW(
|
|---|
| 1471 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1472 | [in] [range(0,32000)] uint32 count,
|
|---|
| 1473 | [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
|
|---|
| 1474 | [out] [ref] netr_DsRAddressToSitenamesWCtr **ctr
|
|---|
| 1475 | );
|
|---|
| 1476 |
|
|---|
| 1477 | /****************/
|
|---|
| 1478 | /* Function 0x22 */
|
|---|
| 1479 | WERROR netr_DsRGetDCNameEx2(
|
|---|
| 1480 | [in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
|---|
| 1481 | [in,unique] [string,charset(UTF16)] uint16 *client_account,
|
|---|
| 1482 | [in] samr_AcctFlags mask,
|
|---|
| 1483 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
|---|
| 1484 | [in,unique] GUID *domain_guid,
|
|---|
| 1485 | [in,unique] [string,charset(UTF16)] uint16 *site_name,
|
|---|
| 1486 | [in] netr_DsRGetDCName_flags flags,
|
|---|
| 1487 | [out,ref] netr_DsRGetDCNameInfo **info
|
|---|
| 1488 | );
|
|---|
| 1489 |
|
|---|
| 1490 | /****************/
|
|---|
| 1491 | /* Function 0x23 */
|
|---|
| 1492 | [todo] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
|
|---|
| 1493 |
|
|---|
| 1494 | /****************/
|
|---|
| 1495 | /* Function 0x24 */
|
|---|
| 1496 |
|
|---|
| 1497 | typedef [v1_enum] enum {
|
|---|
| 1498 | NETR_TRUST_TYPE_DOWNLEVEL = 1,
|
|---|
| 1499 | NETR_TRUST_TYPE_UPLEVEL = 2,
|
|---|
| 1500 | NETR_TRUST_TYPE_MIT = 3,
|
|---|
| 1501 | NETR_TRUST_TYPE_DCE = 4
|
|---|
| 1502 | } netr_TrustType;
|
|---|
| 1503 |
|
|---|
| 1504 | typedef [bitmap32bit] bitmap {
|
|---|
| 1505 | NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
|
|---|
| 1506 | NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
|
|---|
| 1507 | NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
|
|---|
| 1508 | NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
|
|---|
| 1509 | NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
|
|---|
| 1510 | NETR_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
|
|---|
| 1511 | NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040
|
|---|
| 1512 | } netr_TrustAttributes;
|
|---|
| 1513 |
|
|---|
| 1514 | typedef struct {
|
|---|
| 1515 | [string,charset(UTF16)] uint16 *netbios_name;
|
|---|
| 1516 | [string,charset(UTF16)] uint16 *dns_name;
|
|---|
| 1517 | netr_TrustFlags trust_flags;
|
|---|
| 1518 | uint32 parent_index;
|
|---|
| 1519 | netr_TrustType trust_type;
|
|---|
| 1520 | netr_TrustAttributes trust_attributes;
|
|---|
| 1521 | dom_sid2 *sid;
|
|---|
| 1522 | GUID guid;
|
|---|
| 1523 | } netr_DomainTrust;
|
|---|
| 1524 |
|
|---|
| 1525 | typedef struct {
|
|---|
| 1526 | uint32 count;
|
|---|
| 1527 | [size_is(count)] netr_DomainTrust *array;
|
|---|
| 1528 | } netr_DomainTrustList;
|
|---|
| 1529 |
|
|---|
| 1530 | WERROR netr_NetrEnumerateTrustedDomainsEx(
|
|---|
| 1531 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1532 | [out,ref] netr_DomainTrustList *dom_trust_list
|
|---|
| 1533 | );
|
|---|
| 1534 |
|
|---|
| 1535 | /****************/
|
|---|
| 1536 | /* Function 0x25 */
|
|---|
| 1537 | typedef struct {
|
|---|
| 1538 | uint32 count;
|
|---|
| 1539 | [size_is(count)] lsa_String *sitename;
|
|---|
| 1540 | [size_is(count)] lsa_String *subnetname;
|
|---|
| 1541 | } netr_DsRAddressToSitenamesExWCtr;
|
|---|
| 1542 |
|
|---|
| 1543 | WERROR netr_DsRAddressToSitenamesExW(
|
|---|
| 1544 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1545 | [in] [range(0,32000)] uint32 count,
|
|---|
| 1546 | [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
|
|---|
| 1547 | [out] [ref] netr_DsRAddressToSitenamesExWCtr **ctr
|
|---|
| 1548 | );
|
|---|
| 1549 |
|
|---|
| 1550 | /****************/
|
|---|
| 1551 | /* Function 0x26 */
|
|---|
| 1552 |
|
|---|
| 1553 | typedef struct {
|
|---|
| 1554 | uint32 num_sites;
|
|---|
| 1555 | [size_is(num_sites)] [unique] lsa_String *sites;
|
|---|
| 1556 | } DcSitesCtr;
|
|---|
| 1557 |
|
|---|
| 1558 | WERROR netr_DsrGetDcSiteCoverageW(
|
|---|
| 1559 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1560 | [out,ref] DcSitesCtr **ctr
|
|---|
| 1561 | );
|
|---|
| 1562 |
|
|---|
| 1563 | /****************/
|
|---|
| 1564 | /* Function 0x27 */
|
|---|
| 1565 | NTSTATUS netr_LogonSamLogonEx(
|
|---|
| 1566 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1567 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1568 | [in] netr_LogonInfoClass logon_level,
|
|---|
| 1569 | [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
|
|---|
| 1570 | [in] uint16 validation_level,
|
|---|
| 1571 | [out,ref] [switch_is(validation_level)] netr_Validation *validation,
|
|---|
| 1572 | [out,ref] uint8 *authoritative,
|
|---|
| 1573 | [in,out,ref] uint32 *flags
|
|---|
| 1574 | );
|
|---|
| 1575 |
|
|---|
| 1576 | /****************/
|
|---|
| 1577 | /* Function 0x28 */
|
|---|
| 1578 |
|
|---|
| 1579 | WERROR netr_DsrEnumerateDomainTrusts(
|
|---|
| 1580 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1581 | [in] netr_TrustFlags trust_flags,
|
|---|
| 1582 | [out,ref] netr_DomainTrustList *trusts
|
|---|
| 1583 | );
|
|---|
| 1584 |
|
|---|
| 1585 |
|
|---|
| 1586 | /****************/
|
|---|
| 1587 | /* Function 0x29 */
|
|---|
| 1588 | WERROR netr_DsrDeregisterDNSHostRecords(
|
|---|
| 1589 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1590 | [in,unique] [string,charset(UTF16)] uint16 *domain,
|
|---|
| 1591 | [in,unique] GUID *domain_guid,
|
|---|
| 1592 | [in,unique] GUID *dsa_guid,
|
|---|
| 1593 | [in,ref] [string,charset(UTF16)] uint16 *dns_host
|
|---|
| 1594 | );
|
|---|
| 1595 |
|
|---|
| 1596 | /****************/
|
|---|
| 1597 | /* Function 0x2a */
|
|---|
| 1598 | NTSTATUS netr_ServerTrustPasswordsGet(
|
|---|
| 1599 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1600 | [in] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 1601 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 1602 | [in] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1603 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1604 | [out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1605 | [out,ref] samr_Password *password,
|
|---|
| 1606 | [out,ref] samr_Password *password2
|
|---|
| 1607 | );
|
|---|
| 1608 |
|
|---|
| 1609 | /****************/
|
|---|
| 1610 | /* Function 0x2b */
|
|---|
| 1611 |
|
|---|
| 1612 | const int DS_GFTI_UPDATE_TDO = 0x1;
|
|---|
| 1613 |
|
|---|
| 1614 | WERROR netr_DsRGetForestTrustInformation(
|
|---|
| 1615 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1616 | [in,unique] [string,charset(UTF16)] uint16 *trusted_domain_name,
|
|---|
| 1617 | [in] uint32 flags,
|
|---|
| 1618 | [out,ref] lsa_ForestTrustInformation **forest_trust_info
|
|---|
| 1619 | );
|
|---|
| 1620 |
|
|---|
| 1621 | /****************/
|
|---|
| 1622 | /* Function 0x2c */
|
|---|
| 1623 | WERROR netr_GetForestTrustInformation(
|
|---|
| 1624 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1625 | [in,ref] [string,charset(UTF16)] uint16 *trusted_domain_name,
|
|---|
| 1626 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1627 | [out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1628 | [in] uint32 flags,
|
|---|
| 1629 | [out,ref] lsa_ForestTrustInformation **forest_trust_info
|
|---|
| 1630 | );
|
|---|
| 1631 |
|
|---|
| 1632 | /****************/
|
|---|
| 1633 | /* Function 0x2d */
|
|---|
| 1634 |
|
|---|
| 1635 | /* this is the ADS varient. I don't yet know what the "flags" are for */
|
|---|
| 1636 | NTSTATUS netr_LogonSamLogonWithFlags(
|
|---|
| 1637 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1638 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1639 | [in,unique] netr_Authenticator *credential,
|
|---|
| 1640 | [in,out,unique] netr_Authenticator *return_authenticator,
|
|---|
| 1641 | [in] netr_LogonInfoClass logon_level,
|
|---|
| 1642 | [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
|
|---|
| 1643 | [in] uint16 validation_level,
|
|---|
| 1644 | [out,ref] [switch_is(validation_level)] netr_Validation *validation,
|
|---|
| 1645 | [out,ref] uint8 *authoritative,
|
|---|
| 1646 | [in,out,ref] uint32 *flags
|
|---|
| 1647 | );
|
|---|
| 1648 |
|
|---|
| 1649 | /****************/
|
|---|
| 1650 | /* Function 0x2e */
|
|---|
| 1651 |
|
|---|
| 1652 | typedef struct {
|
|---|
| 1653 | uint32 count;
|
|---|
| 1654 | [size_is(count)] uint32 *data;
|
|---|
| 1655 | uint32 entry_count;
|
|---|
| 1656 | [size_is(count)] lsa_String *entries;
|
|---|
| 1657 | } netr_TrustInfo;
|
|---|
| 1658 |
|
|---|
| 1659 | NTSTATUS netr_ServerGetTrustInfo(
|
|---|
| 1660 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
|---|
| 1661 | [in,ref] [string,charset(UTF16)] uint16 *account_name,
|
|---|
| 1662 | [in] netr_SchannelType secure_channel_type,
|
|---|
| 1663 | [in,ref] [string,charset(UTF16)] uint16 *computer_name,
|
|---|
| 1664 | [in,ref] netr_Authenticator *credential,
|
|---|
| 1665 | [out,ref] netr_Authenticator *return_authenticator,
|
|---|
| 1666 | [out,ref] samr_Password *new_owf_password,
|
|---|
| 1667 | [out,ref] samr_Password *old_owf_password,
|
|---|
| 1668 | [out,ref] netr_TrustInfo **trust_info
|
|---|
| 1669 | );
|
|---|
| 1670 | }
|
|---|