diff options
Diffstat (limited to 'librpc/idl/drsuapi.idl')
-rw-r--r-- | librpc/idl/drsuapi.idl | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl index 7e3d34317ec..f1c6cd6e911 100644 --- a/librpc/idl/drsuapi.idl +++ b/librpc/idl/drsuapi.idl @@ -115,14 +115,14 @@ interface drsuapi } drsuapi_SupportedExtensionsExt; /* this is used by w2k */ - typedef struct { + typedef [public] struct { drsuapi_SupportedExtensions supported_extensions; GUID site_guid; uint32 pid; } drsuapi_DsBindInfo24; /* this is used by w2k3 */ - typedef struct { + typedef [public] struct { drsuapi_SupportedExtensions supported_extensions; GUID site_guid; uint32 pid; @@ -130,7 +130,7 @@ interface drsuapi } drsuapi_DsBindInfo28; /* this is used by w2k8 */ - typedef struct { + typedef [public] struct { drsuapi_SupportedExtensions supported_extensions; GUID site_guid; uint32 pid; @@ -139,15 +139,21 @@ interface drsuapi GUID config_dn_guid; } drsuapi_DsBindInfo48; - typedef struct { + typedef [public] struct { [flag(NDR_REMAINING)] DATA_BLOB info; } drsuapi_DsBindInfoFallBack; - typedef [nodiscriminant] union { - [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24; - [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28; - [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48; - [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack; + typedef [nopull, nopush, noprint] [nodiscriminant] union { + [case(24)][subcontext(0), subcontext_size(24)] drsuapi_DsBindInfo24 info24; + [case(28)][subcontext(0), subcontext_size(28)] drsuapi_DsBindInfo28 info28; + [case(48)][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfo48 info48; + /* + * The size for the defaut case is a bit arbitrary it in fact the value + * of the switch but we can't reference it. + * As we hand(un-)marshall this structure it has 0 impact and makes + * pidl happy for wireshark too + */ + [default][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfoFallBack Fallback; } drsuapi_DsBindInfo; /* the drsuapi_DsBindInfoCtr was this before @@ -160,11 +166,44 @@ interface drsuapi * so we're doing it here */ + /* + * MS-DRSR.pdf gives the following definition + typedef struct { + [range(1,10000)] DWORD cb; + [size_is(cb)] BYTE rgb[]; + } DRS_EXTENSIONS; + + But we use a subcontext which has a slighly different signification on how + data are laid out. + With the MS-DRSR definition we will have + size_is_cb cv rgb_array + with size_is_cb being a uint3264 and cv being a uint32 + + We used to have typedef struct { [range(1,10000)] uint32 length; [switch_is(length)] drsuapi_DsBindInfo info; } drsuapi_DsBindInfoCtr; + typedef [nodiscriminant] union { + [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24; + [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28; + [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48; + [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack; + } drsuapi_DsBindInfo; + + With this definition data is laid out this way: + length subcontext_size drsuapi_DsBindInfoxx + with length being a uint32 and subcontext_size being a uint3264 + + It has clearly an impact on the way things are aligned when using NDR64 + */ + typedef [flag(NDR_NOALIGN)] struct { + [range(1,10000)] uint3264 length; + [value(length)] uint32 __ndr_length; + [switch_is(length)] drsuapi_DsBindInfo info; + } drsuapi_DsBindInfoCtr; + /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work * * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04 |