diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-14 11:56:28 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-14 18:44:21 +1100 |
commit | 259129e8f4bc8cacd1850eba3f6551134835d079 (patch) | |
tree | c260895bc44323820cee72a8eaf6a77433090d5d /librpc | |
parent | ccfa40fdc3eb785b71a4d2d59933a2fdc352fb24 (diff) | |
download | samba-259129e8f4bc8cacd1850eba3f6551134835d079.tar.gz samba-259129e8f4bc8cacd1850eba3f6551134835d079.tar.bz2 samba-259129e8f4bc8cacd1850eba3f6551134835d079.zip |
a4-dcerpc: another attempt at dcerpc auth padding
The last change broke net vampire against w2k8r2
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/dcerpc.h | 3 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_dcerpc.c | 9 | ||||
-rw-r--r-- | librpc/idl/dcerpc.idl | 3 |
3 files changed, 15 insertions, 0 deletions
diff --git a/librpc/gen_ndr/dcerpc.h b/librpc/gen_ndr/dcerpc.h index 375a4e900d..f05541c407 100644 --- a/librpc/gen_ndr/dcerpc.h +++ b/librpc/gen_ndr/dcerpc.h @@ -180,14 +180,17 @@ struct dcerpc_auth { }/* [public] */; struct dcerpc_auth3 { + uint32_t _pad;/* [value(0)] */ DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */ }/* [public] */; struct dcerpc_orphaned { + uint32_t _pad;/* [value(0)] */ DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */ }/* [public] */; struct dcerpc_co_cancel { + uint32_t _pad;/* [value(0)] */ DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */ }/* [public] */; diff --git a/librpc/gen_ndr/ndr_dcerpc.c b/librpc/gen_ndr/ndr_dcerpc.c index 0884d8e505..dca445a872 100644 --- a/librpc/gen_ndr/ndr_dcerpc.c +++ b/librpc/gen_ndr/ndr_dcerpc.c @@ -866,6 +866,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_auth3(struct ndr_push *ndr, int ndr_f { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); @@ -883,6 +884,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_auth3(struct ndr_pull *ndr, int ndr_f { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); @@ -900,6 +902,7 @@ _PUBLIC_ void ndr_print_dcerpc_auth3(struct ndr_print *ndr, const char *name, co { ndr_print_struct(ndr, name, "dcerpc_auth3"); ndr->depth++; + ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad); ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info); ndr->depth--; } @@ -908,6 +911,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_orphaned(struct ndr_push *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); @@ -925,6 +929,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_orphaned(struct ndr_pull *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); @@ -942,6 +947,7 @@ _PUBLIC_ void ndr_print_dcerpc_orphaned(struct ndr_print *ndr, const char *name, { ndr_print_struct(ndr, name, "dcerpc_orphaned"); ndr->depth++; + ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad); ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info); ndr->depth--; } @@ -950,6 +956,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_co_cancel(struct ndr_push *ndr, int n { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); @@ -967,6 +974,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_co_cancel(struct ndr_pull *ndr, int n { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); @@ -984,6 +992,7 @@ _PUBLIC_ void ndr_print_dcerpc_co_cancel(struct ndr_print *ndr, const char *name { ndr_print_struct(ndr, name, "dcerpc_co_cancel"); ndr->depth++; + ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad); ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info); ndr->depth--; } diff --git a/librpc/idl/dcerpc.idl b/librpc/idl/dcerpc.idl index ccf5e5de68..adc1f4ebb5 100644 --- a/librpc/idl/dcerpc.idl +++ b/librpc/idl/dcerpc.idl @@ -155,14 +155,17 @@ interface dcerpc const uint8 DCERPC_AUTH_TRAILER_LENGTH = 8; typedef [public] struct { + [value(0)] uint32 _pad; [flag(NDR_REMAINING)] DATA_BLOB auth_info; } dcerpc_auth3; typedef [public] struct { + [value(0)] uint32 _pad; [flag(NDR_REMAINING)] DATA_BLOB auth_info; } dcerpc_orphaned; typedef [public] struct { + [value(0)] uint32 _pad; [flag(NDR_REMAINING)] DATA_BLOB auth_info; } dcerpc_co_cancel; |