#include "idl_types.h"
-import "security.idl", "misc.idl", "samr.idl";
+import "security.idl", "misc.idl", "lsa.idl", "samr.idl";
[
uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP = 0x80000000
} drsuapi_DrsOptions;
+ /* see DRS_MSG_REPMOD_V1 */
+ typedef [public,bitmap32bit] bitmap {
+ DRSUAPI_DRS_UPDATE_FLAGS = 0x00000001,
+ DRSUAPI_DRS_UPDATE_ADDRESS = 0x00000002,
+ DRSUAPI_DRS_UPDATE_SCHEDULE = 0x00000004
+ } drsuapi_DrsUpdate;
+
/*****************/
/* Function 0x00 */
typedef [bitmap32bit] bitmap {
/*****************/
/* Function 0x02 */
typedef [public,gensize] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->iconv_convenience, ndr->flags)-4)] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid, ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
GUID source_dsa_guid;
- astring *source_dsa_dns; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */
+ [charset(DOS),string] char *source_dsa_dns; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */
drsuapi_DrsOptions options;
} drsuapi_DsReplicaSyncRequest1;
} drsuapi_DsObjectClassId;
typedef [flag(NDR_PAHEX),v1_enum,public] enum {
- DRSUAPI_ATTRIBUTE_objectClass = 0x00000000,
- DRSUAPI_ATTRIBUTE_cn = 0x00000003,
- DRSUAPI_ATTRIBUTE_description = 0x0000000d,
- DRSUAPI_ATTRIBUTE_member = 0x0000001f,
- DRSUAPI_ATTRIBUTE_instanceType = 0x00020001,
- DRSUAPI_ATTRIBUTE_whenCreated = 0x00020002,
- DRSUAPI_ATTRIBUTE_possSuperiors = 0x00020008,
- DRSUAPI_ATTRIBUTE_hasMasterNCs = 0x0002000e,
- DRSUAPI_ATTRIBUTE_subClassOf = 0x00020015,
- DRSUAPI_ATTRIBUTE_governsID = 0x00020016,
- DRSUAPI_ATTRIBUTE_mustContain = 0x00020018,
- DRSUAPI_ATTRIBUTE_mayContain = 0x00020019,
- DRSUAPI_ATTRIBUTE_rDNAttId = 0x0002001A,
- DRSUAPI_ATTRIBUTE_attributeID = 0x0002001e,
- DRSUAPI_ATTRIBUTE_attributeSyntax = 0x00020020,
- DRSUAPI_ATTRIBUTE_isSingleValued = 0x00020021,
- DRSUAPI_ATTRIBUTE_rangeLower = 0x00020022,
- DRSUAPI_ATTRIBUTE_rangeUpper = 0x00020023,
- DRSUAPI_ATTRIBUTE_dMDLocation = 0x00020024,
- DRSUAPI_ATTRIBUTE_objectVersion = 0x0002004c,
- DRSUAPI_ATTRIBUTE_invocationId = 0x00020073,
- DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly = 0x000200a9,
- DRSUAPI_ATTRIBUTE_adminDisplayName = 0x000200c2,
- DRSUAPI_ATTRIBUTE_adminDescription = 0x000200e2,
- DRSUAPI_ATTRIBUTE_oMSyntax = 0x000200e7,
- DRSUAPI_ATTRIBUTE_ntSecurityDescriptor = 0x00020119,
- DRSUAPI_ATTRIBUTE_searchFlags = 0x0002014e,
- DRSUAPI_ATTRIBUTE_auxiliaryClass = 0x0002015f,
- DRSUAPI_ATTRIBUTE_lDAPDisplayName = 0x000201cc,
- DRSUAPI_ATTRIBUTE_name = 0x00090001,
- DRSUAPI_ATTRIBUTE_userAccountControl = 0x00090008,
- DRSUAPI_ATTRIBUTE_currentValue = 0x0009001b,
- DRSUAPI_ATTRIBUTE_homeDirectory = 0x0009002c,
- DRSUAPI_ATTRIBUTE_homeDrive = 0x0009002d,
- DRSUAPI_ATTRIBUTE_scriptPath = 0x0009003e,
- DRSUAPI_ATTRIBUTE_profilePath = 0x0009008b,
- DRSUAPI_ATTRIBUTE_objectSid = 0x00090092,
- DRSUAPI_ATTRIBUTE_schemaIDGUID = 0x00090094,
- DRSUAPI_ATTRIBUTE_dBCSPwd = 0x00090037,/* lmPwdHash */
- DRSUAPI_ATTRIBUTE_logonHours = 0x00090040,
- DRSUAPI_ATTRIBUTE_userWorkstations = 0x00090056,
- DRSUAPI_ATTRIBUTE_unicodePwd = 0x0009005a,/* ntPwdHash */
- DRSUAPI_ATTRIBUTE_ntPwdHistory = 0x0009005e,
- DRSUAPI_ATTRIBUTE_priorValue = 0x00090064,
- DRSUAPI_ATTRIBUTE_supplementalCredentials = 0x0009007d,
- DRSUAPI_ATTRIBUTE_trustAuthIncoming = 0x00090081,
- DRSUAPI_ATTRIBUTE_trustAuthOutgoing = 0x00090087,
- DRSUAPI_ATTRIBUTE_lmPwdHistory = 0x000900a0,
- DRSUAPI_ATTRIBUTE_systemPossSuperiors = 0x000900c3,
- DRSUAPI_ATTRIBUTE_systemMayContain = 0x000900c4,
- DRSUAPI_ATTRIBUTE_systemMustContain = 0x000900c5,
- DRSUAPI_ATTRIBUTE_systemAuxiliaryClass = 0x000900c6,
- DRSUAPI_ATTRIBUTE_sAMAccountName = 0x000900dd,
- DRSUAPI_ATTRIBUTE_sAMAccountType = 0x0009012e,
- DRSUAPI_ATTRIBUTE_options = 0x00090133,
- DRSUAPI_ATTRIBUTE_fSMORoleOwner = 0x00090171,
- DRSUAPI_ATTRIBUTE_systemFlags = 0x00090177,
- DRSUAPI_ATTRIBUTE_serverReference = 0x00090203,
- DRSUAPI_ATTRIBUTE_serverReferenceBL = 0x00090204,
- DRSUAPI_ATTRIBUTE_initialAuthIncoming = 0x0009021b,
- DRSUAPI_ATTRIBUTE_initialAuthOutgoing = 0x0009021c,
- DRSUAPI_ATTRIBUTE_wellKnownObjects = 0x0009026a,
- DRSUAPI_ATTRIBUTE_dNSHostName = 0x0009026b,
- DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet = 0x0009027f,
- DRSUAPI_ATTRIBUTE_userPrincipalName = 0x00090290,
- DRSUAPI_ATTRIBUTE_groupType = 0x000902ee,
- DRSUAPI_ATTRIBUTE_servicePrincipalName = 0x00090303,
- DRSUAPI_ATTRIBUTE_objectCategory = 0x0009030e,
- DRSUAPI_ATTRIBUTE_gPLink = 0x0009037b,
- DRSUAPI_ATTRIBUTE_transportAddressAttribute = 0x0009037f,
- DRSUAPI_ATTRIBUTE_msDS_Behavior_Version = 0x000905b3,
- DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber = 0x000906f6,
- DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs = 0x0009071c,
- DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs = 0x0009072c,
- DRSUAPI_ATTRIBUTE_NONE = 0xFFFFFFFF
+ DRSUAPI_ATTID_objectClass = 0x00000000,
+ DRSUAPI_ATTID_cn = 0x00000003,
+ DRSUAPI_ATTID_ou = 0x0000000b,
+ DRSUAPI_ATTID_description = 0x0000000d,
+ DRSUAPI_ATTID_member = 0x0000001f,
+ DRSUAPI_ATTID_instanceType = 0x00020001,
+ DRSUAPI_ATTID_whenCreated = 0x00020002,
+ DRSUAPI_ATTID_possSuperiors = 0x00020008,
+ DRSUAPI_ATTID_displayName = 0x0002000d,
+ DRSUAPI_ATTID_hasMasterNCs = 0x0002000e,
+ DRSUAPI_ATTID_nCName = 0x00020010,
+ DRSUAPI_ATTID_subClassOf = 0x00020015,
+ DRSUAPI_ATTID_governsID = 0x00020016,
+ DRSUAPI_ATTID_mustContain = 0x00020018,
+ DRSUAPI_ATTID_mayContain = 0x00020019,
+ DRSUAPI_ATTID_rDNAttId = 0x0002001A,
+ DRSUAPI_ATTID_attributeID = 0x0002001e,
+ DRSUAPI_ATTID_attributeSyntax = 0x00020020,
+ DRSUAPI_ATTID_isSingleValued = 0x00020021,
+ DRSUAPI_ATTID_rangeLower = 0x00020022,
+ DRSUAPI_ATTID_rangeUpper = 0x00020023,
+ DRSUAPI_ATTID_dMDLocation = 0x00020024,
+ DRSUAPI_ATTID_isDeleted = 0x00020030,
+ DRSUAPI_ATTID_objectVersion = 0x0002004c,
+ DRSUAPI_ATTID_invocationId = 0x00020073,
+ DRSUAPI_ATTID_showInAdvancedViewOnly = 0x000200a9,
+ DRSUAPI_ATTID_adminDisplayName = 0x000200c2,
+ DRSUAPI_ATTID_adminDescription = 0x000200e2,
+ DRSUAPI_ATTID_oMSyntax = 0x000200e7,
+ DRSUAPI_ATTID_ntSecurityDescriptor = 0x00020119,
+ DRSUAPI_ATTID_searchFlags = 0x0002014e,
+ DRSUAPI_ATTID_auxiliaryClass = 0x0002015f,
+ DRSUAPI_ATTID_lDAPDisplayName = 0x000201cc,
+ DRSUAPI_ATTID_name = 0x00090001,
+ DRSUAPI_ATTID_userAccountControl = 0x00090008,
+ DRSUAPI_ATTID_badPwdCount = 0x0009000c,
+ DRSUAPI_ATTID_codePage = 0x00090010,
+ DRSUAPI_ATTID_countryCode = 0x00090019,
+ DRSUAPI_ATTID_currentValue = 0x0009001b,
+ DRSUAPI_ATTID_homeDirectory = 0x0009002c,
+ DRSUAPI_ATTID_homeDrive = 0x0009002d,
+ DRSUAPI_ATTID_lastLogoff = 0x00090033,
+ DRSUAPI_ATTID_lastLogon = 0x00090034,
+ DRSUAPI_ATTID_dBCSPwd = 0x00090037,/* lmPwdHash */
+ DRSUAPI_ATTID_scriptPath = 0x0009003e,
+ DRSUAPI_ATTID_logonHours = 0x00090040,
+ DRSUAPI_ATTID_userWorkstations = 0x00090056,
+ DRSUAPI_ATTID_unicodePwd = 0x0009005a,/* ntPwdHash */
+ DRSUAPI_ATTID_ntPwdHistory = 0x0009005e,
+ DRSUAPI_ATTID_pwdLastSet = 0x00090060,
+ DRSUAPI_ATTID_primaryGroupID = 0x00090062,
+ DRSUAPI_ATTID_priorValue = 0x00090064,
+ DRSUAPI_ATTID_supplementalCredentials = 0x0009007d,
+ DRSUAPI_ATTID_trustAuthIncoming = 0x00090081,
+ DRSUAPI_ATTID_trustAuthOutgoing = 0x00090087,
+ DRSUAPI_ATTID_userParameters = 0x0009008a,
+ DRSUAPI_ATTID_profilePath = 0x0009008b,
+ DRSUAPI_ATTID_objectSid = 0x00090092,
+ DRSUAPI_ATTID_schemaIDGUID = 0x00090094,
+ DRSUAPI_ATTID_comment = 0x0009009C,/* User-Comment */
+ DRSUAPI_ATTID_accountExpires = 0x0009009f,
+ DRSUAPI_ATTID_lmPwdHistory = 0x000900a0,
+ DRSUAPI_ATTID_logonCount = 0x000900a9,
+ DRSUAPI_ATTID_systemPossSuperiors = 0x000900c3,
+ DRSUAPI_ATTID_systemMayContain = 0x000900c4,
+ DRSUAPI_ATTID_systemMustContain = 0x000900c5,
+ DRSUAPI_ATTID_systemAuxiliaryClass = 0x000900c6,
+ DRSUAPI_ATTID_sAMAccountName = 0x000900dd,
+ DRSUAPI_ATTID_sAMAccountType = 0x0009012e,
+ DRSUAPI_ATTID_options = 0x00090133,
+ DRSUAPI_ATTID_fSMORoleOwner = 0x00090171,
+ DRSUAPI_ATTID_systemFlags = 0x00090177,
+ DRSUAPI_ATTID_serverReference = 0x00090203,
+ DRSUAPI_ATTID_serverReferenceBL = 0x00090204,
+ DRSUAPI_ATTID_initialAuthIncoming = 0x0009021b,
+ DRSUAPI_ATTID_initialAuthOutgoing = 0x0009021c,
+ DRSUAPI_ATTID_wellKnownObjects = 0x0009026a,
+ DRSUAPI_ATTID_dNSHostName = 0x0009026b,
+ DRSUAPI_ATTID_isMemberOfPartialAttributeSet = 0x0009027f,
+ DRSUAPI_ATTID_userPrincipalName = 0x00090290,
+ DRSUAPI_ATTID_groupType = 0x000902ee,
+ DRSUAPI_ATTID_servicePrincipalName = 0x00090303,
+ DRSUAPI_ATTID_lastKnownParent = 0x0009030d,
+ DRSUAPI_ATTID_objectCategory = 0x0009030e,
+ DRSUAPI_ATTID_gPLink = 0x0009037b,
+ DRSUAPI_ATTID_transportAddressAttribute = 0x0009037f,
+ DRSUAPI_ATTID_msDS_Behavior_Version = 0x000905b3,
+ DRSUAPI_ATTID_msDS_KeyVersionNumber = 0x000906f6,
+ DRSUAPI_ATTID_msDS_HasDomainNCs = 0x0009071c,
+ DRSUAPI_ATTID_msDS_hasMasterNCs = 0x0009072c,
+ DRSUAPI_ATTID_isRecycled = 0x0009080a,
+
+ DRSUAPI_ATTID_INVALID = 0xFFFFFFFF
} drsuapi_DsAttributeId;
typedef struct {
/* Generic DATA_BLOB values */
typedef struct {
- [range(0,10485760),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
+ [range(0,26214400),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
DATA_BLOB *blob;
} drsuapi_DsAttributeValue;
/* DN String values */
typedef [public,gensize] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
} drsuapi_DsReplicaObjectIdentifier3;
typedef [public] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags))] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
[flag(NDR_REMAINING)] DATA_BLOB binary;
} drsuapi_DsReplicaObjectIdentifier3Binary;
- typedef [public] struct {
+ typedef [public,noprint] struct {
drsuapi_DsAttributeId attid;
drsuapi_DsAttributeValueCtr value_ctr;
} drsuapi_DsReplicaAttribute;
drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */
uint32 object_count;
/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
- [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->iconv_convenience,ndr->flags)+55)] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
drsuapi_DsReplicaObjectListItemEx *first_object;
boolean32 more_data;
} drsuapi_DsGetNCChangesCtr1;
drsuapi_DsExtendedError extended_ret;
uint32 object_count;
/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
- [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->iconv_convenience,ndr->flags)+55)] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
drsuapi_DsReplicaObjectListItemEx *first_object;
boolean32 more_data;
uint32 nc_object_count; /* estimated amount of objects in the whole NC */
/* Function 0x06 */
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
- [charset(UTF16),string] uint16 *source_dsa_address;
+ [charset(UTF8), string] uint8 *source_dsa_address;
drsuapi_DrsOptions options;
} drsuapi_DsReplicaDelRequest1;
GUID source_dra;
[charset(UTF16),string] uint16 *source_dra_address;
uint8 schedule[84];
- uint32 replica_flags;
+ drsuapi_DrsOptions replica_flags;
uint32 modify_fields;
drsuapi_DrsOptions options;
} drsuapi_DsReplicaModRequest1;
} drsuapi_DsNameFlags;
typedef [v1_enum] enum {
- DRSUAPI_DS_NAME_FORMAT_UNKNOWN = 0,
- DRSUAPI_DS_NAME_FORMAT_FQDN_1779 = 1,
- DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT = 2,
- DRSUAPI_DS_NAME_FORMAT_DISPLAY = 3,
- DRSUAPI_DS_NAME_FORMAT_GUID = 6,
- DRSUAPI_DS_NAME_FORMAT_CANONICAL = 7,
- DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL = 8,
- DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX = 9,
- DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL = 10,
- DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY = 11,
- DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN = 12
+ DRSUAPI_DS_NAME_FORMAT_UNKNOWN = 0x00000000,
+ DRSUAPI_DS_NAME_FORMAT_FQDN_1779 = 0x00000001,
+ DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT = 0x00000002,
+ DRSUAPI_DS_NAME_FORMAT_DISPLAY = 0x00000003,
+ DRSUAPI_DS_NAME_FORMAT_GUID = 0x00000006,
+ DRSUAPI_DS_NAME_FORMAT_CANONICAL = 0x00000007,
+ DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL = 0x00000008,
+ DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX = 0x00000009,
+ DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL = 0x0000000A,
+ DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY = 0x0000000B,
+ DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN = 0x0000000C,
+ DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID = 0xFFFFFFEF,
+ DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX = 0xFFFFFFF0,
+ DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS = 0xFFFFFFF1,
+ DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON = 0xFFFFFFF2,
+ DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE = 0xFFFFFFF3,
+ DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME = 0xFFFFFFF4,
+ DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME = 0xFFFFFFF5,
+ DRSUAPI_DS_NAME_FORMAT_LIST_NCS = 0xFFFFFFF6,
+ DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS = 0xFFFFFFF7,
+ DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID = 0xFFFFFFF8,
+ DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN = 0xFFFFFFF9,
+ DRSUAPI_DS_NAME_FORMAT_LIST_ROLES = 0xFFFFFFFA,
+ DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER = 0xFFFFFFFB,
+ DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE = 0xFFFFFFFC,
+ DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE = 0xFFFFFFFD,
+ DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE = 0xFFFFFFFE,
+ DRSUAPI_DS_NAME_FORMAT_LIST_SITES = 0xFFFFFFFF
} drsuapi_DsNameFormat;
typedef struct {
/*****************/
/* Function 0x10 */
+ typedef [v1_enum] enum {
+ DRSUAPI_DC_INFO_CTR_1 = 1,
+ DRSUAPI_DC_INFO_CTR_2 = 2,
+ DRSUAPI_DC_INFO_CTR_3 = 3,
+ DRSUAPI_DC_CONNECTION_CTR_01 = 0xFFFFFFFF
+ } drsuapi_DsGetDCInfoCtrLevels;
+
typedef struct {
[charset(UTF16),string] uint16 *domain_name; /* netbios or dns */
- int32 level; /* specifies the switch level for the request */
+ drsuapi_DsGetDCInfoCtrLevels level; /* specifies the switch level for the request */
} drsuapi_DsGetDCInfoRequest1;
typedef [switch_type(int32)] union {
[size_is(count)] drsuapi_DsGetDCConnection01 *array;
} drsuapi_DsGetDCConnectionCtr01;
- typedef [v1_enum] enum {
- DRSUAPI_DC_INFO_CTR_1 = 1,
- DRSUAPI_DC_INFO_CTR_2 = 2,
- DRSUAPI_DC_INFO_CTR_3 = 3,
- DRSUAPI_DC_CONNECTION_CTR_01 = -1
- } drsuapi_DsGetDCInfoCtrLevels;
-
- typedef [switch_type(int32)] union {
+ typedef [switch_type(drsuapi_DsGetDCInfoCtrLevels)] union {
[case(DRSUAPI_DC_INFO_CTR_1)] drsuapi_DsGetDCInfoCtr1 ctr1;
[case(DRSUAPI_DC_INFO_CTR_2)] drsuapi_DsGetDCInfoCtr2 ctr2;
[case(DRSUAPI_DC_INFO_CTR_3)] drsuapi_DsGetDCInfoCtr3 ctr3;
[in] policy_handle *bind_handle,
[in] int32 level,
[in,ref,switch_is(level)] drsuapi_DsGetDCInfoRequest *req,
- [out,ref] int32 *level_out,
+ [out,ref] drsuapi_DsGetDCInfoCtrLevels *level_out,
[out,ref,switch_is(*level_out)] drsuapi_DsGetDCInfoCtr *ctr
);
*/
const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID = "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
+ /* Error codes to classify an error that occurs
+ * during a search for, or the update of,
+ * a directory object */
+ typedef [v1_enum] enum {
+ DRSUAPI_DIRERR_OK = 0,
+ DRSUAPI_DIRERR_ATTRIBUTE = 1,
+ DRSUAPI_DIRERR_NAME = 2,
+ DRSUAPI_DIRERR_REFERRAL = 3,
+ DRSUAPI_DIRERR_SECURITY = 4,
+ DRSUAPI_DIRERR_SERVICE = 5,
+ DRSUAPI_DIRERR_UPDATE = 6,
+ DRSUAPI_DIRERR_SYSTEM = 7
+ } drsuapi_DsAddEntry_DirErr;
+
/*
- * please note the the current idl
- * for DsAddEntry does only parse
- * what I saw between 2 w2k3 boxes
- * in my dssync experiments I got some other replies
- * so all I want to say is that this is very incomplete yet...
- * --metze
+ * Ref: DRS_MSG_ADDENTRYREQ_V2, [MS-DRSR]: 4.1.1.1.3
*/
typedef struct {
drsuapi_DsReplicaObjectListItem first_object;
} drsuapi_DsAddEntryRequest2;
- typedef [switch_type(int32)] union {
+ /* Buffer type is actually more
+ * like a semi Flags
+ * Ref: DRS_SecBuffer, [MS-DRSR]: 5.41 */
+ typedef [v1_enum,noprint] enum {
+ DRSUAPI_SECBUFFER_EMPTY = 0x00000000,
+ DRSUAPI_SECBUFFER_DATA = 0x00000001,
+ DRSUAPI_SECBUFFER_TOKEN = 0x00000002,
+ DRSUAPI_SECBUFFER_PKG_PARAMS = 0x00000003,
+ DRSUAPI_SECBUFFER_MISSING = 0x00000004,
+ DRSUAPI_SECBUFFER_EXTRA = 0x00000005,
+ DRSUAPI_SECBUFFER_STREAM_TRAILER = 0x00000006,
+ DRSUAPI_SECBUFFER_STREAM_HEADER = 0x00000007,
+ DRSUAPI_SECBUFFER_READONLY = 0x80000000
+ } drsuapi_SecBufferType;
+
+ typedef struct {
+ [range(0,10000)] uint32 buf_size;
+ drsuapi_SecBufferType buf_type;
+ [size_is(buf_size)] uint8 *buffer;
+ } drsuapi_SecBuffer;
+
+ typedef struct {
+ [value(0)] uint32 version;
+ [range(0,10000)] uint32 buff_count;
+ [size_is(buff_count)] drsuapi_SecBuffer *buffers;
+ } drsuapi_SecBufferDesc;
+
+ /*
+ * Ref: DRS_MSG_ADDENTRYREQ_V3, [MS-DRSR]: 4.1.1.1.4
+ */
+ typedef struct {
+ drsuapi_DsReplicaObjectListItem first_object;
+ drsuapi_SecBufferDesc *client_creds;
+ } drsuapi_DsAddEntryRequest3;
+
+ typedef [switch_type(uint32)] union {
[case(2)] drsuapi_DsAddEntryRequest2 req2;
+ [case(3)] drsuapi_DsAddEntryRequest3 req3;
} drsuapi_DsAddEntryRequest;
+ /* Generic extended error info
+ * commonly used in most places
+ * where rich error info is returned */
typedef struct {
- uint32 unknown1;
- WERROR status;
- uint32 unknown2;
- uint16 unknown3;
+ uint32 dsid; /* implementation-specific diagnostic code */
+ WERROR extended_err; /* 0, STATUS code, or Windows error code */
+ uint32 extended_data; /* implementation-specific diagnostic code */
+ uint16 problem; /* 0 or PROBLEM error code */
} drsuapi_DsAddEntryErrorInfoX;
+ /* Attribute errors
+ * Ref: ATRERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.11 */
typedef struct {
- [range(0,10485760)] uint32 size;
- [size_is(size)] uint8 *data;
- } drsuapi_DsAddEntryExtraErrorBuffer;
-
- typedef struct {
- drsuapi_DsAddEntryErrorInfoX error;
+ uint32 dsid;
+ WERROR extended_err;
+ uint32 extended_data;
+ uint16 problem;
drsuapi_DsAttributeId attid;
- uint32 unknown2;
- drsuapi_DsAddEntryExtraErrorBuffer buffer;
- } drsuapi_DsAddEntryExtraError1;
+ boolean32 is_val_returned;
+ drsuapi_DsAttributeValue attr_val;
+ } drsuapi_DsAddEntry_AttrErr_V1;
- typedef /*[noprint]*/ struct {
- drsuapi_DsAddEntryErrorListItem1 *next;
- drsuapi_DsAddEntryExtraError1 error;
- } drsuapi_DsAddEntryErrorListItem1;
+ typedef [noprint] struct {
+ drsuapi_DsAddEntry_AttrErrListItem_V1 *next;
+ drsuapi_DsAddEntry_AttrErr_V1 err_data;
+ } drsuapi_DsAddEntry_AttrErrListItem_V1;
typedef struct {
drsuapi_DsReplicaObjectIdentifier *id;
- WERROR status;
- drsuapi_DsAddEntryErrorListItem1 first;
- } drsuapi_DsAddEntryErrorInfo1;
+ uint32 count;
+ drsuapi_DsAddEntry_AttrErrListItem_V1 first;
+ } drsuapi_DsAddEntryErrorInfo_Attr_V1;
+
+ /* Name resolution error
+ * Ref: NAMERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.14 */
+ typedef struct {
+ uint32 dsid;
+ WERROR extended_err;
+ uint32 extended_data;
+ uint16 problem;
+ drsuapi_DsReplicaObjectIdentifier *id_matched; /* The best match for the supplied object identity */
+ } drsuapi_DsAddEntryErrorInfo_Name_V1;
+
+ /* Referral error
+ * Ref: REFERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.15 */
+ typedef struct {
+ [value(83)] uint8 name_res; /* Must be 'S' */
+ [value(0)] uint8 unused_pad;
+ [value(0)] uint16 next_rdn;
+ } drsuapi_NameResOp_V1;
+
+ typedef [enum16bit] enum {
+ DRSUAPI_CH_REFTYPE_SUPERIOR = 0x0000, /* referral to a superior DC */
+ DRSUAPI_CH_REFTYPE_SUBORDINATE = 0x0001, /* referral to a subordinate DC */
+ DRSUAPI_CH_REFTYPE_NSSR = 0x0002, /* Not used */
+ DRSUAPI_CH_REFTYPE_CROSS = 0x0003 /* A referral to an external crossRef object */
+ } drsuapi_DsAddEntry_RefType;
+
+ typedef [enum8bit] enum {
+ DRSUAPI_SE_CHOICE_BASE_ONLY = 0x00,
+ DRSUAPI_SE_CHOICE_IMMED_CHLDRN = 0x01,
+ DRSUAPI_SE_CHOICE_WHOLE_SUBTREE = 0x02
+ } drsuapi_DsAddEntry_ChoiceType;
+
+ /* list of network names of the DCs
+ * to which the referral is directed */
+ typedef struct {
+ drsuapi_DsaAddressListItem_V1 *next;
+ lsa_String *address;
+ } drsuapi_DsaAddressListItem_V1;
+
+ typedef struct {
+ drsuapi_DsReplicaObjectIdentifier *id_target; /* object to which the referral is directed */
+ drsuapi_NameResOp_V1 op_state;
+ [value(0)] uint16 rdn_alias;
+ [value(0)] uint16 rdn_internal;
+ drsuapi_DsAddEntry_RefType ref_type;
+ uint16 addr_list_count;
+ drsuapi_DsaAddressListItem_V1 *addr_list;
+ drsuapi_DsAddEntry_RefErrListItem_V1 *next;
+ boolean32 is_choice_set;
+ drsuapi_DsAddEntry_ChoiceType choice;
+ } drsuapi_DsAddEntry_RefErrListItem_V1;
+
+ typedef struct {
+ uint32 dsid;
+ WERROR extended_err;
+ uint32 extended_data;
+ drsuapi_DsAddEntry_RefErrListItem_V1 refer;
+ } drsuapi_DsAddEntryErrorInfo_Referr_V1;
typedef [switch_type(uint32)] union {
- [case(1)] drsuapi_DsAddEntryErrorInfo1 error1;
-/* [case(2)] drsuapi_DsAddEntryErrorInfo2 error2;
- [case(3)] drsuapi_DsAddEntryErrorInfo3 error3;
-*/ [case(4)] drsuapi_DsAddEntryErrorInfoX errorX;
- [case(5)] drsuapi_DsAddEntryErrorInfoX errorX;
- [case(6)] drsuapi_DsAddEntryErrorInfoX errorX;
- [case(7)] drsuapi_DsAddEntryErrorInfoX errorX;
+ [case(1)] drsuapi_DsAddEntryErrorInfo_Attr_V1 attr_err;
+ [case(2)] drsuapi_DsAddEntryErrorInfo_Name_V1 name_err;
+ [case(3)] drsuapi_DsAddEntryErrorInfo_Referr_V1 referral_err;
+ [case(4)] drsuapi_DsAddEntryErrorInfoX security_err;
+ [case(5)] drsuapi_DsAddEntryErrorInfoX service_err;
+ [case(6)] drsuapi_DsAddEntryErrorInfoX update_err;
+ [case(7)] drsuapi_DsAddEntryErrorInfoX system_err;
} drsuapi_DsAddEntryErrorInfo;
typedef struct {
WERROR status;
- uint32 level;
- [switch_is(level)] drsuapi_DsAddEntryErrorInfo *info;
- } drsuapi_DsAddEntryError1;
+ drsuapi_DsAddEntry_DirErr dir_err;
+ [switch_is(dir_err)] drsuapi_DsAddEntryErrorInfo *info;
+ } drsuapi_DsAddEntry_ErrData_V1;
typedef [switch_type(uint32)] union {
- [case(1)] drsuapi_DsAddEntryError1 info1;
- } drsuapi_DsAddEntryError;
+ [case(1)] drsuapi_DsAddEntry_ErrData_V1 v1;
+ } drsuapi_DsAddEntry_ErrData;
typedef struct {
GUID guid;
typedef struct {
drsuapi_DsReplicaObjectIdentifier *id;
- uint32 unknown1;
- drsuapi_DsAddEntryErrorInfoX error;
+ drsuapi_DsAddEntry_DirErr dir_err;
+ uint32 dsid; /* implementation-specific diagnostic code */
+ WERROR extended_err; /* 0, STATUS code, or Windows error code */
+ uint32 extended_data; /* implementation-specific diagnostic code */
+ uint16 problem; /* 0 or PROBLEM error code */
[range(0,10000)] uint32 count;
[size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
} drsuapi_DsAddEntryCtr2;
typedef struct {
drsuapi_DsReplicaObjectIdentifier *id;
- uint32 level;
- [switch_is(level)] drsuapi_DsAddEntryError *error;
+ uint32 err_ver; /* Must be 1 */
+ [switch_is(err_ver)] drsuapi_DsAddEntry_ErrData *err_data;
[range(0,10000)] uint32 count;
[size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
} drsuapi_DsAddEntryCtr3;
- typedef [switch_type(int32)] union {
+ typedef [switch_type(uint32)] union {
[case(2)] drsuapi_DsAddEntryCtr2 ctr2;
[case(3)] drsuapi_DsAddEntryCtr3 ctr3;
} drsuapi_DsAddEntryCtr;
[public] WERROR drsuapi_DsAddEntry(
[in] policy_handle *bind_handle,
- [in] int32 level,
+ [in] uint32 level,
[in,ref,switch_is(level)] drsuapi_DsAddEntryRequest *req,
- [out,ref] int32 *level_out,
+ [out,ref] uint32 *level_out,
[out,ref,switch_is(*level_out)] drsuapi_DsAddEntryCtr *ctr
);