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