summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-08-13 16:16:59 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-08-13 16:16:59 +1000
commitbf002d1173519a48bbcf00bfb9ec4164cea47d2c (patch)
treef9a83b1c739204b4116e699c4f2bcff805240cf6 /source4/librpc
parent5eb48615ea59610738d13d2a8780f268cb7db86c (diff)
downloadsamba-bf002d1173519a48bbcf00bfb9ec4164cea47d2c.tar.gz
samba-bf002d1173519a48bbcf00bfb9ec4164cea47d2c.tar.bz2
samba-bf002d1173519a48bbcf00bfb9ec4164cea47d2c.zip
Rework the trustAuthInOutBlob with the help of a hand parser.
This produces a C structure that is sane, while still parsing the wire blobs (as far as I can tell). Andrew Bartlett (This used to be commit b5dbe815e5dd3f865c7735bc76e02017a869f09b)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/config.mk2
-rw-r--r--source4/librpc/idl/drsblobs.idl33
2 files changed, 9 insertions, 26 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index d87683dd6f..d884c0d3cb 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -133,7 +133,7 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_COMPRESSION NDR_SECURITY NDR_SAMR ASN1_UTIL
NDR_DRSUAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsuapi.o $(ndrsrcdir)/ndr_drsuapi.o
[SUBSYSTEM::NDR_DRSBLOBS]
-PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_DRSUAPI
+PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_DRSUAPI LIBCLI_DRSBLOBS
NDR_DRSBLOBS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsblobs.o
diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl
index b0cddfcdf9..eb85989eda 100644
--- a/source4/librpc/idl/drsblobs.idl
+++ b/source4/librpc/idl/drsblobs.idl
@@ -401,7 +401,7 @@ interface drsblobs {
[case(TRUST_AUTH_TYPE_VERSION)] AuthInfoVersion version;
} AuthInfo;
- typedef struct {
+ typedef [public] struct {
NTTIME LastUpdateTime;
trustAuthType AuthType;
@@ -422,32 +422,15 @@ interface drsblobs {
[flag(NDR_ALIGN4)] DATA_BLOB _pad;
} AuthenticationInformation;
- typedef struct {
- AuthenticationInformation info[1];
- } AuthenticationInformation1;
-
- typedef struct {
- AuthenticationInformation info[2];
- } AuthenticationInformation2;
-
- typedef struct {
- [relative] AuthenticationInformation1 *current;
- [relative] AuthenticationInformation1 *previous;
- } AuthenticationInformationCtr1;
-
- typedef struct {
- [relative] AuthenticationInformation2 *current;
- [relative] AuthenticationInformation2 *previous;
- } AuthenticationInformationCtr2;
+ typedef [nopull,nopush,noprint] struct {
+ /* sizeis here is bogus, but this is here just for the structure */
+ [size_is(1)] AuthenticationInformation array[];
+ } AuthenticationInformationArray;
- typedef [nodiscriminant] union {
- [case(1)] AuthenticationInformationCtr1 info1;
- [case(2)] AuthenticationInformationCtr2 info2;
- } AuthenticationInformationCtr;
-
- typedef [public] struct {
+ typedef [public,nopull,nopush,noprint] struct {
uint32 count;
- [switch_is(count)] AuthenticationInformationCtr auth;
+ [relative] AuthenticationInformationArray *current;
+ [relative] AuthenticationInformationArray *previous;
} trustAuthInOutBlob;
void decode_trustAuthInOut(