diff options
Diffstat (limited to 'librpc')
53 files changed, 2793 insertions, 428 deletions
diff --git a/librpc/gen_ndr/cli_samr.c b/librpc/gen_ndr/cli_samr.c index 27119e53cc..72f5f74864 100644 --- a/librpc/gen_ndr/cli_samr.c +++ b/librpc/gen_ndr/cli_samr.c @@ -10448,7 +10448,7 @@ struct tevent_req *rpccli_samr_ChangePasswordUser3_send(TALLOC_CTX *mem_ctx, struct samr_Password *_lm_verifier /* [in] [unique] */, struct samr_CryptPassword *_password3 /* [in] [unique] */, struct samr_DomInfo1 **_dominfo /* [out] [ref] */, - struct samr_ChangeReject **_reject /* [out] [ref] */) + struct userPwdChangeFailureInformation **_reject /* [out] [ref] */) { struct tevent_req *req; struct rpccli_samr_ChangePasswordUser3_state *state; @@ -10576,7 +10576,7 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, struct samr_Password *lm_verifier /* [in] [unique] */, struct samr_CryptPassword *password3 /* [in] [unique] */, struct samr_DomInfo1 **dominfo /* [out] [ref] */, - struct samr_ChangeReject **reject /* [out] [ref] */) + struct userPwdChangeFailureInformation **reject /* [out] [ref] */) { struct samr_ChangePasswordUser3 r; NTSTATUS status; diff --git a/librpc/gen_ndr/cli_samr.h b/librpc/gen_ndr/cli_samr.h index ed2baa9aba..c94ff11cc7 100644 --- a/librpc/gen_ndr/cli_samr.h +++ b/librpc/gen_ndr/cli_samr.h @@ -963,7 +963,7 @@ struct tevent_req *rpccli_samr_ChangePasswordUser3_send(TALLOC_CTX *mem_ctx, struct samr_Password *_lm_verifier /* [in] [unique] */, struct samr_CryptPassword *_password3 /* [in] [unique] */, struct samr_DomInfo1 **_dominfo /* [out] [ref] */, - struct samr_ChangeReject **_reject /* [out] [ref] */); + struct userPwdChangeFailureInformation **_reject /* [out] [ref] */); NTSTATUS rpccli_samr_ChangePasswordUser3_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS *result); @@ -978,7 +978,7 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, struct samr_Password *lm_verifier /* [in] [unique] */, struct samr_CryptPassword *password3 /* [in] [unique] */, struct samr_DomInfo1 **dominfo /* [out] [ref] */, - struct samr_ChangeReject **reject /* [out] [ref] */); + struct userPwdChangeFailureInformation **reject /* [out] [ref] */); struct tevent_req *rpccli_samr_Connect5_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli, diff --git a/librpc/gen_ndr/drsuapi.h b/librpc/gen_ndr/drsuapi.h index 52b6ee9ac2..96b0651c4f 100644 --- a/librpc/gen_ndr/drsuapi.h +++ b/librpc/gen_ndr/drsuapi.h @@ -15,6 +15,38 @@ #define DRSUAPI_DS_BIND_GUID_W2K3 ( "6afab99c-6e26-464a-975f-f58f105218bc" ) #define DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR ( 0x1 ) #define DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID ( "E3514235-4B06-11D1-AB04-00C04FC2DCD2" ) +/* bitmap drsuapi_DrsOptions */ +#define DRSUAPI_DRS_ASYNC_OP ( 0x00000001 ) +#define DRSUAPI_DRS_GETCHG_CHECK ( 0x00000002 ) +#define DRSUAPI_DRS_ADD_REF ( 0x00000004 ) +#define DRSUAPI_DRS_SYNC_ALL ( 0x00000008 ) +#define DRSUAPI_DRS_DEL_REF ( 0x00000008 ) +#define DRSUAPI_DRS_WRIT_REP ( 0x00000010 ) +#define DRSUAPI_DRS_INIT_SYNC ( 0x00000020 ) +#define DRSUAPI_DRS_PER_SYNC ( 0x00000040 ) +#define DRSUAPI_DRS_MAIL_REP ( 0x00000080 ) +#define DRSUAPI_DRS_ASYNC_REP ( 0x00000100 ) +#define DRSUAPI_DRS_IGNORE_ERROR ( 0x00000100 ) +#define DRSUAPI_DRS_TWOWAY_SYNC ( 0x00000200 ) +#define DRSUAPI_DRS_CRITICAL_ONLY ( 0x00000400 ) +#define DRSUAPI_DRS_GET_ANC ( 0x00000800 ) +#define DRSUAPI_DRS_GET_NC_SIZE ( 0x00001000 ) +#define DRSUAPI_DRS_LOCAL_ONLY ( 0x00001000 ) +#define DRSUAPI_DRS_SYNC_BYNAME ( 0x00004000 ) +#define DRSUAPI_DRS_REF_OK ( 0x00004000 ) +#define DRSUAPI_DRS_FULL_SYNC_NOW ( 0x00008000 ) +#define DRSUAPI_DRS_NO_SOURCE ( 0x00008000 ) +#define DRSUAPI_DRS_FULL_SYNC_PACKET ( 0x00020000 ) +#define DRSUAPI_DRS_REF_GCSPN ( 0x00100000 ) +#define DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING ( 0x00800000 ) +#define DRSUAPI_DRS_SYNC_FORCED ( 0x02000000 ) +#define DRSUAPI_DRS_DISABLE_AUTO_SYNC ( 0x04000000 ) +#define DRSUAPI_DRS_DISABLE_PERIODIC_SYNC ( 0x08000000 ) +#define DRSUAPI_DRS_USE_COMPRESSION ( 0x10000000 ) +#define DRSUAPI_DRS_NEVER_NOTIFY ( 0x20000000 ) +#define DRSUAPI_DRS_SYNC_PAS ( 0x40000000 ) +#define DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP ( 0x80000000 ) + /* bitmap drsuapi_SupportedExtensions */ #define DRSUAPI_SUPPORTED_EXTENSION_BASE ( 0x00000001 ) #define DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION ( 0x00000002 ) @@ -261,9 +293,9 @@ struct drsuapi_DsGetNCChangesRequest5 { }; struct drsuapi_DsReplicaOID { - uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaOID_oid(oid,0)),range(0,10000)] */ - const char *oid;/* [unique,charset(DOS),size_is(__ndr_size)] */ -}/* [nopush,nopull] */; + uint32_t length;/* [range(0,10000)] */ + uint8_t *binary_oid;/* [unique,size_is(length)] */ +}/* [noprint] */; struct drsuapi_DsReplicaOIDMapping { uint32_t id_prefix; diff --git a/librpc/gen_ndr/misc.h b/librpc/gen_ndr/misc.h index aa24a0fe17..29ea19296a 100644 --- a/librpc/gen_ndr/misc.h +++ b/librpc/gen_ndr/misc.h @@ -50,4 +50,45 @@ struct KRB5_EDATA_NTSTATUS { uint32_t unknown2; }/* [public] */; +enum winreg_Type +#ifndef USE_UINT_ENUMS + { + REG_NONE=(int)(0), + REG_SZ=(int)(1), + REG_EXPAND_SZ=(int)(2), + REG_BINARY=(int)(3), + REG_DWORD=(int)(4), + REG_DWORD_BIG_ENDIAN=(int)(5), + REG_LINK=(int)(6), + REG_MULTI_SZ=(int)(7), + REG_RESOURCE_LIST=(int)(8), + REG_FULL_RESOURCE_DESCRIPTOR=(int)(9), + REG_RESOURCE_REQUIREMENTS_LIST=(int)(10), + REG_QWORD=(int)(11) +} +#else + { __donnot_use_enum_winreg_Type=0x7FFFFFFF} +#define REG_NONE ( 0 ) +#define REG_SZ ( 1 ) +#define REG_EXPAND_SZ ( 2 ) +#define REG_BINARY ( 3 ) +#define REG_DWORD ( 4 ) +#define REG_DWORD_BIG_ENDIAN ( 5 ) +#define REG_LINK ( 6 ) +#define REG_MULTI_SZ ( 7 ) +#define REG_RESOURCE_LIST ( 8 ) +#define REG_FULL_RESOURCE_DESCRIPTOR ( 9 ) +#define REG_RESOURCE_REQUIREMENTS_LIST ( 10 ) +#define REG_QWORD ( 11 ) +#endif +; + +union winreg_Data { + const char * string;/* [flag(LIBNDR_FLAG_STR_NULLTERM),case(REG_SZ)] */ + DATA_BLOB binary;/* [flag(LIBNDR_FLAG_REMAINING),case(REG_BINARY)] */ + uint32_t value;/* [case(REG_DWORD)] */ + const char ** string_array;/* [flag(LIBNDR_FLAG_STR_NULLTERM),case(REG_MULTI_SZ)] */ + DATA_BLOB data;/* [flag(LIBNDR_FLAG_REMAINING),default] */ +}/* [nodiscriminant,public] */; + #endif /* _HEADER_misc */ diff --git a/librpc/gen_ndr/nbt.h b/librpc/gen_ndr/nbt.h index ec234e1748..dc39a5c912 100644 --- a/librpc/gen_ndr/nbt.h +++ b/librpc/gen_ndr/nbt.h @@ -411,7 +411,10 @@ struct nbt_sockaddr { #define NBT_SERVER_NDNC ( 0x00000400 ) #define NBT_SERVER_SELECT_SECRET_DOMAIN_6 ( 0x00000800 ) #define NBT_SERVER_FULL_SECRET_DOMAIN_6 ( 0x00001000 ) -#define NBT_SERVER_DNS_FOREST ( 0x01000000 ) +#define NBT_SERVER_ADS_WEB_SERVICE ( 0x00002000 ) +#define NBT_SERVER_HAS_DNS_NAME ( 0x20000000 ) +#define NBT_SERVER_IS_DEFAULT_NC ( 0x40000000 ) +#define NBT_SERVER_FOREST_ROOT ( 0x80000000 ) /* bitmap netlogon_nt_version_flags */ #define NETLOGON_NT_VERSION_1 ( 0x00000001 ) diff --git a/librpc/gen_ndr/ndr_dcerpc.c b/librpc/gen_ndr/ndr_dcerpc.c index c86984109f..37f6d54818 100644 --- a/librpc/gen_ndr/ndr_dcerpc.c +++ b/librpc/gen_ndr/ndr_dcerpc.c @@ -15,6 +15,7 @@ static enum ndr_err_code ndr_push_dcerpc_ctx_list(struct ndr_push *ndr, int ndr_ for (cntr_transfer_syntaxes_0 = 0; cntr_transfer_syntaxes_0 < r->num_transfer_syntaxes; cntr_transfer_syntaxes_0++) { NDR_CHECK(ndr_push_ndr_syntax_id(ndr, NDR_SCALARS, &r->transfer_syntaxes[cntr_transfer_syntaxes_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -37,6 +38,7 @@ static enum ndr_err_code ndr_pull_dcerpc_ctx_list(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_ndr_syntax_id(ndr, NDR_SCALARS, &r->transfer_syntaxes[cntr_transfer_syntaxes_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transfer_syntaxes_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -88,6 +90,7 @@ static enum ndr_err_code ndr_push_dcerpc_bind(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -123,6 +126,7 @@ static enum ndr_err_code ndr_pull_dcerpc_bind(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -157,6 +161,7 @@ static enum ndr_err_code ndr_push_dcerpc_empty(struct ndr_push *ndr, int ndr_fla { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -167,6 +172,7 @@ static enum ndr_err_code ndr_pull_dcerpc_empty(struct ndr_pull *ndr, int ndr_fla { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -184,6 +190,7 @@ static enum ndr_err_code ndr_push_dcerpc_object(struct ndr_push *ndr, int ndr_fl { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { default: { NDR_CHECK(ndr_push_dcerpc_empty(ndr, NDR_SCALARS, &r->empty)); @@ -214,6 +221,7 @@ static enum ndr_err_code ndr_pull_dcerpc_object(struct ndr_pull *ndr, int ndr_fl int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { default: { NDR_CHECK(ndr_pull_dcerpc_empty(ndr, NDR_SCALARS, &r->empty)); @@ -276,6 +284,7 @@ static enum ndr_err_code ndr_push_dcerpc_request(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->stub_and_verifier)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -303,6 +312,7 @@ static enum ndr_err_code ndr_pull_dcerpc_request(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->stub_and_verifier)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -330,6 +340,7 @@ static enum ndr_err_code ndr_push_dcerpc_ack_ctx(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->result)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reason)); NDR_CHECK(ndr_push_ndr_syntax_id(ndr, NDR_SCALARS, &r->syntax)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -343,6 +354,7 @@ static enum ndr_err_code ndr_pull_dcerpc_ack_ctx(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->result)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reason)); NDR_CHECK(ndr_pull_ndr_syntax_id(ndr, NDR_SCALARS, &r->syntax)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -385,6 +397,7 @@ static enum ndr_err_code ndr_push_dcerpc_bind_ack(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -422,6 +435,7 @@ static enum ndr_err_code ndr_pull_dcerpc_bind_ack(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -463,6 +477,7 @@ static enum ndr_err_code ndr_push_dcerpc_bind_nak_versions(struct ndr_push *ndr, for (cntr_versions_0 = 0; cntr_versions_0 < r->num_versions; cntr_versions_0++) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->versions[cntr_versions_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -483,6 +498,7 @@ static enum ndr_err_code ndr_pull_dcerpc_bind_nak_versions(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->versions[cntr_versions_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_versions_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -512,6 +528,7 @@ static enum ndr_err_code ndr_push_dcerpc_bind_nak_versions_ctr(struct ndr_push * { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED: { NDR_CHECK(ndr_push_dcerpc_bind_nak_versions(ndr, NDR_SCALARS, &r->v)); @@ -541,6 +558,7 @@ static enum ndr_err_code ndr_pull_dcerpc_bind_nak_versions_ctr(struct ndr_pull * int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED: { NDR_CHECK(ndr_pull_dcerpc_bind_nak_versions(ndr, NDR_SCALARS, &r->v)); @@ -587,6 +605,7 @@ static enum ndr_err_code ndr_push_dcerpc_bind_nak(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reject_reason)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->versions, r->reject_reason)); NDR_CHECK(ndr_push_dcerpc_bind_nak_versions_ctr(ndr, NDR_SCALARS, &r->versions)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dcerpc_bind_nak_versions_ctr(ndr, NDR_BUFFERS, &r->versions)); @@ -601,6 +620,7 @@ static enum ndr_err_code ndr_pull_dcerpc_bind_nak(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reject_reason)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->versions, r->reject_reason)); NDR_CHECK(ndr_pull_dcerpc_bind_nak_versions_ctr(ndr, NDR_SCALARS, &r->versions)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dcerpc_bind_nak_versions_ctr(ndr, NDR_BUFFERS, &r->versions)); @@ -637,6 +657,7 @@ static enum ndr_err_code ndr_push_dcerpc_response(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->stub_and_verifier)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -662,6 +683,7 @@ static enum ndr_err_code ndr_pull_dcerpc_response(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->stub_and_verifier)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -694,6 +716,7 @@ static enum ndr_err_code ndr_push_dcerpc_fault(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -714,6 +737,7 @@ static enum ndr_err_code ndr_pull_dcerpc_fault(struct ndr_pull *ndr, int ndr_fla NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -809,6 +833,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_auth(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->credentials)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -830,6 +855,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_auth(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->credentials)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -860,6 +886,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_auth3(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -877,6 +904,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_auth3(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -903,6 +931,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_orphaned(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -920,6 +949,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_orphaned(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -946,6 +976,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_co_cancel(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -963,6 +994,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_co_cancel(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -984,6 +1016,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_cl_cancel(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -996,6 +1029,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_cl_cancel(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1018,6 +1052,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_cancel_ack(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->server_is_accepting)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1031,6 +1066,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_cancel_ack(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->server_is_accepting)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1062,6 +1098,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_fack(struct ndr_push *ndr, int ndr_fl for (cntr_selack_0 = 0; cntr_selack_0 < r->selack_size; cntr_selack_0++) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->selack[cntr_selack_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1088,6 +1125,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_fack(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->selack[cntr_selack_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_selack_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1123,6 +1161,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_ack(struct ndr_push *ndr, int ndr_fla { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1133,6 +1172,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_ack(struct ndr_pull *ndr, int ndr_fla { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1150,6 +1190,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_ping(struct ndr_push *ndr, int ndr_fl { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1160,6 +1201,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_ping(struct ndr_pull *ndr, int ndr_fl { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1177,6 +1219,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_shutdown(struct ndr_push *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1187,6 +1230,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_shutdown(struct ndr_pull *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1204,6 +1248,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_working(struct ndr_push *ndr, int ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1214,6 +1259,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_working(struct ndr_pull *ndr, int ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1274,6 +1320,7 @@ static enum ndr_err_code ndr_push_dcerpc_payload(struct ndr_push *ndr, int ndr_f { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case DCERPC_PKT_REQUEST: { NDR_CHECK(ndr_push_dcerpc_request(ndr, NDR_SCALARS, &r->request)); @@ -1435,6 +1482,7 @@ static enum ndr_err_code ndr_pull_dcerpc_payload(struct ndr_pull *ndr, int ndr_f int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case DCERPC_PKT_REQUEST: { NDR_CHECK(ndr_pull_dcerpc_request(ndr, NDR_SCALARS, &r->request)); @@ -1695,6 +1743,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ncacn_packet(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->call_id)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->ptype)); NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_SCALARS, &r->u)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_BUFFERS, &r->u)); @@ -1716,6 +1765,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ncacn_packet(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->call_id)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->ptype)); NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_SCALARS, &r->u)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_BUFFERS, &r->u)); @@ -1765,6 +1815,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ncadg_packet(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->serial_low)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->ptype)); NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_SCALARS, &r->u)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_BUFFERS, &r->u)); @@ -1797,6 +1848,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ncadg_packet(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->serial_low)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->ptype)); NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_SCALARS, &r->u)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_BUFFERS, &r->u)); diff --git a/librpc/gen_ndr/ndr_dfs.c b/librpc/gen_ndr/ndr_dfs.c index 20d3f22004..62f42bad15 100644 --- a/librpc/gen_ndr/ndr_dfs.c +++ b/librpc/gen_ndr/ndr_dfs.c @@ -35,6 +35,7 @@ static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -45,6 +46,7 @@ static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -63,6 +65,7 @@ static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -87,6 +90,7 @@ static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, } else { r->path = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -153,6 +157,7 @@ static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -193,6 +198,7 @@ static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, } NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -275,6 +281,7 @@ static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->server)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->share)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server) { @@ -314,6 +321,7 @@ static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_ } else { r->share = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server) { @@ -374,6 +382,7 @@ static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -433,6 +442,7 @@ static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, } else { r->stores = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -531,6 +541,7 @@ static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -592,6 +603,7 @@ static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, } else { r->stores = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -718,6 +730,7 @@ static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -762,6 +775,7 @@ static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -853,6 +867,7 @@ static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -866,6 +881,7 @@ static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -888,6 +904,7 @@ static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); @@ -901,6 +918,7 @@ static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info)); @@ -931,6 +949,7 @@ static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entry_path) { @@ -994,6 +1013,7 @@ static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, } else { r->stores = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entry_path) { @@ -1089,6 +1109,7 @@ static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1100,6 +1121,7 @@ static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1119,6 +1141,7 @@ static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -1143,6 +1166,7 @@ static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flag } else { r->comment = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -1179,6 +1203,7 @@ static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1190,6 +1215,7 @@ static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1209,6 +1235,7 @@ static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1220,6 +1247,7 @@ static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1239,6 +1267,7 @@ static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1250,6 +1279,7 @@ static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1269,6 +1299,7 @@ static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1280,6 +1311,7 @@ static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1303,6 +1335,7 @@ static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -1331,6 +1364,7 @@ static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -1372,6 +1406,7 @@ static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state)); NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1384,6 +1419,7 @@ static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state)); NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1404,6 +1440,7 @@ static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dom_root) { @@ -1428,6 +1465,7 @@ static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flag } else { r->dom_root = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dom_root) { @@ -1461,14 +1499,14 @@ _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, con static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -1490,6 +1528,7 @@ static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dom_root) { @@ -1515,6 +1554,7 @@ static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flag } else { r->dom_root = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dom_root) { @@ -1552,6 +1592,7 @@ static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -1742,6 +1783,7 @@ static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -2194,6 +2236,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2224,6 +2267,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_f } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2280,6 +2324,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2310,6 +2355,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_f } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2366,6 +2412,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2396,6 +2443,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_f } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2452,6 +2500,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2482,6 +2531,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_f } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2538,6 +2588,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2568,6 +2619,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_f } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2624,6 +2676,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2654,6 +2707,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_f } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2710,6 +2764,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2740,6 +2795,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2796,6 +2852,7 @@ static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2826,6 +2883,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr } else { r->s = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->s) { @@ -2880,6 +2938,7 @@ static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); @@ -2993,6 +3052,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_fla if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_info1; @@ -3249,6 +3309,7 @@ static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level)); NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); @@ -3263,6 +3324,7 @@ static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level)); NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e)); @@ -3286,6 +3348,7 @@ static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->unknown2) { @@ -3311,6 +3374,7 @@ static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int nd } else { r->unknown2 = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->unknown2) { diff --git a/librpc/gen_ndr/ndr_drsblobs.c b/librpc/gen_ndr/ndr_drsblobs.c index 5b57b361ea..8a0842bce3 100644 --- a/librpc/gen_ndr/ndr_drsblobs.c +++ b/librpc/gen_ndr/ndr_drsblobs.c @@ -17,6 +17,7 @@ static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, in NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -33,6 +34,7 @@ static enum ndr_err_code ndr_pull_replPropertyMetaData1(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -62,6 +64,7 @@ static enum ndr_err_code ndr_push_replPropertyMetaDataCtr1(struct ndr_push *ndr, for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -83,6 +86,7 @@ static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr1(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -113,6 +117,7 @@ static enum ndr_err_code ndr_push_replPropertyMetaDataCtr(struct ndr_push *ndr, { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -140,6 +145,7 @@ static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr(struct ndr_pull *ndr, int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -184,6 +190,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -198,6 +205,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -225,6 +233,7 @@ static enum ndr_err_code ndr_push_replUpToDateVectorCtr1(struct ndr_push *ndr, i for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -246,6 +255,7 @@ static enum ndr_err_code ndr_pull_replUpToDateVectorCtr1(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -282,6 +292,7 @@ static enum ndr_err_code ndr_push_replUpToDateVectorCtr2(struct ndr_push *ndr, i for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -303,6 +314,7 @@ static enum ndr_err_code ndr_pull_replUpToDateVectorCtr2(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -333,6 +345,7 @@ static enum ndr_err_code ndr_push_replUpToDateVectorCtr(struct ndr_push *ndr, in { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -367,6 +380,7 @@ static enum ndr_err_code ndr_pull_replUpToDateVectorCtr(struct ndr_pull *ndr, in int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -422,6 +436,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -436,6 +451,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -459,6 +475,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->dns_name) + 1)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, strlen(r->dns_name) + 1, sizeof(uint8_t), CH_DOS)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -471,6 +488,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__dns_name_size)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, r->__dns_name_size, sizeof(uint8_t), CH_DOS)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -512,6 +530,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->other_info) { @@ -553,6 +572,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->other_info) { @@ -629,6 +649,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2OtherInfo(struct ndr_push *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r)); @@ -692,6 +713,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2OtherInfo(struct ndr_pull *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r)); @@ -779,6 +801,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo2(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->other_info) { @@ -821,6 +844,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo2(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->other_info) { @@ -881,6 +905,7 @@ static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, int ndr_flags { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1)); @@ -917,6 +942,7 @@ static enum ndr_err_code ndr_pull_repsFromTo(struct ndr_pull *ndr, int ndr_flags int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1)); @@ -974,6 +1000,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_BUFFERS, &r->ctr)); @@ -989,6 +1016,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_BUFFERS, &r->ctr)); @@ -1016,6 +1044,7 @@ static enum ndr_err_code ndr_push_partialAttributeSetCtr1(struct ndr_push *ndr, for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1036,6 +1065,7 @@ static enum ndr_err_code ndr_pull_partialAttributeSetCtr1(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1065,6 +1095,7 @@ static enum ndr_err_code ndr_push_partialAttributeSetCtr(struct ndr_push *ndr, i { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -1092,6 +1123,7 @@ static enum ndr_err_code ndr_pull_partialAttributeSetCtr(struct ndr_pull *ndr, i int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -1136,6 +1168,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1150,6 +1183,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1195,6 +1229,7 @@ static enum ndr_err_code ndr_push_prefixMapCtr(struct ndr_push *ndr, int ndr_fla { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case PREFIX_MAP_VERSION_DSDB: { NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb)); @@ -1223,6 +1258,7 @@ static enum ndr_err_code ndr_pull_prefixMapCtr(struct ndr_pull *ndr, int ndr_fla int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case PREFIX_MAP_VERSION_DSDB: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb)); @@ -1268,6 +1304,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -1283,6 +1320,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -1305,6 +1343,7 @@ static enum ndr_err_code ndr_push_ldapControlDirSyncExtra(struct ndr_push *ndr, { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 0: { break; } @@ -1334,6 +1373,7 @@ static enum ndr_err_code ndr_pull_ldapControlDirSyncExtra(struct ndr_pull *ndr, int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 0: { break; } @@ -1391,6 +1431,7 @@ static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, i NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0))); NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra)); @@ -1411,6 +1452,7 @@ static enum ndr_err_code ndr_pull_ldapControlDirSyncBlob(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length)); NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra)); @@ -1447,6 +1489,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *nd NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob)); NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_blob, 0, -1)); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r)); @@ -1468,6 +1511,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *nd NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob)); NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_blob, 0, -1)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r)); @@ -1494,6 +1538,7 @@ static enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 2 * strlen_m(r->name), sizeof(uint8_t), CH_UTF16)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data, strlen(r->data), sizeof(uint8_t), CH_DOS)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1509,6 +1554,7 @@ static enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, r->name_len, sizeof(uint8_t), CH_UTF16)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data, r->data_len, sizeof(uint8_t), CH_DOS)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1532,7 +1578,7 @@ static enum ndr_err_code ndr_push_supplementalCredentialsSignature(struct ndr_pu { uint32_t _flags_save_ENUM = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); ndr->flags = _flags_save_ENUM; } return NDR_ERR_SUCCESS; @@ -1544,7 +1590,7 @@ static enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pu { uint32_t _flags_save_ENUM = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; ndr->flags = _flags_save_ENUM; } @@ -1570,13 +1616,14 @@ static enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push { uint32_t cntr_packages_0; if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 2)); + NDR_CHECK(ndr_push_align(ndr, 3)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_PREFIX, 0x30, sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_supplementalCredentialsSignature(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_SIGNATURE)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_packages)); for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) { NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1588,7 +1635,7 @@ static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull uint32_t cntr_packages_0; TALLOC_CTX *_mem_save_packages_0; if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 2)); + NDR_CHECK(ndr_pull_align(ndr, 3)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->prefix, 0x30, sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_pull_supplementalCredentialsSignature(ndr, NDR_SCALARS, &r->signature)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_packages)); @@ -1599,6 +1646,7 @@ static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_packages_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1645,6 +1693,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags))); } NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1665,6 +1714,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, r->__ndr_size)); } NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1693,6 +1743,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, i NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names)); ndr->flags = _flags_save_string_array; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1709,6 +1760,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names)); ndr->flags = _flags_save_string_array; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1735,6 +1787,7 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1775,6 +1828,7 @@ static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1831,6 +1885,7 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosKey3(struct ndr_push *n NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1874,6 +1929,7 @@ static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey3(struct ndr_pull *n } ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1938,6 +1994,7 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt)); @@ -1981,6 +2038,7 @@ static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding3)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding5)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt)); @@ -2053,6 +2111,7 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosKey4(struct ndr_push *n NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2097,6 +2156,7 @@ static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey4(struct ndr_pull *n } ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2164,6 +2224,7 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *n for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) { NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt)); @@ -2226,6 +2287,7 @@ static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull *n NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt)); @@ -2318,6 +2380,7 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *nd { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 3: { NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3)); @@ -2354,6 +2417,7 @@ static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *nd int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 3: { NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3)); @@ -2411,6 +2475,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -2426,6 +2491,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version)); NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -2454,6 +2520,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2470,6 +2537,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2492,6 +2560,7 @@ static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2508,6 +2577,7 @@ static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2542,6 +2612,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push * for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) { NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2566,6 +2637,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull * NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2600,6 +2672,7 @@ static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2611,6 +2684,7 @@ static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2631,6 +2705,7 @@ static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16)); NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2643,6 +2718,7 @@ static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2664,6 +2740,7 @@ static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2677,6 +2754,7 @@ static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); NDR_PULL_ALLOC_N(ndr, r->password, r->size); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2698,6 +2776,7 @@ static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2710,6 +2789,7 @@ static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2729,6 +2809,7 @@ static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case TRUST_AUTH_TYPE_NONE: { NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none)); @@ -2777,6 +2858,7 @@ static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case TRUST_AUTH_TYPE_NONE: { NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none)); @@ -2860,6 +2942,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *n NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2880,6 +2963,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *n NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2912,6 +2996,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) { NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) { @@ -2946,6 +3031,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, } } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -3015,6 +3101,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, i } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags))); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3039,6 +3126,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker)); NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3051,6 +3139,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker)); NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3072,6 +3161,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -3095,6 +3185,7 @@ static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -3131,6 +3222,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -3154,6 +3246,7 @@ static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -3190,6 +3283,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -3213,6 +3307,7 @@ static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int nd } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -3246,14 +3341,14 @@ _PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -3274,6 +3369,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: { NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name)); @@ -3309,10 +3405,11 @@ static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *nd uint16_t _level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: { NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name)); @@ -3366,6 +3463,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present)); NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n)); @@ -3380,6 +3478,7 @@ static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present)); NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n)); @@ -3399,14 +3498,14 @@ _PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const c static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -3432,6 +3531,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: { NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string)); @@ -3504,10 +3604,11 @@ static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int uint16_t _level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: { NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string)); @@ -3618,6 +3719,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type)); NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p)); @@ -3632,6 +3734,7 @@ static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type)); NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p)); @@ -3667,6 +3770,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) { NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->next) { @@ -3713,6 +3817,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int if (r->params) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->next) { @@ -3769,6 +3874,7 @@ static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -3790,6 +3896,7 @@ static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int } else { r->info = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { diff --git a/librpc/gen_ndr/ndr_drsuapi.c b/librpc/gen_ndr/ndr_drsuapi.c index a09566c600..f09affcfb5 100644 --- a/librpc/gen_ndr/ndr_drsuapi.c +++ b/librpc/gen_ndr/ndr_drsuapi.c @@ -7,6 +7,57 @@ #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_samr.h" #include "librpc/ndr/ndr_compression.h" +_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_OP", DRSUAPI_DRS_ASYNC_OP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GETCHG_CHECK", DRSUAPI_DRS_GETCHG_CHECK, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ADD_REF", DRSUAPI_DRS_ADD_REF, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_ALL", DRSUAPI_DRS_SYNC_ALL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DEL_REF", DRSUAPI_DRS_DEL_REF, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_WRIT_REP", DRSUAPI_DRS_WRIT_REP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC", DRSUAPI_DRS_INIT_SYNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PER_SYNC", DRSUAPI_DRS_PER_SYNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_MAIL_REP", DRSUAPI_DRS_MAIL_REP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_REP", DRSUAPI_DRS_ASYNC_REP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_IGNORE_ERROR", DRSUAPI_DRS_IGNORE_ERROR, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_TWOWAY_SYNC", DRSUAPI_DRS_TWOWAY_SYNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_CRITICAL_ONLY", DRSUAPI_DRS_CRITICAL_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ANC", DRSUAPI_DRS_GET_ANC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_NC_SIZE", DRSUAPI_DRS_GET_NC_SIZE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_LOCAL_ONLY", DRSUAPI_DRS_LOCAL_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_BYNAME", DRSUAPI_DRS_SYNC_BYNAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_OK", DRSUAPI_DRS_REF_OK, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_NOW", DRSUAPI_DRS_FULL_SYNC_NOW, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_SOURCE", DRSUAPI_DRS_NO_SOURCE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_PACKET", DRSUAPI_DRS_FULL_SYNC_PACKET, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_GCSPN", DRSUAPI_DRS_REF_GCSPN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_FORCED", DRSUAPI_DRS_SYNC_FORCED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_AUTO_SYNC", DRSUAPI_DRS_DISABLE_AUTO_SYNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", DRSUAPI_DRS_DISABLE_PERIODIC_SYNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_USE_COMPRESSION", DRSUAPI_DRS_USE_COMPRESSION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_NOTIFY", DRSUAPI_DRS_NEVER_NOTIFY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_PAS", DRSUAPI_DRS_SYNC_PAS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_drsuapi_SupportedExtensions(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -92,6 +143,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsBindInfo24(struct ndr_push *ndr, int NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -105,6 +157,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsBindInfo24(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -129,6 +182,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsBindInfo28(struct ndr_push *ndr, int NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -143,6 +197,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsBindInfo28(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -170,6 +225,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsBindInfo48(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch)); NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_extensions_ext)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->config_dn_guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -186,6 +242,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsBindInfo48(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch)); NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_extensions_ext)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->config_dn_guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -215,6 +272,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsBindInfoFallBack(struct ndr_push *nd NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -231,6 +289,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsBindInfoFallBack(struct ndr_pull *nd NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->info)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -249,6 +308,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsBindInfo(struct ndr_push *ndr, int n { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 1)); switch (level) { case 24: { { @@ -313,6 +373,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsBindInfo(struct ndr_pull *ndr, int n int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 1)); switch (level) { case 24: { { @@ -403,6 +464,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsBindInfoCtr(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->length)); NDR_CHECK(ndr_push_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -419,6 +481,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsBindInfoCtr(struct ndr_pull *ndr, in } NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->length)); NDR_CHECK(ndr_pull_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -446,6 +509,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -467,6 +531,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr if (r->dn) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->dn, r->__ndr_size_dn + 1)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -550,6 +615,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest1(struct ndr_push ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncOptions(ndr, NDR_SCALARS, r->options)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -594,6 +660,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest1(struct ndr_pull ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncOptions(ndr, NDR_SCALARS, &r->options)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -643,6 +710,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest(struct ndr_push * if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -676,6 +744,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest(struct ndr_pull * if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -720,6 +789,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaHighWaterMark(struct ndr_pu NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->tmp_highest_usn)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->reserved_usn)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -733,6 +803,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaHighWaterMark(struct ndr_pu NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->tmp_highest_usn)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->reserved_usn)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -755,6 +826,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor(struct ndr_push *ndr NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -767,6 +839,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor(struct ndr_pull *ndr NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -795,6 +868,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtrEx(struct ndr_push * for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -825,6 +899,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull * if (r->cursors) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->cursors, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1011,6 +1086,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size)); NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -1049,6 +1125,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest5(struct ndr_pull NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size)); NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -1090,18 +1167,55 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, co ndr->depth--; } -_PUBLIC_ void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOID *r) +static enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r) { - ndr_print_struct(ndr, name, "drsuapi_DsReplicaOID"); - ndr->depth++; - ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0):r->__ndr_size); - ndr_print_ptr(ndr, "oid", r->oid); - ndr->depth++; - if (r->oid) { - ndr_print_string(ndr, "oid", r->oid); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 5)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary_oid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } - ndr->depth--; - ndr->depth--; + if (ndr_flags & NDR_BUFFERS) { + if (r->binary_oid) { + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r) +{ + uint32_t _ptr_binary_oid; + TALLOC_CTX *_mem_save_binary_oid_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 5)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + if (r->length > 10000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_oid)); + if (_ptr_binary_oid) { + NDR_PULL_ALLOC(ndr, r->binary_oid); + } else { + r->binary_oid = NULL; + } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->binary_oid) { + _mem_save_binary_oid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->binary_oid, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->binary_oid)); + NDR_PULL_ALLOC_N(ndr, r->binary_oid, ndr_get_array_size(ndr, &r->binary_oid)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, ndr_get_array_size(ndr, &r->binary_oid))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_oid_0, 0); + } + if (r->binary_oid) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->binary_oid, r->length)); + } + } + return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOIDMapping *r) @@ -1110,6 +1224,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push *n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id_prefix)); NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid)); @@ -1123,6 +1238,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping(struct ndr_pull *n NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id_prefix)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid)); @@ -1146,6 +1262,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_p NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_mappings)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->mappings)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->mappings) { @@ -1179,6 +1296,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_p } else { r->mappings = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->mappings) { @@ -1347,6 +1465,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsPartialAttributeSet(struct ndr_push for (cntr_attids_0 = 0; cntr_attids_0 < r->num_attids; cntr_attids_0++) { NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attids[cntr_attids_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1376,6 +1495,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsPartialAttributeSet(struct ndr_pull if (r->attids) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->attids, r->num_attids)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1423,6 +1543,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex)); NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -1485,6 +1606,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull r->partial_attribute_set_ex = NULL; } NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -1573,6 +1695,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest10(struct ndr_pus NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex)); NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -1636,6 +1759,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest10(struct ndr_pul } NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -1709,6 +1833,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest(struct ndr_push if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 5: { NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5)); @@ -1758,6 +1883,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest(struct ndr_pull if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 5: { NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5)); @@ -1826,6 +1952,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push *nd NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_sync_success)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1839,6 +1966,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2(struct ndr_pull *nd NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_sync_success)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1868,6 +1996,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2CtrEx(struct ndr_push for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1898,6 +2027,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull if (r->cursors) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->cursors, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1932,6 +2062,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAttributeValue(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->blob, 0))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->blob)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->blob) { @@ -1957,6 +2088,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull *ndr, } else { r->blob = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->blob) { @@ -1990,6 +2122,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAttributeValueCtr(struct ndr_push *n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_values)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->values)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->values) { @@ -2023,6 +2156,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull *n } else { r->values = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->values) { @@ -2082,6 +2216,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct nd NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -2099,6 +2234,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct nd NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, r->__ndr_size_dn + 1, sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -2141,6 +2277,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(str NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->binary)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -2165,6 +2302,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(str NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->binary)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -2198,6 +2336,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push * NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid)); NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr)); @@ -2211,6 +2350,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull * NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid)); NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr)); @@ -2234,6 +2374,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttributeCtr(struct ndr_push NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attributes)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->attributes) { @@ -2267,6 +2408,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull } else { r->attributes = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->attributes) { @@ -2347,6 +2489,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObject(struct ndr_push *ndr NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier)); NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->identifier) { @@ -2371,6 +2514,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull *ndr } NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->identifier) { @@ -2407,6 +2551,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaData(struct ndr_push *ndr NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2421,6 +2566,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaData(struct ndr_pull *ndr NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2448,6 +2594,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaDataCtr(struct ndr_push for (cntr_meta_data_0 = 0; cntr_meta_data_0 < r->count; cntr_meta_data_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data[cntr_meta_data_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2475,6 +2622,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull if (r->meta_data) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->meta_data, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2509,6 +2657,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_nc_prefix)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->parent_object_guid)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->meta_data_ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->next_object) { @@ -2555,6 +2704,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr } else { r->meta_data_ctr = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->next_object) { @@ -2596,6 +2746,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push * NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->iconv_convenience, ndr->flags) + 55)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -2649,6 +2800,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull * r->first_object = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -2745,6 +2897,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaLinkedAttribute(struct ndr_ NDR_CHECK(ndr_push_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_add_time)); NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->identifier) { @@ -2772,6 +2925,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaLinkedAttribute(struct ndr_ NDR_CHECK(ndr_pull_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_add_time)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->identifier) { @@ -2825,6 +2979,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push * NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linked_attributes_count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->linked_attributes)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->drs_error)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -2904,6 +3059,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull * r->linked_attributes = NULL; } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->drs_error)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -3017,6 +3173,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1)); NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1)); } + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3033,6 +3190,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1)); NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3057,6 +3215,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6)); NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1)); } + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3073,6 +3232,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6)); NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3101,6 +3261,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pul } else { r->ts = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->ts) { @@ -3152,6 +3313,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pul } else { r->ts = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->ts) { @@ -3203,6 +3365,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pu } else { r->ts = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->ts) { @@ -3254,6 +3417,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pu } else { r->ts = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->ts) { @@ -3323,6 +3487,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCompressedCtr(struct ndr ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): { NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1)); @@ -3380,6 +3545,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(struct ndr ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): { NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1)); @@ -3465,6 +3631,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push *nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1)); @@ -3477,6 +3644,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull *nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1)); @@ -3500,6 +3668,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr7(struct ndr_push *nd NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressionType(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16))); NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -3521,6 +3690,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr7(struct ndr_pull *nd } NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16))); NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -3544,6 +3714,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr(struct ndr_push *ndr if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -3601,6 +3772,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr(struct ndr_pull *ndr if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -3714,6 +3886,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr NDR_CHECK(ndr_push_ref_ptr(ndr)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid)); NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsOptions(ndr, NDR_SCALARS, r->options)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -3746,6 +3919,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr } NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsOptions(ndr, NDR_SCALARS, &r->options)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -3785,6 +3959,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_ if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -3818,6 +3993,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_ if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -3889,6 +4065,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest1(struct ndr_push * NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, r->options)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -3924,6 +4101,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest1(struct ndr_pull * } NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, &r->options)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -3978,6 +4156,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest2(struct ndr_push * NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, r->options)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -4035,6 +4214,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest2(struct ndr_pull * } NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, &r->options)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -4105,6 +4285,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -4146,6 +4327,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -4228,6 +4410,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest1(struct ndr_push * NDR_CHECK(ndr_push_ref_ptr(ndr)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address)); NDR_CHECK(ndr_push_drsuapi_DsReplicaDeleteOptions(ndr, NDR_SCALARS, r->options)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -4262,6 +4445,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest1(struct ndr_pull * r->source_dsa_address = NULL; } NDR_CHECK(ndr_pull_drsuapi_DsReplicaDeleteOptions(ndr, NDR_SCALARS, &r->options)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -4307,6 +4491,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -4340,6 +4525,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -4414,6 +4600,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest1(struct ndr_push * NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->replica_flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->modify_fields)); NDR_CHECK(ndr_push_drsuapi_DsReplicaModifyOptions(ndr, NDR_SCALARS, r->options)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -4452,6 +4639,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest1(struct ndr_pull * NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->replica_flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->modify_fields)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaModifyOptions(ndr, NDR_SCALARS, &r->options)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -4501,6 +4689,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -4534,6 +4723,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -4614,6 +4804,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr1(struct ndr_push * NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_attrs)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info_array) { @@ -4693,6 +4884,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull * } else { r->sids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info_array) { @@ -4846,6 +5038,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -4879,6 +5072,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -4926,6 +5120,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest1(struct ndr_pu NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_drsuapi_DsMembershipType(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info_array) { @@ -4975,6 +5170,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest1(struct ndr_pu } else { r->domain = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info_array) { @@ -5058,6 +5254,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest(struct ndr_pus if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -5091,6 +5288,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest(struct ndr_pul if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -5136,6 +5334,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_p NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -5164,6 +5363,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_p } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -5202,6 +5402,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_pu if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -5235,6 +5436,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_pu if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -5287,6 +5489,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_push NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data1)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->data1) { @@ -5336,6 +5539,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull } else { r->data2 = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->data1) { @@ -5397,6 +5601,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_push if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -5430,6 +5635,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_pull if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -5565,6 +5771,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsNameString(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->str)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->str) { @@ -5589,6 +5796,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsNameString(struct ndr_pull *ndr, int } else { r->str = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->str) { @@ -5632,6 +5840,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsNameRequest1(struct ndr_push *ndr, i NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr, NDR_SCALARS, r->format_desired)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -5670,6 +5879,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest1(struct ndr_pull *ndr, i } else { r->names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -5729,6 +5939,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsNameRequest(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -5762,6 +5973,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -5806,6 +6018,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsNameInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_drsuapi_DsNameStatus(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->result_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dns_domain_name) { @@ -5845,6 +6058,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsNameInfo1(struct ndr_pull *ndr, int } else { r->result_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dns_domain_name) { @@ -5902,6 +6116,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsNameCtr1(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5932,6 +6147,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr1(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5986,6 +6202,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsNameCtr(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); @@ -6022,6 +6239,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_ctr1; @@ -6111,6 +6329,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest1(struct ndr_p NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->spn_names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->object_dn) { @@ -6160,6 +6379,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_p } else { r->spn_names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->object_dn) { @@ -6234,6 +6454,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest(struct ndr_pu if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -6267,6 +6488,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest(struct ndr_pu if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -6309,6 +6531,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult1(struct ndr_pu if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -6320,6 +6543,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult1(struct ndr_pu if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -6339,6 +6563,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult(struct ndr_pus if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1)); @@ -6371,6 +6596,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult(struct ndr_pul if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1)); @@ -6414,6 +6640,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_pu NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_dn)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->commit)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_dn) { @@ -6453,6 +6680,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pu r->domain_dn = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->commit)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_dn) { @@ -6508,6 +6736,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest(struct ndr_pus if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -6541,6 +6770,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest(struct ndr_pul if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -6583,6 +6813,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_pus if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->last_dc_in_domain)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -6594,6 +6825,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pul if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->last_dc_in_domain)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -6613,6 +6845,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult(struct ndr_push if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1)); @@ -6645,6 +6878,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult(struct ndr_pull if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1)); @@ -6687,6 +6921,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest1(struct ndr_push *n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name)); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->level)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain_name) { @@ -6712,6 +6947,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest1(struct ndr_pull *n r->domain_name = NULL; } NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->level)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain_name) { @@ -6749,6 +6985,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest(struct ndr_push *nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -6782,6 +7019,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest(struct ndr_pull *nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -6830,6 +7068,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -6912,6 +7151,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo1(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -7024,6 +7264,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr1(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -7057,6 +7298,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull *ndr, } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -7124,6 +7366,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->computer_guid)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->server_guid)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ntds_guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -7239,6 +7482,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo2(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->computer_guid)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->server_guid)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ntds_guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -7392,6 +7636,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr2(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -7425,6 +7670,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr2(struct ndr_pull *ndr, } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -7493,6 +7739,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo3(struct ndr_push *ndr, int NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->computer_guid)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->server_guid)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ntds_guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -7609,6 +7856,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo3(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->computer_guid)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->server_guid)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ntds_guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -7763,6 +8011,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr3(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -7796,6 +8045,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr3(struct ndr_pull *ndr, } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -7861,6 +8111,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCConnection01(struct ndr_push *n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_account)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client_account) { @@ -7896,6 +8147,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCConnection01(struct ndr_pull *n } else { r->client_account = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client_account) { @@ -7940,6 +8192,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCConnectionCtr01(struct ndr_push NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -7973,6 +8226,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCConnectionCtr01(struct ndr_pull } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -8027,6 +8281,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case DRSUAPI_DC_INFO_CTR_1: { NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -8084,6 +8339,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr(struct ndr_pull *ndr, i if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case DRSUAPI_DC_INFO_CTR_1: { NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -8163,6 +8419,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItem(struct ndr_p NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->next_object)); NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->next_object) { @@ -8186,6 +8443,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItem(struct ndr_p r->next_object = NULL; } NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->next_object) { @@ -8204,6 +8462,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest2(struct ndr_push *nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object)); @@ -8216,6 +8475,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest2(struct ndr_pull *nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object)); @@ -8236,6 +8496,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest(struct ndr_push *ndr if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 2: { NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr, NDR_SCALARS, &r->req2)); @@ -8269,6 +8530,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest(struct ndr_pull *ndr if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 2: { NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr, NDR_SCALARS, &r->req2)); @@ -8314,6 +8576,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfoX(struct ndr_push * NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown3)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8328,6 +8591,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfoX(struct ndr_pull * NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8351,6 +8615,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_ NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -8377,6 +8642,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_ } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -8416,6 +8682,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryExtraError1(struct ndr_push NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(ndr, NDR_SCALARS, &r->buffer)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraErrorBuffer(ndr, NDR_BUFFERS, &r->buffer)); @@ -8431,6 +8698,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryExtraError1(struct ndr_pull NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(ndr, NDR_SCALARS, &r->buffer)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(ndr, NDR_BUFFERS, &r->buffer)); @@ -8455,6 +8723,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorListItem1(struct ndr_pu NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->next)); NDR_CHECK(ndr_push_drsuapi_DsAddEntryExtraError1(ndr, NDR_SCALARS, &r->error)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->next) { @@ -8478,6 +8747,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorListItem1(struct ndr_pu r->next = NULL; } NDR_CHECK(ndr_pull_drsuapi_DsAddEntryExtraError1(ndr, NDR_SCALARS, &r->error)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->next) { @@ -8512,6 +8782,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo1(struct ndr_push * NDR_CHECK(ndr_push_unique_ptr(ndr, r->id)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorListItem1(ndr, NDR_SCALARS, &r->first)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->id) { @@ -8536,6 +8807,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo1(struct ndr_pull * } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status)); NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorListItem1(ndr, NDR_SCALARS, &r->first)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->id) { @@ -8569,6 +8841,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo1(ndr, NDR_SCALARS, &r->error1)); @@ -8630,6 +8903,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo1(ndr, NDR_SCALARS, &r->error1)); @@ -8718,6 +8992,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryError1(struct ndr_push *ndr, NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -8742,6 +9017,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryError1(struct ndr_pull *ndr, } else { r->info = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -8776,6 +9052,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryError(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsAddEntryError1(ndr, NDR_SCALARS, &r->info1)); @@ -8809,6 +9086,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryError(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsAddEntryError1(ndr, NDR_SCALARS, &r->info1)); @@ -8852,6 +9130,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier2(struct ndr_ NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -8865,6 +9144,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier2(struct ndr_ NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid)); @@ -8891,6 +9171,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr2(struct ndr_push *ndr, i NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->error)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->objects)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->id) { @@ -8937,6 +9218,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr2(struct ndr_pull *ndr, i } else { r->objects = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->id) { @@ -9010,6 +9292,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr3(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->error)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->objects)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->id) { @@ -9067,6 +9350,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr3(struct ndr_pull *ndr, i } else { r->objects = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->id) { @@ -9148,6 +9432,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 2: { NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr, NDR_SCALARS, &r->ctr2)); @@ -9189,6 +9474,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 2: { NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr, NDR_SCALARS, &r->ctr2)); @@ -9267,6 +9553,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCC1(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->taskID)); NDR_CHECK(ndr_push_drsuapi_DsExecuteKCCFlags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9279,6 +9566,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCC1(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->taskID)); NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCCFlags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9299,6 +9587,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCCRequest(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsExecuteKCC1(ndr, NDR_SCALARS, &r->ctr1)); @@ -9331,6 +9620,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCCRequest(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCC1(ndr, NDR_SCALARS, &r->ctr1)); @@ -9437,6 +9727,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest1(struct ndr_pu NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, r->info_type)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->object_dn) { @@ -9463,6 +9754,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest1(struct ndr_pu r->object_dn = NULL; } NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->object_dn) { @@ -9507,6 +9799,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest2(struct ndr_pu NDR_CHECK(ndr_push_unique_ptr(ndr, r->string1)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->object_dn) { @@ -9563,6 +9856,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest2(struct ndr_pu r->string2 = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->object_dn) { @@ -9639,6 +9933,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest(struct ndr_pus if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case DRSUAPI_DS_REPLICA_GET_INFO: { NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -9680,6 +9975,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest(struct ndr_pul if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case DRSUAPI_DS_REPLICA_GET_INFO: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -9749,6 +10045,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaNeighbour(struct ndr_push *nd NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_attempt)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context_dn) { @@ -9827,6 +10124,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaNeighbour(struct ndr_pull *nd NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_attempt)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context_dn) { @@ -9935,6 +10233,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaNeighbourCtr(struct ndr_push for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -9963,6 +10262,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaNeighbourCtr(struct ndr_pull if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -10006,6 +10306,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtr(struct ndr_push *nd for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -10031,6 +10332,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtr(struct ndr_pull *nd if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -10067,6 +10369,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData(struct ndr_push * NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -10096,6 +10399,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData(struct ndr_pull * NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -10143,6 +10447,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_pus for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -10171,6 +10476,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_pul if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -10212,6 +10518,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaKccDsaFailure(struct ndr_push NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->first_failure)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_failures)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_result)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dsa_obj_dn) { @@ -10240,6 +10547,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaKccDsaFailure(struct ndr_pull NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->first_failure)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_failures)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_result)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dsa_obj_dn) { @@ -10286,6 +10594,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_ for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -10314,6 +10623,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_ if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -10348,14 +10658,14 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_print *ndr static enum ndr_err_code ndr_push_drsuapi_DsReplicaOpType(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsReplicaOpType r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOpType(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsReplicaOpType *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -10379,6 +10689,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRplicaOpOptions(struct ndr_push *ndr if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_drsuapi_DsReplicaOpType(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC: { NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncOptions(ndr, NDR_SCALARS, r->sync)); @@ -10438,10 +10749,11 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRplicaOpOptions(struct ndr_pull *ndr uint16_t _level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC: { NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncOptions(ndr, NDR_SCALARS, &r->sync)); @@ -10542,6 +10854,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaOp(struct ndr_push *ndr, int NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote_dsa_address)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->nc_obj_guid)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->remote_dsa_obj_guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->nc_dn) { @@ -10602,6 +10915,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOp(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->nc_obj_guid)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->remote_dsa_obj_guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->nc_dn) { @@ -10688,6 +11002,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaOpCtr(struct ndr_push *ndr, i for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -10716,6 +11031,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOpCtr(struct ndr_pull *ndr, i if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -10763,6 +11079,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData(struct ndr_pu NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -10820,6 +11137,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData(struct ndr_pu NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -10900,6 +11218,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -10928,6 +11247,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -10971,6 +11291,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2Ctr(struct ndr_push *n for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -10996,6 +11317,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2Ctr(struct ndr_pull *n if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11030,6 +11352,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor3(struct ndr_push *ndr, NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_sync_success)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_obj_dn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->source_dsa_obj_dn) { @@ -11057,6 +11380,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor3(struct ndr_pull *ndr, } else { r->source_dsa_obj_dn = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->source_dsa_obj_dn) { @@ -11102,6 +11426,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor3Ctr(struct ndr_push *n for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -11130,6 +11455,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor3Ctr(struct ndr_pull *n if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -11173,6 +11499,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData2(struct ndr_push NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->originating_dsa_dn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -11216,6 +11543,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData2(struct ndr_pull } else { r->originating_dsa_dn = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -11281,6 +11609,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_pu for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -11309,6 +11638,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_pu if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -11357,6 +11687,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData2(struct ndr_p NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->originating_dsa_dn)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -11428,6 +11759,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData2(struct ndr_p } else { r->originating_dsa_dn = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->attribute_name) { @@ -11526,6 +11858,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(struct nd for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -11554,6 +11887,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(struct nd if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -11602,6 +11936,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaConnection04(struct ndr_push ndr->flags = _flags_save_ipv4address; } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u5)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11624,6 +11959,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaConnection04(struct ndr_pull ndr->flags = _flags_save_ipv4address; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u5)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11655,6 +11991,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaConnection04Ctr(struct ndr_pu for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11683,6 +12020,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaConnection04Ctr(struct ndr_pu if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11721,6 +12059,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplica06(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u5)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->u6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u7)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->str1) { @@ -11752,6 +12091,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplica06(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u5)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->u6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u7)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->str1) { @@ -11801,6 +12141,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplica06Ctr(struct ndr_push *ndr, i for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr, NDR_SCALARS, &r->array[cntr_array_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) { @@ -11832,6 +12173,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplica06Ctr(struct ndr_pull *ndr, i if (r->array) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -11869,6 +12211,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaInfo(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->neighbours)); @@ -12059,6 +12402,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaInfo(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: { uint32_t _ptr_neighbours; @@ -12509,6 +12853,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Ctr(struct ndr_push * if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -12542,6 +12887,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Ctr(struct ndr_pull * if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -12586,6 +12932,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Request1(struct ndr_p NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_req)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->req_array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->req_array) { @@ -12622,6 +12969,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Request1(struct ndr_p } else { r->req_array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->req_array) { @@ -12691,6 +13039,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Request(struct ndr_pu if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr, NDR_SCALARS, &r->req1)); @@ -12724,6 +13073,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Request(struct ndr_pu if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr, NDR_SCALARS, &r->req1)); @@ -12767,6 +13117,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsSiteCostInfo(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->error_code)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->site_cost)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -12779,6 +13130,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsSiteCostInfo(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->error_code)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->site_cost)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -12802,6 +13154,7 @@ static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostCtr1(struct ndr_push * NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_info)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -12833,6 +13186,7 @@ static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostCtr1(struct ndr_pull * r->info = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -12885,6 +13239,7 @@ static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostCtr(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -12918,6 +13273,7 @@ static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostCtr(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr, NDR_SCALARS, &r->ctr1)); @@ -12964,6 +13320,7 @@ static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostRequest1(struct ndr_pu NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_req)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_to)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->site_from) { @@ -13018,6 +13375,7 @@ static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostRequest1(struct ndr_pu r->site_to = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->site_from) { @@ -13112,6 +13470,7 @@ static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostRequest(struct ndr_pus if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr, NDR_SCALARS, &r->req1)); @@ -13145,6 +13504,7 @@ static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostRequest(struct ndr_pul if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr, NDR_SCALARS, &r->req1)); diff --git a/librpc/gen_ndr/ndr_drsuapi.h b/librpc/gen_ndr/ndr_drsuapi.h index f157cc5c1f..bf82ab805f 100644 --- a/librpc/gen_ndr/ndr_drsuapi.h +++ b/librpc/gen_ndr/ndr_drsuapi.h @@ -63,6 +63,9 @@ extern const struct ndr_interface_table ndr_table_drsuapi; #define NDR_DRSUAPI_QUERYSITESBYCOST (0x18) #define NDR_DRSUAPI_CALL_COUNT (25) +enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_drsuapi_SupportedExtensions(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_drsuapi_SupportedExtensionsExt(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo24 *r); @@ -93,8 +96,6 @@ void ndr_print_drsuapi_DsReplicaNeighbourFlags(struct ndr_print *ndr, const char void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r); void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r); void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest5 *r); -enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r); -enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r); void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOID *r); void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping *r); enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOIDMapping_Ctr *r); diff --git a/librpc/gen_ndr/ndr_dssetup.c b/librpc/gen_ndr/ndr_dssetup.c index 995bae54a3..27b839bd07 100644 --- a/librpc/gen_ndr/ndr_dssetup.c +++ b/librpc/gen_ndr/ndr_dssetup.c @@ -6,14 +6,14 @@ #include "librpc/gen_ndr/ndr_misc.h" static enum ndr_err_code ndr_push_dssetup_DsRole(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRole r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_dssetup_DsRole(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRole *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -68,6 +68,7 @@ static enum ndr_err_code ndr_push_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_p NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain) { @@ -123,6 +124,7 @@ static enum ndr_err_code ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_p r->forest = NULL; } NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain) { @@ -220,14 +222,14 @@ _PUBLIC_ void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_dssetup_DsPrevious(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsPrevious r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_dssetup_DsPrevious(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsPrevious *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -250,6 +252,7 @@ static enum ndr_err_code ndr_push_dssetup_DsRoleUpgradeStatus(struct ndr_push *n NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_dssetup_DsUpgrade(ndr, NDR_SCALARS, r->upgrading)); NDR_CHECK(ndr_push_dssetup_DsPrevious(ndr, NDR_SCALARS, r->previous_role)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -262,6 +265,7 @@ static enum ndr_err_code ndr_pull_dssetup_DsRoleUpgradeStatus(struct ndr_pull *n NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_dssetup_DsUpgrade(ndr, NDR_SCALARS, &r->upgrading)); NDR_CHECK(ndr_pull_dssetup_DsPrevious(ndr, NDR_SCALARS, &r->previous_role)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -279,14 +283,14 @@ _PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const static enum ndr_err_code ndr_push_dssetup_DsRoleOp(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleOp r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_dssetup_DsRoleOp(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleOp *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -306,8 +310,9 @@ _PUBLIC_ void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name static enum ndr_err_code ndr_push_dssetup_DsRoleOpStatus(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRoleOpStatus *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 2)); + NDR_CHECK(ndr_push_align(ndr, 3)); NDR_CHECK(ndr_push_dssetup_DsRoleOp(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } @@ -317,8 +322,9 @@ static enum ndr_err_code ndr_push_dssetup_DsRoleOpStatus(struct ndr_push *ndr, i static enum ndr_err_code ndr_pull_dssetup_DsRoleOpStatus(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRoleOpStatus *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 2)); + NDR_CHECK(ndr_pull_align(ndr, 3)); NDR_CHECK(ndr_pull_dssetup_DsRoleOp(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } @@ -335,14 +341,14 @@ _PUBLIC_ void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char static enum ndr_err_code ndr_push_dssetup_DsRoleInfoLevel(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_dssetup_DsRoleInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -364,6 +370,7 @@ static enum ndr_err_code ndr_push_dssetup_DsRoleInfo(struct ndr_push *ndr, int n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case DS_ROLE_BASIC_INFORMATION: { NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic)); @@ -407,10 +414,11 @@ static enum ndr_err_code ndr_pull_dssetup_DsRoleInfo(struct ndr_pull *ndr, int n uint16_t _level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case DS_ROLE_BASIC_INFORMATION: { NDR_CHECK(ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic)); diff --git a/librpc/gen_ndr/ndr_echo.c b/librpc/gen_ndr/ndr_echo.c index 1f56c80b68..4c54ff47c3 100644 --- a/librpc/gen_ndr/ndr_echo.c +++ b/librpc/gen_ndr/ndr_echo.c @@ -8,6 +8,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19,6 +20,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -38,6 +40,7 @@ static enum ndr_err_code ndr_push_echo_info2(struct ndr_push *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->v)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -49,6 +52,7 @@ static enum ndr_err_code ndr_pull_echo_info2(struct ndr_pull *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->v)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -68,6 +72,7 @@ static enum ndr_err_code ndr_push_echo_info3(struct ndr_push *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->v)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -79,6 +84,7 @@ static enum ndr_err_code ndr_pull_echo_info3(struct ndr_pull *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->v)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -98,6 +104,7 @@ static enum ndr_err_code ndr_push_STRUCT_echo_info4(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->v)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -109,6 +116,7 @@ static enum ndr_err_code ndr_pull_STRUCT_echo_info4(struct ndr_pull *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->v)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -129,6 +137,7 @@ static enum ndr_err_code ndr_push_echo_info5(struct ndr_push *ndr, int ndr_flags NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->v2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -141,6 +150,7 @@ static enum ndr_err_code ndr_pull_echo_info5(struct ndr_pull *ndr, int ndr_flags NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->v2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -162,6 +172,7 @@ static enum ndr_err_code ndr_push_echo_info6(struct ndr_push *ndr, int ndr_flags NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1)); NDR_CHECK(ndr_push_echo_info1(ndr, NDR_SCALARS, &r->info1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -174,6 +185,7 @@ static enum ndr_err_code ndr_pull_echo_info6(struct ndr_pull *ndr, int ndr_flags NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1)); NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -195,6 +207,7 @@ static enum ndr_err_code ndr_push_echo_info7(struct ndr_push *ndr, int ndr_flags NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1)); NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -207,6 +220,7 @@ static enum ndr_err_code ndr_pull_echo_info7(struct ndr_pull *ndr, int ndr_flags NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1)); NDR_CHECK(ndr_pull_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -227,6 +241,7 @@ static enum ndr_err_code ndr_push_echo_Info(struct ndr_push *ndr, int ndr_flags, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_echo_info1(ndr, NDR_SCALARS, &r->info1)); @@ -301,6 +316,7 @@ static enum ndr_err_code ndr_pull_echo_Info(struct ndr_pull *ndr, int ndr_flags, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1)); @@ -405,14 +421,14 @@ _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const static enum ndr_err_code ndr_push_echo_Enum1(struct ndr_push *ndr, int ndr_flags, enum echo_Enum1 r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_echo_Enum1(struct ndr_pull *ndr, int ndr_flags, enum echo_Enum1 *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -459,6 +475,7 @@ static enum ndr_err_code ndr_push_echo_Enum2(struct ndr_push *ndr, int ndr_flags NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, r->e1)); NDR_CHECK(ndr_push_echo_Enum1_32(ndr, NDR_SCALARS, r->e2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -471,6 +488,7 @@ static enum ndr_err_code ndr_pull_echo_Enum2(struct ndr_pull *ndr, int ndr_flags NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, &r->e1)); NDR_CHECK(ndr_pull_echo_Enum1_32(ndr, NDR_SCALARS, &r->e2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -491,6 +509,7 @@ static enum ndr_err_code ndr_push_echo_Enum3(struct ndr_push *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case ECHO_ENUM1: { NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, r->e1)); @@ -530,6 +549,7 @@ static enum ndr_err_code ndr_pull_echo_Enum3(struct ndr_pull *ndr, int ndr_flags if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case ECHO_ENUM1: { NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, &r->e1)); @@ -587,6 +607,7 @@ static enum ndr_err_code ndr_push_echo_Surrounding(struct ndr_push *ndr, int ndr for (cntr_surrounding_0 = 0; cntr_surrounding_0 < r->x; cntr_surrounding_0++) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->surrounding[cntr_surrounding_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -611,6 +632,7 @@ static enum ndr_err_code ndr_pull_echo_Surrounding(struct ndr_pull *ndr, int ndr if (r->surrounding) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->surrounding, r->x)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } diff --git a/librpc/gen_ndr/ndr_epmapper.c b/librpc/gen_ndr/ndr_epmapper.c index 917669c1d6..5c3abe774c 100644 --- a/librpc/gen_ndr/ndr_epmapper.c +++ b/librpc/gen_ndr/ndr_epmapper.c @@ -57,6 +57,7 @@ static enum ndr_err_code ndr_push_epm_rhs_dnet_nsp(struct ndr_push *ndr, int ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -67,6 +68,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_dnet_nsp(struct ndr_pull *ndr, int ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -84,6 +86,7 @@ static enum ndr_err_code ndr_push_epm_rhs_osi_tp4(struct ndr_push *ndr, int ndr_ { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -94,6 +97,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_osi_tp4(struct ndr_pull *ndr, int ndr_ { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -111,6 +115,7 @@ static enum ndr_err_code ndr_push_epm_rhs_osi_clns(struct ndr_push *ndr, int ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -121,6 +126,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_osi_clns(struct ndr_pull *ndr, int ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -139,6 +145,7 @@ static enum ndr_err_code ndr_push_epm_rhs_udp(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -150,6 +157,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_udp(struct ndr_pull *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -169,6 +177,7 @@ static enum ndr_err_code ndr_push_epm_rhs_tcp(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -180,6 +189,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_tcp(struct ndr_pull *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -199,6 +209,7 @@ static enum ndr_err_code ndr_push_epm_rhs_ip(struct ndr_push *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipaddr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -210,6 +221,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_ip(struct ndr_pull *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipaddr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -229,6 +241,7 @@ static enum ndr_err_code ndr_push_epm_rhs_ncadg(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -240,6 +253,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_ncadg(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -259,6 +273,7 @@ static enum ndr_err_code ndr_push_epm_rhs_ncacn(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -270,6 +285,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_ncacn(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -294,6 +310,7 @@ static enum ndr_err_code ndr_push_epm_rhs_uuid(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->unknown)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -310,6 +327,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_uuid(struct ndr_pull *ndr, int ndr_fla NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->unknown)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -328,6 +346,7 @@ static enum ndr_err_code ndr_push_epm_rhs_ipx(struct ndr_push *ndr, int ndr_flag { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -338,6 +357,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_ipx(struct ndr_pull *ndr, int ndr_flag { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -361,6 +381,7 @@ static enum ndr_err_code ndr_push_epm_rhs_smb(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unc)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -377,6 +398,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_smb(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unc)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -401,6 +423,7 @@ static enum ndr_err_code ndr_push_epm_rhs_named_pipe(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -417,6 +440,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_named_pipe(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -441,6 +465,7 @@ static enum ndr_err_code ndr_push_epm_rhs_netbios(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -457,6 +482,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_netbios(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -475,6 +501,7 @@ static enum ndr_err_code ndr_push_epm_rhs_netbeui(struct ndr_push *ndr, int ndr_ { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -485,6 +512,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_netbeui(struct ndr_pull *ndr, int ndr_ { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -502,6 +530,7 @@ static enum ndr_err_code ndr_push_epm_rhs_spx(struct ndr_push *ndr, int ndr_flag { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -512,6 +541,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_spx(struct ndr_pull *ndr, int ndr_flag { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -529,6 +559,7 @@ static enum ndr_err_code ndr_push_epm_rhs_nb_ipx(struct ndr_push *ndr, int ndr_f { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -539,6 +570,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_nb_ipx(struct ndr_pull *ndr, int ndr_f { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -557,6 +589,7 @@ static enum ndr_err_code ndr_push_epm_rhs_http(struct ndr_push *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -568,6 +601,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_http(struct ndr_pull *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -592,6 +626,7 @@ static enum ndr_err_code ndr_push_epm_rhs_unix_ds(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -608,6 +643,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_unix_ds(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -626,6 +662,7 @@ static enum ndr_err_code ndr_push_epm_rhs_null(struct ndr_push *ndr, int ndr_fla { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -636,6 +673,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_null(struct ndr_pull *ndr, int ndr_fla { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -654,6 +692,7 @@ static enum ndr_err_code ndr_push_epm_rhs_ncalrpc(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -665,6 +704,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_ncalrpc(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -683,6 +723,7 @@ static enum ndr_err_code ndr_push_epm_rhs_appletalk(struct ndr_push *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -693,6 +734,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_appletalk(struct ndr_pull *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -710,6 +752,7 @@ static enum ndr_err_code ndr_push_epm_rhs_atalk_stream(struct ndr_push *ndr, int { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -720,6 +763,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_atalk_stream(struct ndr_pull *ndr, int { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -737,6 +781,7 @@ static enum ndr_err_code ndr_push_epm_rhs_atalk_datagram(struct ndr_push *ndr, i { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -747,6 +792,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_atalk_datagram(struct ndr_pull *ndr, i { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -765,6 +811,7 @@ static enum ndr_err_code ndr_push_epm_rhs_vines_spp(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -776,6 +823,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_vines_spp(struct ndr_pull *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -795,6 +843,7 @@ static enum ndr_err_code ndr_push_epm_rhs_vines_ipc(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -806,6 +855,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_vines_ipc(struct ndr_pull *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -830,6 +880,7 @@ static enum ndr_err_code ndr_push_epm_rhs_streettalk(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->streettalk)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -846,6 +897,7 @@ static enum ndr_err_code ndr_pull_epm_rhs_streettalk(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->streettalk)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -867,6 +919,7 @@ static enum ndr_err_code ndr_push_epm_rhs(struct ndr_push *ndr, int ndr_flags, c ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case EPM_PROTOCOL_DNET_NSP: { NDR_CHECK(ndr_push_epm_rhs_dnet_nsp(ndr, NDR_SCALARS, &r->dnet_nsp)); @@ -1082,6 +1135,7 @@ static enum ndr_err_code ndr_pull_epm_rhs(struct ndr_pull *ndr, int ndr_flags, u ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN); level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case EPM_PROTOCOL_DNET_NSP: { NDR_CHECK(ndr_pull_epm_rhs_dnet_nsp(ndr, NDR_SCALARS, &r->dnet_nsp)); @@ -1421,6 +1475,7 @@ static enum ndr_err_code ndr_push_epm_lhs(struct ndr_push *ndr, int ndr_flags, c NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->lhs_data)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1438,6 +1493,7 @@ static enum ndr_err_code ndr_pull_epm_lhs(struct ndr_pull *ndr, int ndr_flags, s NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->lhs_data)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1470,6 +1526,7 @@ static enum ndr_err_code ndr_push_epm_floor(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_epm_rhs(_ndr_rhs, NDR_SCALARS, &r->rhs)); NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_rhs, 2, -1)); } + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1493,6 +1550,7 @@ static enum ndr_err_code ndr_pull_epm_floor(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_epm_rhs(_ndr_rhs, NDR_SCALARS, &r->rhs)); NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_rhs, 2, -1)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1521,6 +1579,7 @@ static enum ndr_err_code ndr_push_epm_tower(struct ndr_push *ndr, int ndr_flags, for (cntr_floors_0 = 0; cntr_floors_0 < r->num_floors; cntr_floors_0++) { NDR_CHECK(ndr_push_epm_floor(ndr, NDR_SCALARS, &r->floors[cntr_floors_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1546,6 +1605,7 @@ static enum ndr_err_code ndr_pull_epm_tower(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_epm_floor(ndr, NDR_SCALARS, &r->floors[cntr_floors_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_floors_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1595,6 +1655,7 @@ static enum ndr_err_code ndr_push_epm_twr_t(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_epm_tower(_ndr_tower, NDR_SCALARS, &r->tower)); NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_tower, 4, -1)); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1612,6 +1673,7 @@ static enum ndr_err_code ndr_pull_epm_twr_t(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_epm_tower(_ndr_tower, NDR_SCALARS, &r->tower)); NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_tower, 4, -1)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1636,6 +1698,7 @@ static enum ndr_err_code ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->annotation) + 1)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->annotation, strlen(r->annotation) + 1, sizeof(uint8_t), CH_DOS)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->tower) { @@ -1661,6 +1724,7 @@ static enum ndr_err_code ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_offset)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_length)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->annotation, r->__annotation_length, sizeof(uint8_t), CH_DOS)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->tower) { @@ -1697,6 +1761,7 @@ static enum ndr_err_code ndr_push_rpc_if_id_t(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vers_major)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vers_minor)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1710,6 +1775,7 @@ static enum ndr_err_code ndr_pull_rpc_if_id_t(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vers_major)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vers_minor)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1731,6 +1797,7 @@ static enum ndr_err_code ndr_push_epm_twr_p_t(struct ndr_push *ndr, int ndr_flag if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_full_ptr(ndr, r->twr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->twr) { @@ -1752,6 +1819,7 @@ static enum ndr_err_code ndr_pull_epm_twr_p_t(struct ndr_pull *ndr, int ndr_flag } else { r->twr = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->twr) { diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c index 7710999a78..a7e502c105 100644 --- a/librpc/gen_ndr/ndr_eventlog.c +++ b/librpc/gen_ndr/ndr_eventlog.c @@ -32,14 +32,14 @@ _PUBLIC_ void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *nam _PUBLIC_ enum ndr_err_code ndr_push_eventlogEventTypes(struct ndr_push *ndr, int ndr_flags, enum eventlogEventTypes r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } _PUBLIC_ enum ndr_err_code ndr_pull_eventlogEventTypes(struct ndr_pull *ndr, int ndr_flags, enum eventlogEventTypes *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -65,6 +65,7 @@ static enum ndr_err_code ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown0)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -77,6 +78,7 @@ static enum ndr_err_code ndr_pull_eventlog_OpenUnknown0(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown0)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -143,6 +145,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record_tdb(struct ndr_push *ndr, in } NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->padding)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -210,6 +213,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record_tdb(struct ndr_pull *ndr, in } NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -309,6 +313,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGHEADER(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, r->Flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Retention)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x30)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -331,6 +336,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGHEADER(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, &r->Flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Retention)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndHeaderSize)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -421,6 +427,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGRECORD(struct ndr_push *ndr, int ndr ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Length)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { { @@ -503,6 +510,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGRECORD(struct ndr_pull *ndr, int ndr ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Length2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { { @@ -573,6 +581,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGEOF(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CurrentRecordNumber)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->OldestRecordNumber)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x28)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -593,6 +602,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGEOF(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CurrentRecordNumber)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OldestRecordNumber)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordSizeEnd)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -626,6 +636,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_EVT_FILE(struct ndr_push *ndr, int NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0])); } NDR_CHECK(ndr_push_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) { @@ -650,6 +661,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_EVT_FILE(struct ndr_pull *ndr, int } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0); NDR_CHECK(ndr_pull_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -687,6 +699,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_FULL_INFORMATION(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->full)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -698,6 +711,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_FULL_INFORMATION(struct ndr_pull *n if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->full)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } diff --git a/librpc/gen_ndr/ndr_krb5pac.c b/librpc/gen_ndr/ndr_krb5pac.c index 416875261d..0f4cfefe28 100644 --- a/librpc/gen_ndr/ndr_krb5pac.c +++ b/librpc/gen_ndr/ndr_krb5pac.c @@ -13,6 +13,7 @@ static enum ndr_err_code ndr_push_PAC_LOGON_NAME(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->account_name))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, 2 * strlen_m(r->account_name), sizeof(uint8_t), CH_UTF16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -26,6 +27,7 @@ static enum ndr_err_code ndr_pull_PAC_LOGON_NAME(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, r->size, sizeof(uint8_t), CH_UTF16)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -56,6 +58,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->signature)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -78,6 +81,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->signature)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -107,6 +111,7 @@ static enum ndr_err_code ndr_push_PAC_LOGON_INFO(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->res_group_dom_sid)); NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); @@ -132,6 +137,7 @@ static enum ndr_err_code ndr_pull_PAC_LOGON_INFO(struct ndr_pull *ndr, int ndr_f r->res_group_dom_sid = NULL; } NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); @@ -166,6 +172,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -187,6 +194,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int } else { r->info = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -251,6 +259,7 @@ static enum ndr_err_code ndr_push_DATA_BLOB_REM(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -267,6 +276,7 @@ static enum ndr_err_code ndr_pull_DATA_BLOB_REM(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -285,6 +295,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case PAC_TYPE_LOGON_INFO: { { @@ -346,6 +357,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case PAC_TYPE_LOGON_INFO: { { @@ -445,6 +457,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { @@ -469,6 +482,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -514,6 +528,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr ndr->flags = _flags_save_DATA_BLOB_REM; } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -555,6 +570,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr ndr->flags = _flags_save_DATA_BLOB_REM; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -607,6 +623,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_f for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { @@ -631,6 +648,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -677,6 +695,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_Validate(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->ChecksumAndSignature)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -697,6 +716,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_Validate(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->ChecksumAndSignature)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -721,6 +741,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp)); NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); @@ -734,6 +755,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp)); NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); diff --git a/librpc/gen_ndr/ndr_lsa.c b/librpc/gen_ndr/ndr_lsa.c index b43cfca831..ad7b2be32e 100644 --- a/librpc/gen_ndr/ndr_lsa.c +++ b/librpc/gen_ndr/ndr_lsa.c @@ -12,6 +12,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string))); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -38,6 +39,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_fla } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -83,6 +85,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string))); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -109,6 +112,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int nd } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -154,6 +158,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -184,6 +189,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_fl } else { r->names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -240,6 +246,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string))); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -266,6 +273,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int nd } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -311,6 +319,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string))); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->string))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -337,6 +346,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, i } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -383,6 +393,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -413,6 +424,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -473,6 +485,7 @@ static enum ndr_err_code ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->low)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -485,6 +498,7 @@ static enum ndr_err_code ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->low)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -506,6 +520,7 @@ static enum ndr_err_code ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); @@ -519,6 +534,7 @@ static enum ndr_err_code ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); @@ -542,6 +558,7 @@ static enum ndr_err_code ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->privs)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->privs) { @@ -572,6 +589,7 @@ static enum ndr_err_code ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_fl } else { r->privs = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->privs) { @@ -624,11 +642,12 @@ _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, c static enum ndr_err_code ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len)); + NDR_CHECK(ndr_push_align(ndr, 5)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->impersonation_level)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->context_mode)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->effective_only)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { } @@ -638,11 +657,12 @@ static enum ndr_err_code ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flag static enum ndr_err_code ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len)); + NDR_CHECK(ndr_pull_align(ndr, 5)); + NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->len)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->impersonation_level)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->context_mode)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->effective_only)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { } @@ -653,7 +673,7 @@ _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, con { ndr_print_struct(ndr, name, "lsa_QosInfo"); ndr->depth++; - ndr_print_uint32(ndr, "len", r->len); + ndr_print_uint3264(ndr, "len", r->len); ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level); ndr_print_uint8(ndr, "context_mode", r->context_mode); ndr_print_uint8(ndr, "effective_only", r->effective_only); @@ -664,12 +684,13 @@ static enum ndr_err_code ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->root_dir)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_desc)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_qos)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->root_dir) { @@ -703,7 +724,7 @@ static enum ndr_err_code ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int TALLOC_CTX *_mem_save_sec_qos_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len)); + NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->len)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_root_dir)); if (_ptr_root_dir) { NDR_PULL_ALLOC(ndr, r->root_dir); @@ -729,6 +750,7 @@ static enum ndr_err_code ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int } else { r->sec_qos = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->root_dir) { @@ -769,7 +791,7 @@ _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *n { ndr_print_struct(ndr, name, "lsa_ObjectAttribute"); ndr->depth++; - ndr_print_uint32(ndr, "len", r->len); + ndr_print_uint3264(ndr, "len", r->len); ndr_print_ptr(ndr, "root_dir", r->root_dir); ndr->depth++; if (r->root_dir) { @@ -918,6 +940,7 @@ static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->time_to_shutdown)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -934,6 +957,7 @@ static enum ndr_err_code ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->time_to_shutdown)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -989,6 +1013,7 @@ static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditing_mode)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->settings)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->settings) { @@ -1017,6 +1042,7 @@ static enum ndr_err_code ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int r->settings = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->settings) { @@ -1070,6 +1096,7 @@ static enum ndr_err_code ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); @@ -1093,6 +1120,7 @@ static enum ndr_err_code ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_f } else { r->sid = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); @@ -1125,6 +1153,7 @@ static enum ndr_err_code ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -1137,6 +1166,7 @@ static enum ndr_err_code ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -1182,6 +1212,7 @@ static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_lsa_Role(ndr, NDR_SCALARS, r->role)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1193,6 +1224,7 @@ static enum ndr_err_code ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1213,6 +1245,7 @@ static enum ndr_err_code ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->source)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->source)); @@ -1227,6 +1260,7 @@ static enum ndr_err_code ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->source)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->source)); @@ -1254,6 +1288,7 @@ static enum ndr_err_code ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_wss)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefile)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1270,6 +1305,7 @@ static enum ndr_err_code ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_wss)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefile)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1295,6 +1331,7 @@ static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id)); NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1307,6 +1344,7 @@ static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id)); NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1327,6 +1365,7 @@ static enum ndr_err_code ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1338,6 +1377,7 @@ static enum ndr_err_code ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1358,6 +1398,7 @@ static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1370,6 +1411,7 @@ static enum ndr_err_code ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1394,6 +1436,7 @@ static enum ndr_err_code ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); @@ -1422,6 +1465,7 @@ static enum ndr_err_code ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int nd } else { r->sid = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); @@ -1456,14 +1500,14 @@ _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_lsa_PolicyInfo(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyInfo r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_lsa_PolicyInfo(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyInfo *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -1496,6 +1540,7 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case LSA_POLICY_INFO_AUDIT_LOG: { NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log)); @@ -1627,6 +1672,7 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case LSA_POLICY_INFO_AUDIT_LOG: { NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log)); @@ -1819,6 +1865,7 @@ static enum ndr_err_code ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -1840,6 +1887,7 @@ static enum ndr_err_code ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags } else { r->sid = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -1872,6 +1920,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -1905,6 +1954,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_f } else { r->sids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -1961,6 +2011,7 @@ static enum ndr_err_code ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domains) { @@ -1991,6 +2042,7 @@ static enum ndr_err_code ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_f } else { r->domains = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domains) { @@ -2042,14 +2094,14 @@ _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -2080,6 +2132,7 @@ static enum ndr_err_code ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2093,6 +2146,7 @@ static enum ndr_err_code ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2116,6 +2170,7 @@ static enum ndr_err_code ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -2146,6 +2201,7 @@ static enum ndr_err_code ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int nd } else { r->sids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -2200,6 +2256,7 @@ static enum ndr_err_code ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_size)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domains) { @@ -2234,6 +2291,7 @@ static enum ndr_err_code ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int nd r->domains = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_size)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domains) { @@ -2286,14 +2344,14 @@ _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_lsa_LookupNamesLevel(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupNamesLevel r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_lsa_LookupNamesLevel(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupNamesLevel *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -2321,6 +2379,7 @@ static enum ndr_err_code ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -2335,6 +2394,7 @@ static enum ndr_err_code ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -2359,6 +2419,7 @@ static enum ndr_err_code ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -2392,6 +2453,7 @@ static enum ndr_err_code ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int n } else { r->names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -2447,6 +2509,7 @@ static enum ndr_err_code ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2459,6 +2522,7 @@ static enum ndr_err_code ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2485,6 +2549,7 @@ static enum ndr_err_code ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) { NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2513,6 +2578,7 @@ static enum ndr_err_code ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr if (r->set) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->set, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2546,9 +2612,10 @@ static enum ndr_err_code ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_fla ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -2572,14 +2639,15 @@ static enum ndr_err_code ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_fla ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); if (_ptr_data) { NDR_PULL_ALLOC(ndr, r->data); } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -2613,8 +2681,8 @@ _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, co uint32_t _flags_save_STRUCT = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); ndr->depth++; - ndr_print_uint32(ndr, "length", r->length); - ndr_print_uint32(ndr, "size", r->size); + ndr_print_uint3264(ndr, "length", r->length); + ndr_print_uint3264(ndr, "size", r->size); ndr_print_ptr(ndr, "data", r->data); ndr->depth++; if (r->data) { @@ -2635,6 +2703,7 @@ static enum ndr_err_code ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -2666,6 +2735,7 @@ static enum ndr_err_code ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_fl } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -2706,14 +2776,14 @@ _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, c static enum ndr_err_code ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -2823,6 +2893,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name)); @@ -2835,6 +2906,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name)); @@ -2857,6 +2929,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_names) { @@ -2887,6 +2960,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull } else { r->netbios_names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_names) { @@ -2941,6 +3015,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2952,6 +3027,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2972,6 +3048,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->old_password)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->password) { @@ -3004,6 +3081,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *n } else { r->old_password = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->password) { @@ -3047,6 +3125,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->netbios_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name)); @@ -3070,6 +3149,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, } else { r->sid = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name)); @@ -3107,6 +3187,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction)); NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type)); NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name)); @@ -3135,6 +3216,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction)); NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type)); NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name)); @@ -3201,6 +3283,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time)); NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType)); NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data)); @@ -3215,6 +3298,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time)); NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType)); NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data)); @@ -3242,6 +3326,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->outgoing_count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_current_auth_info)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_previous_auth_info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->incoming_current_auth_info) { @@ -3298,6 +3383,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *n } else { r->outgoing_previous_auth_info = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->incoming_current_auth_info) { @@ -3368,6 +3454,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *n NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); @@ -3383,6 +3470,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *n NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); @@ -3406,6 +3494,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob)); @@ -3418,6 +3507,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob)); @@ -3440,6 +3530,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); @@ -3455,6 +3546,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); @@ -3480,6 +3572,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_ NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); @@ -3505,6 +3598,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_ } else { r->forest_trust_data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); @@ -3545,6 +3639,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct nd NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info)); @@ -3560,6 +3655,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct nd NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info)); @@ -3583,6 +3679,7 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3594,6 +3691,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3613,6 +3711,7 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case LSA_TRUSTED_DOMAIN_INFO_NAME: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name)); @@ -3736,10 +3835,11 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in uint16_t _level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case LSA_TRUSTED_DOMAIN_INFO_NAME: { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name)); @@ -3924,6 +4024,7 @@ static enum ndr_err_code ndr_push_lsa_DATA_BUF_PTR(struct ndr_push *ndr, int ndr if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->buf)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->buf) { @@ -3945,6 +4046,7 @@ static enum ndr_err_code ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr } else { r->buf = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->buf) { @@ -3977,6 +4079,7 @@ static enum ndr_err_code ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -4010,6 +4113,7 @@ static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_fla } else { r->names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -4066,6 +4170,7 @@ static enum ndr_err_code ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domains) { @@ -4096,6 +4201,7 @@ static enum ndr_err_code ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr } else { r->domains = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domains) { @@ -4155,6 +4261,7 @@ static enum ndr_err_code ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, i NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_renewaltime)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->clock_skew)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown6)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4171,6 +4278,7 @@ static enum ndr_err_code ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_renewaltime)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->clock_skew)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown6)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4196,6 +4304,7 @@ static enum ndr_err_code ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->efs_blob)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->efs_blob) { @@ -4219,6 +4328,7 @@ static enum ndr_err_code ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int nd } else { r->efs_blob = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->efs_blob) { @@ -4255,6 +4365,7 @@ static enum ndr_err_code ndr_push_lsa_DomainInformationPolicy(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case LSA_DOMAIN_INFO_POLICY_EFS: { NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info)); @@ -4295,6 +4406,7 @@ static enum ndr_err_code ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case LSA_DOMAIN_INFO_POLICY_EFS: { NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info)); @@ -4351,6 +4463,7 @@ static enum ndr_err_code ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -4366,6 +4479,7 @@ static enum ndr_err_code ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -4391,6 +4505,7 @@ static enum ndr_err_code ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -4424,6 +4539,7 @@ static enum ndr_err_code ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int } else { r->names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->names) { @@ -4531,6 +4647,7 @@ static enum ndr_err_code ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4545,6 +4662,7 @@ static enum ndr_err_code ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4569,6 +4687,7 @@ static enum ndr_err_code ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -4599,6 +4718,7 @@ static enum ndr_err_code ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int n } else { r->sids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -4653,6 +4773,7 @@ static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -4677,6 +4798,7 @@ static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int n } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -4712,6 +4834,7 @@ static enum ndr_err_code ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -4745,6 +4868,7 @@ static enum ndr_err_code ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int n } else { r->sids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sids) { @@ -4798,8 +4922,9 @@ static enum ndr_err_code ndr_push_lsa_ForestTrustBinaryData(struct ndr_push *ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -4816,7 +4941,7 @@ static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr TALLOC_CTX *_mem_save_data_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length)); if (r->length > 131072) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } @@ -4826,6 +4951,7 @@ static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -4847,7 +4973,7 @@ _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const c { ndr_print_struct(ndr, name, "lsa_ForestTrustBinaryData"); ndr->depth++; - ndr_print_uint32(ndr, "length", r->length); + ndr_print_uint3264(ndr, "length", r->length); ndr_print_ptr(ndr, "data", r->data); ndr->depth++; if (r->data) { @@ -4864,6 +4990,7 @@ static enum ndr_err_code ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push *ndr NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain_sid) { @@ -4889,6 +5016,7 @@ static enum ndr_err_code ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull *ndr } NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name)); NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain_sid) { @@ -4923,6 +5051,7 @@ static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case LSA_FOREST_TRUST_TOP_LEVEL_NAME: { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->top_level_name)); @@ -4976,6 +5105,7 @@ static enum ndr_err_code ndr_pull_lsa_ForestTrustData(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case LSA_FOREST_TRUST_TOP_LEVEL_NAME: { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->top_level_name)); @@ -5079,6 +5209,7 @@ static enum ndr_err_code ndr_push_lsa_ForestTrustRecord(struct ndr_push *ndr, in NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->level)); NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data)); @@ -5095,6 +5226,7 @@ static enum ndr_err_code ndr_pull_lsa_ForestTrustRecord(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->level)); NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data)); @@ -5121,6 +5253,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push * NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -5157,6 +5290,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull * } else { r->entries = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { diff --git a/librpc/gen_ndr/ndr_misc.c b/librpc/gen_ndr/ndr_misc.c index fbef5094a5..ff79baa382 100644 --- a/librpc/gen_ndr/ndr_misc.c +++ b/librpc/gen_ndr/ndr_misc.c @@ -12,6 +12,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, co NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time_hi_and_version)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->clock_seq, 2)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->node, 6)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -27,6 +28,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, st NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time_hi_and_version)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->clock_seq, 2)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->node, 6)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -44,6 +46,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->if_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -56,6 +59,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->if_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -77,6 +81,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->handle_type)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -89,6 +94,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->handle_type)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -106,14 +112,14 @@ _PUBLIC_ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, c _PUBLIC_ enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } _PUBLIC_ enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -139,6 +145,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_KRB5_EDATA_NTSTATUS(struct ndr_push *ndr, in NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->ntstatus)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -152,6 +159,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_KRB5_EDATA_NTSTATUS(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->ntstatus)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -168,3 +176,224 @@ _PUBLIC_ void ndr_print_KRB5_EDATA_NTSTATUS(struct ndr_print *ndr, const char *n ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r) +{ + NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r) +{ + const char *val = NULL; + + switch (r) { + case REG_NONE: val = "REG_NONE"; break; + case REG_SZ: val = "REG_SZ"; break; + case REG_EXPAND_SZ: val = "REG_EXPAND_SZ"; break; + case REG_BINARY: val = "REG_BINARY"; break; + case REG_DWORD: val = "REG_DWORD"; break; + case REG_DWORD_BIG_ENDIAN: val = "REG_DWORD_BIG_ENDIAN"; break; + case REG_LINK: val = "REG_LINK"; break; + case REG_MULTI_SZ: val = "REG_MULTI_SZ"; break; + case REG_RESOURCE_LIST: val = "REG_RESOURCE_LIST"; break; + case REG_FULL_RESOURCE_DESCRIPTOR: val = "REG_FULL_RESOURCE_DESCRIPTOR"; break; + case REG_RESOURCE_REQUIREMENTS_LIST: val = "REG_RESOURCE_REQUIREMENTS_LIST"; break; + case REG_QWORD: val = "REG_QWORD"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_winreg_Data(struct ndr_push *ndr, int ndr_flags, const union winreg_Data *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); + switch (level) { + case REG_NONE: { + break; } + + case REG_SZ: { + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->string)); + ndr->flags = _flags_save_string; + } + break; } + + case REG_BINARY: { + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->binary)); + ndr->flags = _flags_save_DATA_BLOB; + } + break; } + + case REG_DWORD: { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->value)); + break; } + + case REG_MULTI_SZ: { + { + uint32_t _flags_save_string_array = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->string_array)); + ndr->flags = _flags_save_string_array; + } + break; } + + default: { + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data)); + ndr->flags = _flags_save_DATA_BLOB; + } + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case REG_NONE: + break; + + case REG_SZ: + break; + + case REG_BINARY: + break; + + case REG_DWORD: + break; + + case REG_MULTI_SZ: + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_Data(struct ndr_pull *ndr, int ndr_flags, union winreg_Data *r) +{ + int level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); + switch (level) { + case REG_NONE: { + break; } + + case REG_SZ: { + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->string)); + ndr->flags = _flags_save_string; + } + break; } + + case REG_BINARY: { + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->binary)); + ndr->flags = _flags_save_DATA_BLOB; + } + break; } + + case REG_DWORD: { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value)); + break; } + + case REG_MULTI_SZ: { + { + uint32_t _flags_save_string_array = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->string_array)); + ndr->flags = _flags_save_string_array; + } + break; } + + default: { + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data)); + ndr->flags = _flags_save_DATA_BLOB; + } + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case REG_NONE: + break; + + case REG_SZ: + break; + + case REG_BINARY: + break; + + case REG_DWORD: + break; + + case REG_MULTI_SZ: + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_winreg_Data(struct ndr_print *ndr, const char *name, const union winreg_Data *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "winreg_Data"); + switch (level) { + case REG_NONE: + break; + + case REG_SZ: + ndr_print_string(ndr, "string", r->string); + break; + + case REG_BINARY: + ndr_print_DATA_BLOB(ndr, "binary", r->binary); + break; + + case REG_DWORD: + ndr_print_uint32(ndr, "value", r->value); + break; + + case REG_MULTI_SZ: + ndr_print_string_array(ndr, "string_array", r->string_array); + break; + + default: + ndr_print_DATA_BLOB(ndr, "data", r->data); + break; + + } +} + diff --git a/librpc/gen_ndr/ndr_misc.h b/librpc/gen_ndr/ndr_misc.h index 938c946b73..99f975208a 100644 --- a/librpc/gen_ndr/ndr_misc.h +++ b/librpc/gen_ndr/ndr_misc.h @@ -23,4 +23,10 @@ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum n enum ndr_err_code ndr_push_KRB5_EDATA_NTSTATUS(struct ndr_push *ndr, int ndr_flags, const struct KRB5_EDATA_NTSTATUS *r); enum ndr_err_code ndr_pull_KRB5_EDATA_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, struct KRB5_EDATA_NTSTATUS *r); void ndr_print_KRB5_EDATA_NTSTATUS(struct ndr_print *ndr, const char *name, const struct KRB5_EDATA_NTSTATUS *r); +enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r); +enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r); +void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r); +enum ndr_err_code ndr_push_winreg_Data(struct ndr_push *ndr, int ndr_flags, const union winreg_Data *r); +enum ndr_err_code ndr_pull_winreg_Data(struct ndr_pull *ndr, int ndr_flags, union winreg_Data *r); +void ndr_print_winreg_Data(struct ndr_print *ndr, const char *name, const union winreg_Data *r); #endif /* _HEADER_NDR_misc */ diff --git a/librpc/gen_ndr/ndr_named_pipe_auth.c b/librpc/gen_ndr/ndr_named_pipe_auth.c index cdd8a3d641..18eadf9237 100644 --- a/librpc/gen_ndr/ndr_named_pipe_auth.c +++ b/librpc/gen_ndr/ndr_named_pipe_auth.c @@ -17,6 +17,7 @@ static enum ndr_err_code ndr_push_named_pipe_auth_req_info2(struct ndr_push *ndr NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam_info3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_key_length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->session_key)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client_name) { @@ -109,6 +110,7 @@ static enum ndr_err_code ndr_pull_named_pipe_auth_req_info2(struct ndr_pull *ndr } else { r->session_key = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client_name) { @@ -241,6 +243,7 @@ static enum ndr_err_code ndr_push_named_pipe_auth_req_info3(struct ndr_push *ndr NDR_CHECK(ndr_push_unique_ptr(ndr, r->session_key)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->gssapi_delegated_creds_length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->gssapi_delegated_creds)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client_name) { @@ -346,6 +349,7 @@ static enum ndr_err_code ndr_pull_named_pipe_auth_req_info3(struct ndr_pull *ndr } else { r->gssapi_delegated_creds = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client_name) { @@ -486,6 +490,7 @@ static enum ndr_err_code ndr_push_named_pipe_auth_req_info(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { break; } @@ -541,6 +546,7 @@ static enum ndr_err_code ndr_pull_named_pipe_auth_req_info(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { break; } @@ -625,6 +631,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_req(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_push_named_pipe_auth_req_info(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_named_pipe_auth_req_info(ndr, NDR_BUFFERS, &r->info)); @@ -646,6 +653,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_named_pipe_auth_req(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_pull_named_pipe_auth_req_info(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_named_pipe_auth_req_info(ndr, NDR_BUFFERS, &r->info)); @@ -677,6 +685,7 @@ static enum ndr_err_code ndr_push_named_pipe_auth_rep_info2(struct ndr_push *ndr NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->file_type)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->device_state)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->allocation_size)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -690,6 +699,7 @@ static enum ndr_err_code ndr_pull_named_pipe_auth_rep_info2(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->file_type)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->device_state)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->allocation_size)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -713,6 +723,7 @@ static enum ndr_err_code ndr_push_named_pipe_auth_rep_info3(struct ndr_push *ndr NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->file_type)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->device_state)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->allocation_size)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -726,6 +737,7 @@ static enum ndr_err_code ndr_pull_named_pipe_auth_rep_info3(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->file_type)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->device_state)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->allocation_size)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -747,6 +759,7 @@ static enum ndr_err_code ndr_push_named_pipe_auth_rep_info(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 0: { break; } @@ -798,6 +811,7 @@ static enum ndr_err_code ndr_pull_named_pipe_auth_rep_info(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 0: { break; } @@ -878,6 +892,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_rep(struct ndr_push *ndr, in NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_push_named_pipe_auth_rep_info(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_named_pipe_auth_rep_info(ndr, NDR_BUFFERS, &r->info)); @@ -900,6 +915,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_named_pipe_auth_rep(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_pull_named_pipe_auth_rep_info(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_named_pipe_auth_rep_info(ndr, NDR_BUFFERS, &r->info)); diff --git a/librpc/gen_ndr/ndr_nbt.c b/librpc/gen_ndr/ndr_nbt.c index a1ee79686f..dc9e8cb8d3 100644 --- a/librpc/gen_ndr/ndr_nbt.c +++ b/librpc/gen_ndr/ndr_nbt.c @@ -136,6 +136,7 @@ static enum ndr_err_code ndr_push_nbt_name_question(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_push_nbt_qtype(ndr, NDR_SCALARS, r->question_type)); NDR_CHECK(ndr_push_nbt_qclass(ndr, NDR_SCALARS, r->question_class)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -149,6 +150,7 @@ static enum ndr_err_code ndr_pull_nbt_name_question(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_pull_nbt_qtype(ndr, NDR_SCALARS, &r->question_type)); NDR_CHECK(ndr_pull_nbt_qclass(ndr, NDR_SCALARS, &r->question_class)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -198,6 +200,7 @@ static enum ndr_err_code ndr_push_nbt_rdata_address(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_nb_flags(ndr, NDR_SCALARS, r->nb_flags)); NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipaddr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -210,6 +213,7 @@ static enum ndr_err_code ndr_pull_nbt_rdata_address(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_nb_flags(ndr, NDR_SCALARS, &r->nb_flags)); NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipaddr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -234,6 +238,7 @@ static enum ndr_err_code ndr_push_nbt_rdata_netbios(struct ndr_push *ndr, int nd for (cntr_addresses_0 = 0; cntr_addresses_0 < r->length / 6; cntr_addresses_0++) { NDR_CHECK(ndr_push_nbt_rdata_address(ndr, NDR_SCALARS, &r->addresses[cntr_addresses_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -254,6 +259,7 @@ static enum ndr_err_code ndr_pull_nbt_rdata_netbios(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_nbt_rdata_address(ndr, NDR_SCALARS, &r->addresses[cntr_addresses_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -303,6 +309,7 @@ static enum ndr_err_code ndr_push_nbt_statistics(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_number_pending_sessions)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_total_sessions_possible)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->session_data_packet_size)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -333,6 +340,7 @@ static enum ndr_err_code ndr_pull_nbt_statistics(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_number_pending_sessions)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_total_sessions_possible)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->session_data_packet_size)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -373,6 +381,7 @@ static enum ndr_err_code ndr_push_nbt_status_name(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 15, sizeof(uint8_t), CH_DOS)); NDR_CHECK(ndr_push_nbt_name_type(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_nb_flags(ndr, NDR_SCALARS, r->nb_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -386,6 +395,7 @@ static enum ndr_err_code ndr_pull_nbt_status_name(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, 15, sizeof(uint8_t), CH_DOS)); NDR_CHECK(ndr_pull_nbt_name_type(ndr, NDR_SCALARS, &r->type)); NDR_CHECK(ndr_pull_nb_flags(ndr, NDR_SCALARS, &r->nb_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -413,6 +423,7 @@ static enum ndr_err_code ndr_push_nbt_rdata_status(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_nbt_status_name(ndr, NDR_SCALARS, &r->names[cntr_names_0])); } NDR_CHECK(ndr_push_nbt_statistics(ndr, NDR_SCALARS, &r->statistics)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -435,6 +446,7 @@ static enum ndr_err_code ndr_pull_nbt_rdata_status(struct ndr_pull *ndr, int ndr } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0); NDR_CHECK(ndr_pull_nbt_statistics(ndr, NDR_SCALARS, &r->statistics)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -468,6 +480,7 @@ static enum ndr_err_code ndr_push_nbt_rdata_data(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -481,6 +494,7 @@ static enum ndr_err_code ndr_pull_nbt_rdata_data(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length)); NDR_PULL_ALLOC_N(ndr, r->data, r->length); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, r->length)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -500,6 +514,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flag { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case NBT_QTYPE_NETBIOS: { NDR_CHECK(ndr_push_nbt_rdata_netbios(ndr, NDR_SCALARS, &r->netbios)); @@ -537,6 +552,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_rdata(struct ndr_pull *ndr, int ndr_flag int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case NBT_QTYPE_NETBIOS: { NDR_CHECK(ndr_pull_nbt_rdata_netbios(ndr, NDR_SCALARS, &r->netbios)); @@ -602,6 +618,7 @@ static enum ndr_err_code ndr_pull_nbt_res_rec(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->rdata, r->rr_type)); NDR_CHECK(ndr_pull_nbt_rdata(ndr, NDR_SCALARS, &r->rdata)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -663,6 +680,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_name_packet(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->padding)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -726,6 +744,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_name_packet(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->padding)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -911,6 +930,7 @@ static enum ndr_err_code ndr_push_smb_trans_body(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -959,6 +979,7 @@ static enum ndr_err_code ndr_pull_smb_trans_body(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -998,6 +1019,7 @@ static enum ndr_err_code ndr_push_smb_body(struct ndr_push *ndr, int ndr_flags, { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case SMB_TRANSACTION: { NDR_CHECK(ndr_push_smb_trans_body(ndr, NDR_SCALARS, &r->trans)); @@ -1025,6 +1047,7 @@ static enum ndr_err_code ndr_pull_smb_body(struct ndr_pull *ndr, int ndr_flags, int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case SMB_TRANSACTION: { NDR_CHECK(ndr_pull_smb_trans_body(ndr, NDR_SCALARS, &r->trans)); @@ -1083,6 +1106,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_dgram_smb_packet(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->mid)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->body, r->smb_command)); NDR_CHECK(ndr_push_smb_body(ndr, NDR_SCALARS, &r->body)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1113,6 +1137,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dgram_smb_packet(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->mid)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->body, r->smb_command)); NDR_CHECK(ndr_pull_smb_body(ndr, NDR_SCALARS, &r->body)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1152,6 +1177,7 @@ static enum ndr_err_code ndr_push_dgram_message_body(struct ndr_push *ndr, int n { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case DGRAM_SMB: { NDR_CHECK(ndr_push_dgram_smb_packet(ndr, NDR_SCALARS, &r->smb)); @@ -1179,6 +1205,7 @@ static enum ndr_err_code ndr_pull_dgram_message_body(struct ndr_pull *ndr, int n int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case DGRAM_SMB: { NDR_CHECK(ndr_pull_dgram_smb_packet(ndr, NDR_SCALARS, &r->smb)); @@ -1226,6 +1253,7 @@ static enum ndr_err_code ndr_push_dgram_message(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dgram_body_type)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->body, r->dgram_body_type)); NDR_CHECK(ndr_push_dgram_message_body(ndr, NDR_SCALARS, &r->body)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1243,6 +1271,7 @@ static enum ndr_err_code ndr_pull_dgram_message(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dgram_body_type)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->body, r->dgram_body_type)); NDR_CHECK(ndr_pull_dgram_message_body(ndr, NDR_SCALARS, &r->body)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1293,6 +1322,7 @@ static enum ndr_err_code ndr_push_dgram_data(struct ndr_push *ndr, int ndr_flags { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case DGRAM_DIRECT_UNIQUE: { NDR_CHECK(ndr_push_dgram_message(ndr, NDR_SCALARS, &r->msg)); @@ -1362,6 +1392,7 @@ static enum ndr_err_code ndr_pull_dgram_data(struct ndr_pull *ndr, int ndr_flags int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case DGRAM_DIRECT_UNIQUE: { NDR_CHECK(ndr_pull_dgram_message(ndr, NDR_SCALARS, &r->msg)); @@ -1478,6 +1509,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_dgram_packet(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->src_port)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->msg_type)); NDR_CHECK(ndr_push_dgram_data(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1500,6 +1532,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_dgram_packet(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->src_port)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->msg_type)); NDR_CHECK(ndr_pull_dgram_data(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1544,6 +1577,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1567,6 +1601,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1618,7 +1653,10 @@ _PUBLIC_ void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_NDNC", NBT_SERVER_NDNC, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_SELECT_SECRET_DOMAIN_6", NBT_SERVER_SELECT_SECRET_DOMAIN_6, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FULL_SECRET_DOMAIN_6", NBT_SERVER_FULL_SECRET_DOMAIN_6, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_DNS_FOREST", NBT_SERVER_DNS_FOREST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_ADS_WEB_SERVICE", NBT_SERVER_ADS_WEB_SERVICE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_HAS_DNS_NAME", NBT_SERVER_HAS_DNS_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_IS_DEFAULT_NC", NBT_SERVER_IS_DEFAULT_NC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FOREST_ROOT", NBT_SERVER_FOREST_ROOT, r); ndr->depth--; } @@ -1733,6 +1771,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_ NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1770,6 +1809,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_ NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1833,6 +1873,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_push NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1877,6 +1918,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_pull NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1941,6 +1983,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pu NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1979,6 +2022,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pu NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2048,6 +2092,7 @@ static enum ndr_err_code ndr_push_nbt_netlogon_query_for_pdc(struct ndr_push *nd NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2085,6 +2130,7 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_query_for_pdc(struct ndr_pull *nd NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2140,6 +2186,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_pu NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2183,6 +2230,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pu NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2218,6 +2266,7 @@ static enum ndr_err_code ndr_push_nbt_db_change_info(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->db_index)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->serial)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timestamp)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2231,6 +2280,7 @@ static enum ndr_err_code ndr_pull_nbt_db_change_info(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->db_index)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->serial)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timestamp)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2299,6 +2349,7 @@ static enum ndr_err_code ndr_push_NETLOGON_DB_CHANGE(struct ndr_push *ndr, int n } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_format_version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_token)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2362,6 +2413,7 @@ static enum ndr_err_code ndr_pull_NETLOGON_DB_CHANGE(struct ndr_pull *ndr, int n } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_format_version)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_token)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2404,6 +2456,7 @@ static enum ndr_err_code ndr_push_nbt_netlogon_request(struct ndr_push *ndr, int { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case LOGON_SAM_LOGON_REQUEST: { NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon)); @@ -2447,6 +2500,7 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_request(struct ndr_pull *ndr, int int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case LOGON_SAM_LOGON_REQUEST: { NDR_CHECK(ndr_pull_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon)); @@ -2517,6 +2571,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, in NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->req, r->command)); NDR_CHECK(ndr_push_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_nbt_netlogon_request(ndr, NDR_BUFFERS, &r->req)); @@ -2536,6 +2591,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->req, r->command)); NDR_CHECK(ndr_pull_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_nbt_netlogon_request(ndr, NDR_BUFFERS, &r->req)); @@ -2612,6 +2668,7 @@ static enum ndr_err_code ndr_push_nbt_browse_host_announcement(struct ndr_push * NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2637,6 +2694,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_host_announcement(struct ndr_pull * NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2671,6 +2729,7 @@ static enum ndr_err_code ndr_push_nbt_browse_announcement_request(struct ndr_pus NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ResponseName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2688,6 +2747,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_announcement_request(struct ndr_pul NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ResponseName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2717,6 +2777,7 @@ static enum ndr_err_code ndr_push_nbt_browse_election_request(struct ndr_push *n NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ServerName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2737,6 +2798,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_election_request(struct ndr_pull *n NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ServerName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2761,6 +2823,7 @@ static enum ndr_err_code ndr_push_nbt_browse_backup_list_request(struct ndr_push NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ReqCount)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Token)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2773,6 +2836,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_backup_list_request(struct ndr_pull NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ReqCount)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Token)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2798,6 +2862,7 @@ static enum ndr_err_code ndr_push_nbt_browse_backup_list_response(struct ndr_pus for (cntr_BackupServerList_0 = 0; cntr_BackupServerList_0 < r->BackupCount; cntr_BackupServerList_0++) { NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->BackupServerList[cntr_BackupServerList_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2819,6 +2884,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_backup_list_response(struct ndr_pul NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->BackupServerList[cntr_BackupServerList_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_BackupServerList_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2855,6 +2921,7 @@ static enum ndr_err_code ndr_push_nbt_browse_become_backup(struct ndr_push *ndr, NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->BrowserName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2871,6 +2938,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_become_backup(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->BrowserName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2902,6 +2970,7 @@ static enum ndr_err_code ndr_push_nbt_browse_domain_announcement(struct ndr_push NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2925,6 +2994,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_domain_announcement(struct ndr_pull NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2956,6 +3026,7 @@ static enum ndr_err_code ndr_push_nbt_browse_master_announcement(struct ndr_push NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ServerName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2972,6 +3043,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_master_announcement(struct ndr_pull NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ServerName)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2991,6 +3063,7 @@ static enum ndr_err_code ndr_push_nbt_browse_reset_state(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Command)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3002,6 +3075,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_reset_state(struct ndr_pull *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Command)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3035,6 +3109,7 @@ static enum ndr_err_code ndr_push_nbt_browse_local_master_announcement(struct nd NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3060,6 +3135,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_local_master_announcement(struct nd NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3087,6 +3163,7 @@ static enum ndr_err_code ndr_push_nbt_browse_payload(struct ndr_push *ndr, int n { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case HostAnnouncement: { NDR_CHECK(ndr_push_nbt_browse_host_announcement(ndr, NDR_SCALARS, &r->host_annoucement)); @@ -3177,6 +3254,7 @@ static enum ndr_err_code ndr_pull_nbt_browse_payload(struct ndr_pull *ndr, int n int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case HostAnnouncement: { NDR_CHECK(ndr_pull_nbt_browse_host_announcement(ndr, NDR_SCALARS, &r->host_annoucement)); @@ -3322,6 +3400,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_browse_packet(struct ndr_push *ndr, int NDR_CHECK(ndr_push_nbt_browse_opcode(ndr, NDR_SCALARS, r->opcode)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->payload, r->opcode)); NDR_CHECK(ndr_push_nbt_browse_payload(ndr, NDR_SCALARS, &r->payload)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3340,6 +3419,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_browse_packet(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_nbt_browse_opcode(ndr, NDR_SCALARS, &r->opcode)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->payload, r->opcode)); NDR_CHECK(ndr_pull_nbt_browse_payload(ndr, NDR_SCALARS, &r->payload)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } diff --git a/librpc/gen_ndr/ndr_netlogon.c b/librpc/gen_ndr/ndr_netlogon.c index 0013cf4d68..ceb7198027 100644 --- a/librpc/gen_ndr/ndr_netlogon.c +++ b/librpc/gen_ndr/ndr_netlogon.c @@ -28,6 +28,7 @@ static enum ndr_err_code ndr_push_netr_UasInfo(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->script_path)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->account_name) { @@ -106,6 +107,7 @@ static enum ndr_err_code ndr_pull_netr_UasInfo(struct ndr_pull *ndr, int ndr_fla r->script_path = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->account_name) { @@ -209,6 +211,7 @@ static enum ndr_err_code ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->duration)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -221,6 +224,7 @@ static enum ndr_err_code ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->duration)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -244,6 +248,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reset_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_attempt_lockout)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -258,6 +263,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reset_count)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_attempt_lockout)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -325,6 +331,7 @@ static enum ndr_err_code ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_id_high)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstation)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -344,6 +351,7 @@ static enum ndr_err_code ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_id_high)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstation)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -373,6 +381,7 @@ static enum ndr_err_code ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info)); NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword)); NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); @@ -387,6 +396,7 @@ static enum ndr_err_code ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info)); NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword)); NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); @@ -414,6 +424,7 @@ static enum ndr_err_code ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -445,6 +456,7 @@ static enum ndr_err_code ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, i } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -502,6 +514,7 @@ static enum ndr_err_code ndr_push_netr_NetworkInfo(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->challenge, 8)); NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt)); NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); @@ -524,6 +537,7 @@ static enum ndr_err_code ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->challenge, 8)); NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt)); NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); @@ -562,6 +576,7 @@ static enum ndr_err_code ndr_push_netr_GenericInfo(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->package_name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); @@ -594,6 +609,7 @@ static enum ndr_err_code ndr_pull_netr_GenericInfo(struct ndr_pull *ndr, int ndr } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); @@ -638,14 +654,14 @@ _PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name static enum ndr_err_code ndr_push_netr_LogonInfoClass(struct ndr_push *ndr, int ndr_flags, enum netr_LogonInfoClass r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_netr_LogonInfoClass(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonInfoClass *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -671,6 +687,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case NetlogonInteractiveInformation: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); @@ -765,10 +782,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int nd TALLOC_CTX *_mem_save_generic_0; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case NetlogonInteractiveInformation: { uint32_t _ptr_password; @@ -998,6 +1016,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1014,6 +1033,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, 16)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1043,6 +1063,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1059,6 +1080,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, 8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1144,6 +1166,7 @@ static enum ndr_err_code ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, int ndr for (cntr_unknown_0 = 0; cntr_unknown_0 < 7; cntr_unknown_0++) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown[cntr_unknown_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -1201,6 +1224,7 @@ static enum ndr_err_code ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, int ndr for (cntr_unknown_0 = 0; cntr_unknown_0 < 7; cntr_unknown_0++) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown[cntr_unknown_0])); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -1274,6 +1298,7 @@ static enum ndr_err_code ndr_push_netr_SamInfo2(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base)); @@ -1286,6 +1311,7 @@ static enum ndr_err_code ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base)); @@ -1307,6 +1333,7 @@ static enum ndr_err_code ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -1329,6 +1356,7 @@ static enum ndr_err_code ndr_pull_netr_SidAttr(struct ndr_pull *ndr, int ndr_fla r->sid = NULL; } NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -1363,6 +1391,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base)); @@ -1395,6 +1424,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_ } else { r->sids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base)); @@ -1460,6 +1490,7 @@ static enum ndr_err_code ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_fl for (cntr_unknown4_0 = 0; cntr_unknown4_0 < 20; cntr_unknown4_0++) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4[cntr_unknown4_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base)); @@ -1500,6 +1531,7 @@ static enum ndr_err_code ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_fl for (cntr_unknown4_0 = 0; cntr_unknown4_0 < 20; cntr_unknown4_0++) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4[cntr_unknown4_0])); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base)); @@ -1586,6 +1618,7 @@ static enum ndr_err_code ndr_push_netr_PacInfo(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->pac) { @@ -1641,6 +1674,7 @@ static enum ndr_err_code ndr_pull_netr_PacInfo(struct ndr_pull *ndr, int ndr_fla NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->pac) { @@ -1725,6 +1759,7 @@ static enum ndr_err_code ndr_push_netr_GenericInfo2(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -1753,6 +1788,7 @@ static enum ndr_err_code ndr_pull_netr_GenericInfo2(struct ndr_pull *ndr, int nd } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -1796,6 +1832,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case NetlogonValidationSamInfo: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2)); @@ -1876,6 +1913,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case NetlogonValidationSamInfo: { uint32_t _ptr_sam2; @@ -2049,6 +2087,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2065,6 +2104,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2092,6 +2132,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->cred)); NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2104,6 +2145,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->cred)); NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2132,6 +2174,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->account_name) { @@ -2168,6 +2211,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->account_name) { @@ -2219,6 +2263,7 @@ static enum ndr_err_code ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->pwd)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2233,6 +2278,7 @@ static enum ndr_err_code ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->pwd)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2262,6 +2308,7 @@ static enum ndr_err_code ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lm_flags)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2282,6 +2329,7 @@ static enum ndr_err_code ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length)); NDR_PULL_ALLOC_N(ndr, r->lm_history, r->lm_length); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2310,6 +2358,7 @@ static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword)); NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword)); NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2323,6 +2372,7 @@ static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword)); NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword)); NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2344,6 +2394,7 @@ static enum ndr_err_code ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2355,6 +2406,7 @@ static enum ndr_err_code ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2375,6 +2427,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2387,6 +2440,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2414,6 +2468,7 @@ static enum ndr_err_code ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->SensitiveData)); ndr->flags = _flags_save_uint8; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2448,6 +2503,7 @@ static enum ndr_err_code ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, i } ndr->flags = _flags_save_uint8; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2526,6 +2582,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2589,6 +2646,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2678,6 +2736,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -2714,6 +2773,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -2771,6 +2831,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->group_name)); @@ -2802,6 +2863,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->group_name)); @@ -2850,6 +2912,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->OldName)); @@ -2876,6 +2939,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->OldName)); @@ -2918,6 +2982,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->rids) { @@ -2965,6 +3030,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->rids) { @@ -3063,6 +3129,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->alias_name)); @@ -3091,6 +3158,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->alias_name)); @@ -3131,6 +3199,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids)); @@ -3147,6 +3216,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids)); @@ -3176,6 +3246,7 @@ static enum ndr_err_code ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximumworkingsetsize)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefilelimit)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timelimit)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3192,6 +3263,7 @@ static enum ndr_err_code ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximumworkingsetsize)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefilelimit)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timelimit)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3236,6 +3308,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->eventauditoptions) { @@ -3297,6 +3370,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->eventauditoptions) { @@ -3396,6 +3470,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -3443,6 +3518,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -3514,6 +3590,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DELETE_TRUST(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3525,6 +3602,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_TRUST(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3561,6 +3639,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->privilege_attrib) { @@ -3625,6 +3704,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->privilege_attrib) { @@ -3729,6 +3809,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DELETE_ACCOUNT(struct ndr_push *ndr if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3740,6 +3821,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_ACCOUNT(struct ndr_pull *ndr if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3759,6 +3841,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DELETE_SECRET(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3770,6 +3853,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_SECRET(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 2)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3791,6 +3875,7 @@ static enum ndr_err_code ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlen)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->cipher_data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->cipher_data) { @@ -3817,6 +3902,7 @@ static enum ndr_err_code ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, int nd } else { r->cipher_data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->cipher_data) { @@ -3874,6 +3960,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher)); @@ -3905,6 +3992,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher)); @@ -3941,14 +4029,14 @@ _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_netr_DeltaEnum(struct ndr_push *ndr, int ndr_flags, enum netr_DeltaEnum r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, int ndr_flags, enum netr_DeltaEnum *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -3989,6 +4077,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case NETR_DELTA_DOMAIN: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); @@ -4225,10 +4314,11 @@ static enum ndr_err_code ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, int ndr TALLOC_CTX *_mem_save_modified_count_0; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case NETR_DELTA_DOMAIN: { uint32_t _ptr_domain; @@ -4767,6 +4857,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case NETR_DELTA_DOMAIN: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); @@ -4970,10 +5061,11 @@ static enum ndr_err_code ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, int TALLOC_CTX *_mem_save_name_0; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case NETR_DELTA_DOMAIN: { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); @@ -5379,6 +5471,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type)); NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union)); @@ -5396,6 +5489,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type)); NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union)); @@ -5423,6 +5517,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_deltas)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->delta_enum)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->delta_enum) { @@ -5453,6 +5548,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, in } else { r->delta_enum = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->delta_enum) { @@ -5512,6 +5608,7 @@ static enum ndr_err_code ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timecreated)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5530,6 +5627,7 @@ static enum ndr_err_code ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timecreated)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5563,6 +5661,7 @@ static enum ndr_err_code ndr_push_netr_AccountBuffer(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5579,6 +5678,7 @@ static enum ndr_err_code ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob)); ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5628,6 +5728,7 @@ static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5640,6 +5741,7 @@ static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5663,6 +5765,7 @@ static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->tc_connection_status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->trusted_dc_name) { @@ -5690,6 +5793,7 @@ static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, int r->trusted_dc_name = NULL; } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->tc_connection_status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->trusted_dc_name) { @@ -5735,6 +5839,7 @@ static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5752,6 +5857,7 @@ static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5778,6 +5884,7 @@ static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_4(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->trusted_dc_name) { @@ -5816,6 +5923,7 @@ static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_4(struct ndr_pull *ndr, int } else { r->trusted_domain_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->trusted_dc_name) { @@ -5870,6 +5978,7 @@ static enum ndr_err_code ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); @@ -5941,6 +6050,7 @@ static enum ndr_err_code ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_info1; @@ -6125,6 +6235,7 @@ static enum ndr_err_code ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case NETLOGON_CONTROL_REDISCOVER: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); @@ -6239,6 +6350,7 @@ static enum ndr_err_code ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case NETLOGON_CONTROL_REDISCOVER: { uint32_t _ptr_domain; @@ -6531,14 +6643,14 @@ _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *n static enum ndr_err_code ndr_push_SyncStateEnum(struct ndr_push *ndr, int ndr_flags, enum SyncStateEnum r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_SyncStateEnum(struct ndr_pull *ndr, int ndr_flags, enum SyncStateEnum *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -6591,6 +6703,7 @@ static enum ndr_err_code ndr_push_netr_ChangeLogObject(struct ndr_push *ndr, int { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case NETR_CHANGELOG_SID_INCLUDED: { NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->object_sid)); @@ -6632,6 +6745,7 @@ static enum ndr_err_code ndr_pull_netr_ChangeLogObject(struct ndr_pull *ndr, int int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case NETR_CHANGELOG_SID_INCLUDED: { NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->object_sid)); @@ -6699,6 +6813,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, in NDR_CHECK(ndr_push_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, r->delta_type)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED))); NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object)); @@ -6718,6 +6833,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, &r->delta_type)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED))); NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object)); @@ -6751,6 +6867,7 @@ static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -6774,6 +6891,7 @@ static enum ndr_err_code ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -6903,7 +7021,7 @@ _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_FULL_SECRET_DOMAIN_6", DS_SERVER_FULL_SECRET_DOMAIN_6, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_CONTROLLER", DS_DNS_CONTROLLER, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_DOMAIN", DS_DNS_DOMAIN, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_FOREST", DS_DNS_FOREST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_FOREST_ROOT", DS_DNS_FOREST_ROOT, r); ndr->depth--; } @@ -6920,6 +7038,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, NDR_CHECK(ndr_push_netr_DsR_DcFlags(ndr, NDR_SCALARS, r->dc_flags)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_site_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_site_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dc_unc) { @@ -7017,6 +7136,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, } else { r->client_site_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->dc_unc) { @@ -7146,6 +7266,7 @@ static enum ndr_err_code ndr_push_netr_Capabilities(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities)); @@ -7178,6 +7299,7 @@ static enum ndr_err_code ndr_pull_netr_Capabilities(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities)); @@ -7330,6 +7452,7 @@ static enum ndr_err_code ndr_push_netr_LsaPolicyInformation(struct ndr_push *ndr NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->policy) { @@ -7353,6 +7476,7 @@ static enum ndr_err_code ndr_pull_netr_LsaPolicyInformation(struct ndr_pull *ndr } else { r->policy = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->policy) { @@ -7409,6 +7533,7 @@ static enum ndr_err_code ndr_push_netr_OsVersionInfoEx(struct ndr_push *ndr, int NDR_CHECK(ndr_push_netr_SuiteMask(ndr, NDR_SCALARS, r->SuiteMask)); NDR_CHECK(ndr_push_netr_ProductType(ndr, NDR_SCALARS, r->ProductType)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Reserved)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7440,6 +7565,7 @@ static enum ndr_err_code ndr_pull_netr_OsVersionInfoEx(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_netr_SuiteMask(ndr, NDR_SCALARS, &r->SuiteMask)); NDR_CHECK(ndr_pull_netr_ProductType(ndr, NDR_SCALARS, &r->ProductType)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Reserved)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7472,6 +7598,7 @@ static enum ndr_err_code ndr_push_netr_OsVersion(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 142)); NDR_CHECK(ndr_push_netr_OsVersionInfoEx(ndr, NDR_SCALARS, &r->os)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7486,6 +7613,7 @@ static enum ndr_err_code ndr_pull_netr_OsVersion(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_netr_OsVersionInfoEx(ndr, NDR_SCALARS, &r->os)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7510,6 +7638,7 @@ static enum ndr_err_code ndr_push_netr_OsVersionContainer(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->os)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->os) { @@ -7533,6 +7662,7 @@ static enum ndr_err_code ndr_pull_netr_OsVersionContainer(struct ndr_pull *ndr, } else { r->os = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->os) { @@ -7579,6 +7709,7 @@ static enum ndr_err_code ndr_push_netr_WorkstationInformation(struct ndr_push *n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy)); @@ -7687,6 +7818,7 @@ static enum ndr_err_code ndr_pull_netr_WorkstationInformation(struct ndr_pull *n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long2)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy)); @@ -7827,6 +7959,7 @@ static enum ndr_err_code ndr_push_netr_WorkstationInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->workstation_info)); @@ -7874,6 +8007,7 @@ static enum ndr_err_code ndr_pull_netr_WorkstationInfo(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_workstation_info; @@ -7966,6 +8100,7 @@ static enum ndr_err_code ndr_push_netr_trust_extension(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7983,6 +8118,7 @@ static enum ndr_err_code ndr_pull_netr_trust_extension(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_attributes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8010,6 +8146,7 @@ static enum ndr_err_code ndr_push_netr_trust_extension_container(struct ndr_push NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -8033,6 +8170,7 @@ static enum ndr_err_code ndr_pull_netr_trust_extension_container(struct ndr_pull } else { r->info = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->info) { @@ -8077,6 +8215,7 @@ static enum ndr_err_code ndr_push_netr_OneDomainInfo(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname)); @@ -8117,6 +8256,7 @@ static enum ndr_err_code ndr_pull_netr_OneDomainInfo(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long2)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname)); @@ -8204,6 +8344,7 @@ static enum ndr_err_code ndr_push_netr_DomainInformation(struct ndr_push *ndr, i NDR_CHECK(ndr_push_netr_SupportedEncTypes(ndr, NDR_SCALARS, r->supported_enc_types)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain)); @@ -8250,6 +8391,7 @@ static enum ndr_err_code ndr_pull_netr_DomainInformation(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_netr_SupportedEncTypes(ndr, NDR_SCALARS, &r->supported_enc_types)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain)); @@ -8320,6 +8462,7 @@ static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_info)); @@ -8367,6 +8510,7 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_ if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_domain_info; @@ -8457,6 +8601,7 @@ static enum ndr_err_code ndr_push_netr_CryptPassword(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 512)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8474,6 +8619,7 @@ static enum ndr_err_code ndr_pull_netr_CryptPassword(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 512)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8503,6 +8649,7 @@ static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesWCtr(struct ndr_push NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sitename) { @@ -8533,6 +8680,7 @@ static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesWCtr(struct ndr_pull } else { r->sitename = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sitename) { @@ -8588,6 +8736,7 @@ static enum ndr_err_code ndr_push_netr_DsRAddress(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->buffer) { @@ -8611,6 +8760,7 @@ static enum ndr_err_code ndr_pull_netr_DsRAddress(struct ndr_pull *ndr, int ndr_ r->buffer = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->buffer) { @@ -8709,6 +8859,7 @@ static enum ndr_err_code ndr_push_netr_DomainTrust(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_netr_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -8763,6 +8914,7 @@ static enum ndr_err_code ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, int ndr r->sid = NULL; } NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->netbios_name) { @@ -8836,6 +8988,7 @@ static enum ndr_err_code ndr_push_netr_DomainTrustList(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -8866,6 +9019,7 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustList(struct ndr_pull *ndr, int } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -8924,6 +9078,7 @@ static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExWCtr(struct ndr_pu NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->subnetname)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sitename) { @@ -8973,6 +9128,7 @@ static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExWCtr(struct ndr_pu } else { r->subnetname = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sitename) { @@ -9064,6 +9220,7 @@ static enum ndr_err_code ndr_push_DcSitesCtr(struct ndr_push *ndr, int ndr_flags NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sites)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sites)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sites) { @@ -9094,6 +9251,7 @@ static enum ndr_err_code ndr_pull_DcSitesCtr(struct ndr_pull *ndr, int ndr_flags } else { r->sites = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sites) { @@ -9153,6 +9311,7 @@ static enum ndr_err_code ndr_push_netr_TrustInfo(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entry_count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -9200,6 +9359,7 @@ static enum ndr_err_code ndr_pull_netr_TrustInfo(struct ndr_pull *ndr, int ndr_f } else { r->entries = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { diff --git a/librpc/gen_ndr/ndr_ntlmssp.c b/librpc/gen_ndr/ndr_ntlmssp.c index 0221d440c8..b863826fbd 100644 --- a/librpc/gen_ndr/ndr_ntlmssp.c +++ b/librpc/gen_ndr/ndr_ntlmssp.c @@ -161,6 +161,7 @@ static enum ndr_err_code ndr_push_VERSION(struct ndr_push *ndr, int ndr_flags, c NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ProductBuild)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Reserved, 3)); NDR_CHECK(ndr_push_ntlmssp_NTLMRevisionCurrent(ndr, NDR_SCALARS, r->NTLMRevisionCurrent)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -176,6 +177,7 @@ static enum ndr_err_code ndr_pull_VERSION(struct ndr_pull *ndr, int ndr_flags, s NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ProductBuild)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Reserved, 3)); NDR_CHECK(ndr_pull_ntlmssp_NTLMRevisionCurrent(ndr, NDR_SCALARS, &r->NTLMRevisionCurrent)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -198,6 +200,7 @@ static enum ndr_err_code ndr_push_ntlmssp_Version(struct ndr_push *ndr, int ndr_ { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 2)); switch (level) { case NTLMSSP_NEGOTIATE_VERSION: { NDR_CHECK(ndr_push_VERSION(ndr, NDR_SCALARS, &r->version)); @@ -227,6 +230,7 @@ static enum ndr_err_code ndr_pull_ntlmssp_Version(struct ndr_pull *ndr, int ndr_ int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 2)); switch (level) { case NTLMSSP_NEGOTIATE_VERSION: { NDR_CHECK(ndr_pull_VERSION(ndr, NDR_SCALARS, &r->version)); @@ -275,6 +279,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NEGOTIATE_MESSAGE(struct ndr_push *ndr, int } NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)); NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -351,6 +356,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NEGOTIATE_MESSAGE(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)); NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -428,14 +434,14 @@ _PUBLIC_ void ndr_print_NEGOTIATE_MESSAGE(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_ntlmssp_AvId(struct ndr_push *ndr, int ndr_flags, enum ntlmssp_AvId r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_ntlmssp_AvId(struct ndr_pull *ndr, int ndr_flags, enum ntlmssp_AvId *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -469,6 +475,7 @@ static enum ndr_err_code ndr_push_Restriction_Encoding(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->IntegrityLevel)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SubjectIntegrityLevel)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->MachineId, 32)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -484,6 +491,7 @@ static enum ndr_err_code ndr_pull_Restriction_Encoding(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->IntegrityLevel)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SubjectIntegrityLevel)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->MachineId, 32)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -532,6 +540,7 @@ static enum ndr_err_code ndr_push_ntlmssp_AvValue(struct ndr_push *ndr, int ndr_ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case MsvAvEOL: { break; } @@ -671,6 +680,7 @@ static enum ndr_err_code ndr_pull_ntlmssp_AvValue(struct ndr_pull *ndr, int ndr_ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case MsvAvEOL: { break; } @@ -884,6 +894,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_AV_PAIR(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_ntlmssp_AvValue(_ndr_Value, NDR_SCALARS|NDR_BUFFERS, &r->Value)); NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Value, 0, ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, ndr->iconv_convenience, 0))); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -908,6 +919,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_AV_PAIR(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_ntlmssp_AvValue(_ndr_Value, NDR_SCALARS|NDR_BUFFERS, &r->Value)); NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Value, 0, r->AvLen)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -987,6 +999,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_CHALLENGE_MESSAGE(struct ndr_push *ndr, int NDR_CHECK(ndr_push_relative_ptr1(ndr, r->TargetInfo)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)); NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1060,6 +1073,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_CHALLENGE_MESSAGE(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)); NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1147,6 +1161,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_LM_RESPONSE(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 24)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1163,6 +1178,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_LM_RESPONSE(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 24)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1193,6 +1209,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_LMv2_RESPONSE(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 16)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1210,6 +1227,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_LMv2_RESPONSE(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 16)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1236,6 +1254,7 @@ static enum ndr_err_code ndr_push_ntlmssp_LM_RESPONSE(struct ndr_push *ndr, int { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 1)); switch (level) { case 24: { NDR_CHECK(ndr_push_LM_RESPONSE(ndr, NDR_SCALARS, &r->v1)); @@ -1265,6 +1284,7 @@ static enum ndr_err_code ndr_pull_ntlmssp_LM_RESPONSE(struct ndr_pull *ndr, int int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 1)); switch (level) { case 24: { NDR_CHECK(ndr_pull_LM_RESPONSE(ndr, NDR_SCALARS, &r->v1)); @@ -1312,6 +1332,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NTLM_RESPONSE(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 24)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1328,6 +1349,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NTLM_RESPONSE(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 24)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1374,6 +1396,7 @@ static enum ndr_err_code ndr_push_NTLMv2_CLIENT_CHALLENGE(struct ndr_push *ndr, } ndr->flags = _flags_save_AV_PAIR_LIST; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1412,6 +1435,7 @@ static enum ndr_err_code ndr_pull_NTLMv2_CLIENT_CHALLENGE(struct ndr_pull *ndr, } ndr->flags = _flags_save_AV_PAIR_LIST; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1454,6 +1478,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NTLMv2_RESPONSE(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 16)); NDR_CHECK(ndr_push_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS, &r->Challenge)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_BUFFERS, &r->Challenge)); @@ -1472,6 +1497,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NTLMv2_RESPONSE(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 16)); NDR_CHECK(ndr_pull_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS, &r->Challenge)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_BUFFERS, &r->Challenge)); @@ -1499,6 +1525,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ntlmssp_NTLM_RESPONSE(struct ndr_push *ndr, { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 0: { break; } @@ -1536,6 +1563,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ntlmssp_NTLM_RESPONSE(struct ndr_pull *ndr, int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 0: { break; } @@ -1632,6 +1660,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_AUTHENTICATE_MESSAGE(struct ndr_push *ndr, i NDR_CHECK(ndr_push_NEGOTIATE(ndr, NDR_SCALARS, r->NegotiateFlags)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)); NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->LmChallengeResponse) { @@ -1805,6 +1834,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_AUTHENTICATE_MESSAGE(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_NEGOTIATE(ndr, NDR_SCALARS, &r->NegotiateFlags)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)); NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->LmChallengeResponse) { @@ -1996,6 +2026,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_push *n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->RandomPad)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Checksum)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SeqNum)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2010,6 +2041,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_pull *n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RandomPad)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Checksum)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SeqNum)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2037,6 +2069,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NTLMSSP_SIGN_VERSION)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SeqNum)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2055,6 +2088,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SeqNum)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } diff --git a/librpc/gen_ndr/ndr_ntsvcs.c b/librpc/gen_ndr/ndr_ntsvcs.c index 64917b429c..07a4a45d8f 100644 --- a/librpc/gen_ndr/ndr_ntsvcs.c +++ b/librpc/gen_ndr/ndr_ntsvcs.c @@ -3,7 +3,7 @@ #include "includes.h" #include "../librpc/gen_ndr/ndr_ntsvcs.h" -#include "librpc/gen_ndr/ndr_winreg.h" +#include "librpc/gen_ndr/ndr_misc.h" static enum ndr_err_code ndr_push_PNP_GetIdListFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -45,6 +45,7 @@ static enum ndr_err_code ndr_push_PNP_HwProfInfo(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->friendly_name[cntr_friendly_name_0])); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -61,6 +62,7 @@ static enum ndr_err_code ndr_pull_PNP_HwProfInfo(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->friendly_name[cntr_friendly_name_0])); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } diff --git a/librpc/gen_ndr/ndr_samr.c b/librpc/gen_ndr/ndr_samr.c index 4ee4603a4e..f4c1a0cfcf 100644 --- a/librpc/gen_ndr/ndr_samr.c +++ b/librpc/gen_ndr/ndr_samr.c @@ -32,33 +32,6 @@ _PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *na ndr_print_enum(ndr, name, "ENUM", val, r); } -_PUBLIC_ enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r) -{ - NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r) -{ - uint32_t v; - NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v)); - *r = v; - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r) -{ - const char *val = NULL; - - switch (r) { - case SAMR_REJECT_OTHER: val = "SAMR_REJECT_OTHER"; break; - case SAMR_REJECT_TOO_SHORT: val = "SAMR_REJECT_TOO_SHORT"; break; - case SAMR_REJECT_IN_HISTORY: val = "SAMR_REJECT_IN_HISTORY"; break; - case SAMR_REJECT_COMPLEXITY: val = "SAMR_REJECT_COMPLEXITY"; break; - } - ndr_print_enum(ndr, name, "ENUM", val, r); -} - _PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -248,6 +221,7 @@ static enum ndr_err_code ndr_push_samr_SamEntry(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -261,6 +235,7 @@ static enum ndr_err_code ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -284,6 +259,7 @@ static enum ndr_err_code ndr_push_samr_SamArray(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -314,6 +290,7 @@ static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_fl } else { r->entries = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -365,14 +342,14 @@ _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, c static enum ndr_err_code ndr_push_samr_DomainInfoClass(struct ndr_push *ndr, int ndr_flags, enum samr_DomainInfoClass r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_samr_DomainInfoClass(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainInfoClass *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -487,6 +464,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo1(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties)); NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age)); NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -502,6 +480,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties)); NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age)); NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -535,6 +514,7 @@ static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_groups)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aliases)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information)); @@ -559,6 +539,7 @@ static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_groups)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aliases)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information)); @@ -591,6 +572,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo3(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -602,6 +584,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -621,6 +604,7 @@ static enum ndr_err_code ndr_push_samr_DomOEMInformation(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information)); @@ -633,6 +617,7 @@ static enum ndr_err_code ndr_pull_samr_DomOEMInformation(struct ndr_pull *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information)); @@ -653,6 +638,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo5(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -665,6 +651,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); @@ -685,6 +672,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo6(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary)); @@ -697,6 +685,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary)); @@ -717,6 +706,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo7(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -728,6 +718,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -748,6 +739,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo8(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -760,6 +752,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -780,6 +773,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo9(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -791,6 +785,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -813,6 +808,7 @@ static enum ndr_err_code ndr_push_samr_DomGeneralInformation2(struct ndr_push *n NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general)); @@ -828,6 +824,7 @@ static enum ndr_err_code ndr_pull_samr_DomGeneralInformation2(struct ndr_pull *n NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general)); @@ -853,6 +850,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo12(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -866,6 +864,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -889,6 +888,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo13(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_count_at_last_promotion)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -902,6 +902,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_count_at_last_promotion)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -923,6 +924,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -1037,6 +1039,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_ if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -1206,6 +1209,7 @@ static enum ndr_err_code ndr_push_samr_Ids(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->ids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->ids) { @@ -1236,6 +1240,7 @@ static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, } else { r->ids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->ids) { @@ -1318,6 +1323,7 @@ static enum ndr_err_code ndr_push_samr_GroupInfoAll(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -1334,6 +1340,7 @@ static enum ndr_err_code ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -1358,6 +1365,7 @@ static enum ndr_err_code ndr_push_samr_GroupInfoAttributes(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1369,6 +1377,7 @@ static enum ndr_err_code ndr_pull_samr_GroupInfoAttributes(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1385,14 +1394,14 @@ _PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const ch static enum ndr_err_code ndr_push_samr_GroupInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_GroupInfoEnum r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_samr_GroupInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_GroupInfoEnum *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -1416,6 +1425,7 @@ static enum ndr_err_code ndr_push_samr_GroupInfo(struct ndr_push *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case GROUPINFOALL: { NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all)); @@ -1476,10 +1486,11 @@ static enum ndr_err_code ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_f uint16_t _level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case GROUPINFOALL: { NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all)); @@ -1573,6 +1584,7 @@ static enum ndr_err_code ndr_push_samr_RidTypeArray(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->types)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->rids) { @@ -1616,6 +1628,7 @@ static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int nd } else { r->types = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->rids) { @@ -1701,6 +1714,7 @@ static enum ndr_err_code ndr_push_samr_AliasInfoAll(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -1716,6 +1730,7 @@ static enum ndr_err_code ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); @@ -1736,14 +1751,14 @@ _PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_samr_AliasInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_AliasInfoEnum r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_samr_AliasInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_AliasInfoEnum *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -1765,6 +1780,7 @@ static enum ndr_err_code ndr_push_samr_AliasInfo(struct ndr_push *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case ALIASINFOALL: { NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all)); @@ -1810,10 +1826,11 @@ static enum ndr_err_code ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_f uint16_t _level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level)); if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case ALIASINFOALL: { NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all)); @@ -1877,14 +1894,14 @@ _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, static enum ndr_err_code ndr_push_samr_UserInfoLevel(struct ndr_push *ndr, int ndr_flags, enum samr_UserInfoLevel r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_samr_UserInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_UserInfoLevel *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -1930,6 +1947,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -1949,6 +1967,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -1979,6 +1998,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment)); @@ -1995,6 +2015,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment)); @@ -2023,6 +2044,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->units_per_week)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->bits)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->bits) { @@ -2053,6 +2075,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int nd } else { r->bits = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->bits) { @@ -2120,6 +2143,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count)); NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2156,6 +2180,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count)); NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2200,6 +2225,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); @@ -2212,6 +2238,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); @@ -2249,6 +2276,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry)); NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2286,6 +2314,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry)); NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2332,6 +2361,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2346,6 +2376,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2368,6 +2399,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2380,6 +2412,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2400,6 +2433,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); @@ -2412,6 +2446,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); @@ -2432,6 +2467,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo9(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, r->primary_gid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2443,6 +2479,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo9(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->primary_gid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2463,6 +2500,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); @@ -2477,6 +2515,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); @@ -2499,6 +2538,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); @@ -2511,6 +2551,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); @@ -2531,6 +2572,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); @@ -2543,6 +2585,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); @@ -2563,6 +2606,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); @@ -2575,6 +2619,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); @@ -2595,6 +2640,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); @@ -2607,6 +2653,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); @@ -2627,6 +2674,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2638,6 +2686,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2657,6 +2706,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2668,6 +2718,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2690,6 +2741,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2706,6 +2758,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2736,6 +2789,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo18(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_pwd_active)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_pwd_active)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2751,6 +2805,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo18(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_pwd_active)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_pwd_active)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2774,6 +2829,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters)); @@ -2786,6 +2842,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters)); @@ -2890,6 +2947,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_set)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->unknown4)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -2959,6 +3017,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_set)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown4)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -3044,6 +3103,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 516)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3060,6 +3120,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 516)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3087,6 +3148,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo23(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); @@ -3100,6 +3162,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo23(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); @@ -3122,6 +3185,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo24(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3134,6 +3198,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo24(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3157,6 +3222,7 @@ static enum ndr_err_code ndr_push_samr_CryptPasswordEx(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 532)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3173,6 +3239,7 @@ static enum ndr_err_code ndr_pull_samr_CryptPasswordEx(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 532)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3200,6 +3267,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo25(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); @@ -3213,6 +3281,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo25(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); @@ -3235,6 +3304,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo26(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3247,6 +3317,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo26(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3267,6 +3338,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -3470,6 +3542,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_fl if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -3771,6 +3844,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3783,6 +3857,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -3805,6 +3880,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push * NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->rids) { @@ -3832,6 +3908,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull * } else { r->rids = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->rids) { @@ -3888,6 +3965,7 @@ static enum ndr_err_code ndr_push_samr_DispEntryGeneral(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -3907,6 +3985,7 @@ static enum ndr_err_code ndr_pull_samr_DispEntryGeneral(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -3936,6 +4015,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoGeneral(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -3966,6 +4046,7 @@ static enum ndr_err_code ndr_pull_samr_DispInfoGeneral(struct ndr_pull *ndr, int } else { r->entries = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -4024,6 +4105,7 @@ static enum ndr_err_code ndr_push_samr_DispEntryFull(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -4041,6 +4123,7 @@ static enum ndr_err_code ndr_pull_samr_DispEntryFull(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -4068,6 +4151,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoFull(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -4098,6 +4182,7 @@ static enum ndr_err_code ndr_pull_samr_DispInfoFull(struct ndr_pull *ndr, int nd } else { r->entries = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -4156,6 +4241,7 @@ static enum ndr_err_code ndr_push_samr_DispEntryFullGroup(struct ndr_push *ndr, NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->acct_flags)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -4173,6 +4259,7 @@ static enum ndr_err_code ndr_pull_samr_DispEntryFullGroup(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->acct_flags)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); @@ -4200,6 +4287,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoFullGroups(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -4230,6 +4318,7 @@ static enum ndr_err_code ndr_pull_samr_DispInfoFullGroups(struct ndr_pull *ndr, } else { r->entries = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -4285,6 +4374,7 @@ static enum ndr_err_code ndr_push_samr_DispEntryAscii(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name)); @@ -4298,6 +4388,7 @@ static enum ndr_err_code ndr_pull_samr_DispEntryAscii(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_align(ndr, 5)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name)); @@ -4321,6 +4412,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoAscii(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -4351,6 +4443,7 @@ static enum ndr_err_code ndr_pull_samr_DispInfoAscii(struct ndr_pull *ndr, int n } else { r->entries = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->entries) { @@ -4405,6 +4498,7 @@ static enum ndr_err_code ndr_push_samr_DispInfo(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1)); @@ -4470,6 +4564,7 @@ static enum ndr_err_code ndr_pull_samr_DispInfo(struct ndr_pull *ndr, int ndr_fl if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1)); @@ -4561,6 +4656,7 @@ static enum ndr_err_code ndr_push_samr_PwInfo(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length)); NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4573,6 +4669,7 @@ static enum ndr_err_code ndr_pull_samr_PwInfo(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length)); NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4614,39 +4711,100 @@ _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *n ndr_print_enum(ndr, name, "ENUM", val, r); } -static enum ndr_err_code ndr_push_samr_ChangeReject(struct ndr_push *ndr, int ndr_flags, const struct samr_ChangeReject *r) +_PUBLIC_ enum ndr_err_code ndr_push_samPwdChangeReason(struct ndr_push *ndr, int ndr_flags, enum samPwdChangeReason r) +{ + NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samPwdChangeReason(struct ndr_pull *ndr, int ndr_flags, enum samPwdChangeReason *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samPwdChangeReason(struct ndr_print *ndr, const char *name, enum samPwdChangeReason r) +{ + const char *val = NULL; + + switch (r) { + case SAM_PWD_CHANGE_NO_ERROR: val = "SAM_PWD_CHANGE_NO_ERROR"; break; + case SAM_PWD_CHANGE_PASSWORD_TOO_SHORT: val = "SAM_PWD_CHANGE_PASSWORD_TOO_SHORT"; break; + case SAM_PWD_CHANGE_PWD_IN_HISTORY: val = "SAM_PWD_CHANGE_PWD_IN_HISTORY"; break; + case SAM_PWD_CHANGE_USERNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_USERNAME_IN_PASSWORD"; break; + case SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD"; break; + case SAM_PWD_CHANGE_NOT_COMPLEX: val = "SAM_PWD_CHANGE_NOT_COMPLEX"; break; + case SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT: val = "SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT"; break; + case SAM_PWD_CHANGE_FAILED_BY_FILTER: val = "SAM_PWD_CHANGE_FAILED_BY_FILTER"; break; + case SAM_PWD_CHANGE_PASSWORD_TOO_LONG: val = "SAM_PWD_CHANGE_PASSWORD_TOO_LONG"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_userPwdChangeFailureInformation(struct ndr_push *ndr, int ndr_flags, const struct userPwdChangeFailureInformation *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_RejectReason(ndr, NDR_SCALARS, r->reason)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + NDR_CHECK(ndr_push_align(ndr, 5)); + NDR_CHECK(ndr_push_samPwdChangeReason(ndr, NDR_SCALARS, r->extendedFailureReason)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->filterModuleName)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { + if (r->filterModuleName) { + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->filterModuleName, CH_UTF16))); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->filterModuleName, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->filterModuleName, ndr_charset_length(r->filterModuleName, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_samr_ChangeReject(struct ndr_pull *ndr, int ndr_flags, struct samr_ChangeReject *r) +static enum ndr_err_code ndr_pull_userPwdChangeFailureInformation(struct ndr_pull *ndr, int ndr_flags, struct userPwdChangeFailureInformation *r) { + uint32_t _ptr_filterModuleName; + TALLOC_CTX *_mem_save_filterModuleName_0; if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_RejectReason(ndr, NDR_SCALARS, &r->reason)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_align(ndr, 5)); + NDR_CHECK(ndr_pull_samPwdChangeReason(ndr, NDR_SCALARS, &r->extendedFailureReason)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filterModuleName)); + if (_ptr_filterModuleName) { + NDR_PULL_ALLOC(ndr, r->filterModuleName); + } else { + r->filterModuleName = NULL; + } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { + if (r->filterModuleName) { + _mem_save_filterModuleName_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->filterModuleName, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->filterModuleName)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->filterModuleName)); + if (ndr_get_array_length(ndr, &r->filterModuleName) > ndr_get_array_size(ndr, &r->filterModuleName)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->filterModuleName), ndr_get_array_length(ndr, &r->filterModuleName)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->filterModuleName), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->filterModuleName, ndr_get_array_length(ndr, &r->filterModuleName), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filterModuleName_0, 0); + } } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r) +_PUBLIC_ void ndr_print_userPwdChangeFailureInformation(struct ndr_print *ndr, const char *name, const struct userPwdChangeFailureInformation *r) { - ndr_print_struct(ndr, name, "samr_ChangeReject"); + ndr_print_struct(ndr, name, "userPwdChangeFailureInformation"); ndr->depth++; - ndr_print_samr_RejectReason(ndr, "reason", r->reason); - ndr_print_uint32(ndr, "unknown1", r->unknown1); - ndr_print_uint32(ndr, "unknown2", r->unknown2); + ndr_print_samPwdChangeReason(ndr, "extendedFailureReason", r->extendedFailureReason); + ndr_print_ptr(ndr, "filterModuleName", r->filterModuleName); + ndr->depth++; + if (r->filterModuleName) { + ndr_print_string(ndr, "filterModuleName", r->filterModuleName); + } + ndr->depth--; ndr->depth--; } @@ -4656,6 +4814,7 @@ static enum ndr_err_code ndr_push_samr_ConnectInfo1(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->client_version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4668,6 +4827,7 @@ static enum ndr_err_code ndr_pull_samr_ConnectInfo1(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->client_version)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4688,6 +4848,7 @@ static enum ndr_err_code ndr_push_samr_ConnectInfo(struct ndr_push *ndr, int ndr if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -4720,6 +4881,7 @@ static enum ndr_err_code ndr_pull_samr_ConnectInfo(struct ndr_pull *ndr, int ndr if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -4785,14 +4947,14 @@ _PUBLIC_ void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const static enum ndr_err_code ndr_push_samr_ValidatePasswordLevel(struct ndr_push *ndr, int ndr_flags, enum samr_ValidatePasswordLevel r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_samr_ValidatePasswordLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidatePasswordLevel *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -4811,14 +4973,14 @@ _PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const static enum ndr_err_code ndr_push_samr_ValidationStatus(struct ndr_push *ndr, int ndr_flags, enum samr_ValidationStatus r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_samr_ValidationStatus(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidationStatus *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -4849,6 +5011,7 @@ static enum ndr_err_code ndr_push_samr_ValidationBlob(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -4872,6 +5035,7 @@ static enum ndr_err_code ndr_pull_samr_ValidationBlob(struct ndr_pull *ndr, int } else { r->data = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -4915,6 +5079,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordInfo(struct ndr_push *ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pwd_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwd_history_len)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwd_history)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->pwd_history) { @@ -4950,6 +5115,7 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull *ndr } else { r->pwd_history = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->pwd_history) { @@ -5010,6 +5176,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordRepCtr(struct ndr_push *n NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_samr_ValidationStatus(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5023,6 +5190,7 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordRepCtr(struct ndr_pull *n NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_samr_ValidationStatus(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5044,6 +5212,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordRep(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1)); @@ -5093,6 +5262,7 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordRep(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1)); @@ -5164,6 +5334,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordReq3(struct ndr_push *ndr NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pwd_must_change_at_next_logon)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->clear_lockout)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5184,6 +5355,7 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq3(struct ndr_pull *ndr NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pwd_must_change_at_next_logon)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->clear_lockout)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5216,6 +5388,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordReq2(struct ndr_push *ndr NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account)); NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5235,6 +5408,7 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq2(struct ndr_pull *ndr NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account)); NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5263,6 +5437,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordReq1(struct ndr_push *ndr NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5276,6 +5451,7 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq1(struct ndr_pull *ndr NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); @@ -5297,6 +5473,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordReq(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1)); @@ -5346,6 +5523,7 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1)); @@ -11660,7 +11838,7 @@ static enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr, } NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.reject)); if (*r->out.reject) { - NDR_CHECK(ndr_push_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject)); + NDR_CHECK(ndr_push_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject)); } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } @@ -11809,7 +11987,7 @@ static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, if (*r->out.reject) { _mem_save_reject_1 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, *r->out.reject, 0); - NDR_CHECK(ndr_pull_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject)); + NDR_CHECK(ndr_pull_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_1, 0); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_0, LIBNDR_FLAG_REF_ALLOC); @@ -11888,7 +12066,7 @@ _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const ch ndr_print_ptr(ndr, "reject", *r->out.reject); ndr->depth++; if (*r->out.reject) { - ndr_print_samr_ChangeReject(ndr, "reject", *r->out.reject); + ndr_print_userPwdChangeFailureInformation(ndr, "reject", *r->out.reject); } ndr->depth--; ndr->depth--; diff --git a/librpc/gen_ndr/ndr_samr.h b/librpc/gen_ndr/ndr_samr.h index a341f69af0..9ece0ed5ca 100644 --- a/librpc/gen_ndr/ndr_samr.h +++ b/librpc/gen_ndr/ndr_samr.h @@ -151,9 +151,6 @@ extern const struct ndr_interface_table ndr_table_samr; enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r); enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r); void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r); -enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r); -enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r); -void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r); enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r); enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r); @@ -248,7 +245,10 @@ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r); void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r); void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r); -void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r); +enum ndr_err_code ndr_push_samPwdChangeReason(struct ndr_push *ndr, int ndr_flags, enum samPwdChangeReason r); +enum ndr_err_code ndr_pull_samPwdChangeReason(struct ndr_pull *ndr, int ndr_flags, enum samPwdChangeReason *r); +void ndr_print_samPwdChangeReason(struct ndr_print *ndr, const char *name, enum samPwdChangeReason r); +void ndr_print_userPwdChangeFailureInformation(struct ndr_print *ndr, const char *name, const struct userPwdChangeFailureInformation *r); void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r); void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r); void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r); diff --git a/librpc/gen_ndr/ndr_schannel.c b/librpc/gen_ndr/ndr_schannel.c index 8fa87f4d2d..9a2396f04e 100644 --- a/librpc/gen_ndr/ndr_schannel.c +++ b/librpc/gen_ndr/ndr_schannel.c @@ -28,6 +28,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netlogon_creds_CredentialState(struct ndr_pu NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF8), sizeof(uint8_t), CH_UTF8)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -75,6 +76,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_creds_CredentialState(struct ndr_pu } else { r->sid = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -171,6 +173,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER(struct ndr_push *ndr, { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: { { @@ -238,6 +241,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER(struct ndr_pull *ndr, int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: { { @@ -303,6 +307,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_push { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case NL_NEGOTIATE_RESPONSE: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy)); @@ -332,6 +337,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_pull int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case NL_NEGOTIATE_RESPONSE: { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy)); @@ -376,6 +382,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE)); NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain)); @@ -411,6 +418,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE)); NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain)); @@ -453,14 +461,14 @@ _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE(struct ndr_print *ndr, const char *name, static enum ndr_err_code ndr_push_NL_SIGNATURE_ALGORITHM(struct ndr_push *ndr, int ndr_flags, enum NL_SIGNATURE_ALGORITHM r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_NL_SIGNATURE_ALGORITHM(struct ndr_pull *ndr, int ndr_flags, enum NL_SIGNATURE_ALGORITHM *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -478,14 +486,14 @@ _PUBLIC_ void ndr_print_NL_SIGNATURE_ALGORITHM(struct ndr_print *ndr, const char static enum ndr_err_code ndr_push_NL_SEAL_ALGORITHM(struct ndr_push *ndr, int ndr_flags, enum NL_SEAL_ALGORITHM r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_NL_SEAL_ALGORITHM(struct ndr_pull *ndr, int ndr_flags, enum NL_SEAL_ALGORITHM *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -508,7 +516,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SIGNATURE(struct ndr_push *ndr, int uint32_t _flags_save_STRUCT = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 2)); + NDR_CHECK(ndr_push_align(ndr, 3)); NDR_CHECK(ndr_push_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, NL_SIGN_HMAC_MD5)); NDR_CHECK(ndr_push_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, r->SealAlgorithm)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Pad)); @@ -516,6 +524,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SIGNATURE(struct ndr_push *ndr, int NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } @@ -530,7 +539,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SIGNATURE(struct ndr_pull *ndr, int uint32_t _flags_save_STRUCT = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 2)); + NDR_CHECK(ndr_pull_align(ndr, 3)); NDR_CHECK(ndr_pull_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, &r->SignatureAlgorithm)); NDR_CHECK(ndr_pull_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, &r->SealAlgorithm)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad)); @@ -538,6 +547,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SIGNATURE(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } @@ -571,7 +581,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SHA2_SIGNATURE(struct ndr_push *ndr, uint32_t _flags_save_STRUCT = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 2)); + NDR_CHECK(ndr_push_align(ndr, 3)); NDR_CHECK(ndr_push_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, NL_SIGN_HMAC_SHA256)); NDR_CHECK(ndr_push_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, r->SealAlgorithm)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Pad)); @@ -579,6 +589,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SHA2_SIGNATURE(struct ndr_push *ndr, NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 32)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } @@ -593,7 +604,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SHA2_SIGNATURE(struct ndr_pull *ndr, uint32_t _flags_save_STRUCT = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 2)); + NDR_CHECK(ndr_pull_align(ndr, 3)); NDR_CHECK(ndr_pull_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, &r->SignatureAlgorithm)); NDR_CHECK(ndr_pull_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, &r->SealAlgorithm)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad)); @@ -601,6 +612,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SHA2_SIGNATURE(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, 32)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 3)); } if (ndr_flags & NDR_BUFFERS) { } diff --git a/librpc/gen_ndr/ndr_security.c b/librpc/gen_ndr/ndr_security.c index f6aac8ad01..5453d0c12b 100644 --- a/librpc/gen_ndr/ndr_security.c +++ b/librpc/gen_ndr/ndr_security.c @@ -92,6 +92,7 @@ static enum ndr_err_code ndr_push_security_ace_object_type(struct ndr_push *ndr, { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case SEC_ACE_OBJECT_TYPE_PRESENT: { NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->type)); @@ -121,6 +122,7 @@ static enum ndr_err_code ndr_pull_security_ace_object_type(struct ndr_pull *ndr, int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case SEC_ACE_OBJECT_TYPE_PRESENT: { NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->type)); @@ -164,6 +166,7 @@ static enum ndr_err_code ndr_push_security_ace_object_inherited_type(struct ndr_ { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: { NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->inherited_type)); @@ -193,6 +196,7 @@ static enum ndr_err_code ndr_pull_security_ace_object_inherited_type(struct ndr_ int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: { NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->inherited_type)); @@ -241,6 +245,7 @@ static enum ndr_err_code ndr_push_security_ace_object(struct ndr_push *ndr, int NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_SCALARS, &r->type)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)); NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_BUFFERS, &r->type)); @@ -258,6 +263,7 @@ static enum ndr_err_code ndr_pull_security_ace_object(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_SCALARS, &r->type)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)); NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_BUFFERS, &r->type)); @@ -282,6 +288,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: { NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); @@ -336,6 +343,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: { NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object)); @@ -423,6 +431,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->type)); NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object)); NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->trustee)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object)); @@ -446,14 +455,14 @@ _PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, co static enum ndr_err_code ndr_push_security_acl_revision(struct ndr_push *ndr, int ndr_flags, enum security_acl_revision r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_security_acl_revision(struct ndr_pull *ndr, int ndr_flags, enum security_acl_revision *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -480,6 +489,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_f for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) { NDR_CHECK(ndr_push_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) { @@ -508,6 +518,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -615,6 +626,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, in NDR_CHECK(ndr_push_relative_ptr1(ndr, r->group_sid)); NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sacl)); NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dacl)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->owner_sid) { @@ -684,6 +696,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, in } else { r->dacl = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->owner_sid) { @@ -776,6 +789,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_security_descriptor(r->sd, ndr->iconv_convenience, ndr->flags))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sd) { @@ -806,6 +820,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_f } else { r->sd = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sd) { @@ -851,6 +866,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr } NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->privilege_mask)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_dacl)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user_sid) { @@ -921,6 +937,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr if (r->sids) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user_sid) { diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index 88ff090fef..fb452bcec3 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -18,6 +18,7 @@ static enum ndr_err_code ndr_push_spoolss_Time(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->millisecond)); + NDR_CHECK(ndr_push_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -36,6 +37,7 @@ static enum ndr_err_code ndr_pull_spoolss_Time(struct ndr_pull *ndr, int ndr_fla NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->millisecond)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 2)); } if (ndr_flags & NDR_BUFFERS) { } @@ -68,6 +70,7 @@ static enum ndr_err_code ndr_push_spoolss_TimeCtr(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_Time(r->time, ndr->iconv_convenience, ndr->flags))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->time) { @@ -90,6 +93,7 @@ static enum ndr_err_code ndr_pull_spoolss_TimeCtr(struct ndr_pull *ndr, int ndr_ } else { r->time = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->time) { @@ -118,14 +122,14 @@ _PUBLIC_ void ndr_print_spoolss_TimeCtr(struct ndr_print *ndr, const char *name, static enum ndr_err_code ndr_push_spoolss_ProcessorArchitecture(struct ndr_push *ndr, int ndr_flags, enum spoolss_ProcessorArchitecture r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_spoolss_ProcessorArchitecture(struct ndr_pull *ndr, int ndr_flags, enum spoolss_ProcessorArchitecture *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -347,6 +351,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo0(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -430,6 +435,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo0(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1084,6 +1090,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeviceMode(struct ndr_push *ndr, int } ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1139,6 +1146,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeviceMode(struct ndr_pull *ndr, int } ndr->flags = _flags_save_DATA_BLOB; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1292,6 +1300,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, i NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1372,6 +1381,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, i } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1534,6 +1544,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, i NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1844,6 +1855,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2148,6 +2160,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo3(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->secdesc) { @@ -2176,6 +2189,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo3(struct ndr_pull *ndr, i } else { r->secdesc = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->secdesc) { @@ -2232,6 +2246,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo4(struct ndr_push *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2289,6 +2304,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo4(struct ndr_pull *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2369,6 +2385,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo5(struct ndr_push *ndr, i NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2428,6 +2445,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo5(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2496,6 +2514,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo6(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2507,6 +2526,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo6(struct ndr_pull *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -2563,6 +2583,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo7(struct ndr_push *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2597,6 +2618,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo7(struct ndr_pull *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -2642,6 +2664,7 @@ static enum ndr_err_code ndr_push_spoolss_DeviceModeInfo(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->devmode) { @@ -2670,6 +2693,7 @@ static enum ndr_err_code ndr_pull_spoolss_DeviceModeInfo(struct ndr_pull *ndr, i } else { r->devmode = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->devmode) { @@ -2709,6 +2733,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo(struct ndr_push *ndr, in uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -2833,6 +2858,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo(struct ndr_pull *ndr, in int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -3013,6 +3039,7 @@ static enum ndr_err_code ndr_push_spoolss_DevmodeContainer(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->iconv_convenience, ndr->flags))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->devmode)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->devmode) { @@ -3040,6 +3067,7 @@ static enum ndr_err_code ndr_pull_spoolss_DevmodeContainer(struct ndr_pull *ndr, } else { r->devmode = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->devmode) { @@ -3118,6 +3146,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo1(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed)); NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -3276,6 +3305,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo1(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed)); NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -3504,6 +3534,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo2(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -3784,6 +3815,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo2(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -4062,6 +4094,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo3(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_job_id)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4075,6 +4108,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo3(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_job_id)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4174,6 +4208,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo4(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -4455,6 +4490,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo4(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -4732,6 +4768,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo(struct ndr_push *ndr, int nd uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -4796,6 +4833,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo(struct ndr_pull *ndr, int nd int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -4903,6 +4941,7 @@ static enum ndr_err_code ndr_push_spoolss_SetJobInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed)); NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printer_name) { @@ -5007,6 +5046,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetJobInfo1(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed)); NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printer_name) { @@ -5162,6 +5202,7 @@ static enum ndr_err_code ndr_push_spoolss_SetJobInfo2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printer_name) { @@ -5328,6 +5369,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetJobInfo2(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printer_name) { @@ -5562,6 +5604,7 @@ static enum ndr_err_code ndr_push_spoolss_SetJobInfo4(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printer_name) { @@ -5729,6 +5772,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetJobInfo4(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printer_name) { @@ -5941,6 +5985,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetJobInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); @@ -6012,6 +6057,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetJobInfo(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_info1; @@ -6159,6 +6205,7 @@ static enum ndr_err_code ndr_push_spoolss_JobInfoContainer(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info)); @@ -6173,6 +6220,7 @@ static enum ndr_err_code ndr_pull_spoolss_JobInfoContainer(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info)); @@ -6283,6 +6331,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo0(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->servername) { @@ -6348,6 +6397,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo0(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->servername) { @@ -6432,6 +6482,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo1(struct ndr_push *ndr, NDR_CHECK(ndr_push_unique_ptr(ndr, r->description)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->description) { @@ -6485,6 +6536,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo1(struct ndr_pull *ndr, } else { r->comment = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->description) { @@ -6578,6 +6630,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo2(struct ndr_push *ndr, NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->servername) { @@ -6785,6 +6838,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo2(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->servername) { @@ -7043,6 +7097,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo3(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sec_desc_ptr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7054,6 +7109,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo3(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sec_desc_ptr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7075,6 +7131,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo4(struct ndr_push *ndr, NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername)); NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printername) { @@ -7114,6 +7171,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo4(struct ndr_pull *ndr, r->servername = NULL; } NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printername) { @@ -7173,6 +7231,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo5(struct ndr_push *ndr, NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printername) { @@ -7214,6 +7273,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo5(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->printername) { @@ -7271,6 +7331,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo6(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7282,6 +7343,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo6(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7302,6 +7364,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo7(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->guid)); NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->guid) { @@ -7327,6 +7390,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo7(struct ndr_pull *ndr, r->guid = NULL; } NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->guid) { @@ -7364,6 +7428,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -7501,6 +7566,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo(struct ndr_pull *ndr, i if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -7816,6 +7882,7 @@ static enum ndr_err_code ndr_push_spoolss_SetPrinterInfoCtr(struct ndr_push *ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info)); @@ -7830,6 +7897,7 @@ static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfoCtr(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info)); @@ -7858,6 +7926,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_StringArray(struct ndr_push *ndr, in NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->string)); ndr->flags = _flags_save_string_array; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7875,6 +7944,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_StringArray(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->string)); ndr->flags = _flags_save_string_array; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7895,6 +7965,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfo1(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -7919,6 +7990,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo1(struct ndr_pull *ndr, i } else { r->driver_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -7987,6 +8059,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfo2(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -8068,6 +8141,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo2(struct ndr_pull *ndr, i } else { r->config_file = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -8187,6 +8261,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfo3(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -8322,6 +8397,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo3(struct ndr_pull *ndr, i } else { r->dependent_files = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -8510,6 +8586,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfo4(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->previous_names, ndr->iconv_convenience, ndr->flags) - 4) / 2))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->previous_names)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -8657,6 +8734,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo4(struct ndr_pull *ndr, i } else { r->previous_names = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -8886,6 +8964,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfo6(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_url)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->hardware_id)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->provider)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -9091,6 +9170,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo6(struct ndr_pull *ndr, i } else { r->provider = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -9382,6 +9462,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfo8(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->core_driver_dependencies)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->min_inbox_driver_ver_date)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->min_inbox_driver_ver_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -9656,6 +9737,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo8(struct ndr_pull *ndr, i } NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_date)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { if (r->driver_name) { @@ -10002,6 +10084,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfo(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); @@ -10093,6 +10176,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_info1; @@ -10293,6 +10377,7 @@ static enum ndr_err_code ndr_push_spoolss_AddDriverInfoCtr(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr, NDR_BUFFERS, &r->info)); @@ -10307,6 +10392,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddDriverInfoCtr(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level)); NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr, NDR_BUFFERS, &r->info)); @@ -10334,6 +10420,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo1(struct ndr_push *ndr, in NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -10367,6 +10454,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo1(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -10441,6 +10529,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo2(struct ndr_push *ndr, in NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -10567,6 +10656,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo2(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -10750,6 +10840,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo3(struct ndr_push *ndr, in NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -10968,6 +11059,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo3(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -11241,6 +11333,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo4(struct ndr_push *ndr, in NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous_names)); ndr->flags = _flags_save_string_array; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -11482,6 +11575,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo4(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string_array; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -11749,6 +11843,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo5(struct ndr_push *ndr, in NDR_CHECK(ndr_push_spoolss_DriverAttributes(ndr, NDR_SCALARS, r->driver_attributes)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->config_version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->driver_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -11878,6 +11973,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo5(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_spoolss_DriverAttributes(ndr, NDR_SCALARS, &r->driver_attributes)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->config_version)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->driver_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -12096,6 +12192,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo6(struct ndr_push *ndr, in NDR_CHECK(ndr_push_relative_ptr1(ndr, r->provider)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { { @@ -12431,6 +12528,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo6(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { { @@ -12870,6 +12968,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo8(struct ndr_push *ndr, in } NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->min_inbox_driver_ver_date)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->min_inbox_driver_ver_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { { @@ -13323,6 +13422,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, in } NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_date)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { { @@ -13786,6 +13886,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverFileInfo(struct ndr_push *ndr, } NDR_CHECK(ndr_push_spoolss_DriverFileType(ndr, NDR_SCALARS, r->file_type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->file_version)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -13821,6 +13922,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverFileInfo(struct ndr_pull *ndr, } NDR_CHECK(ndr_pull_spoolss_DriverFileType(ndr, NDR_SCALARS, &r->file_type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->file_version)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -13948,6 +14050,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo(struct ndr_push *ndr, int uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -14053,6 +14156,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo(struct ndr_pull *ndr, int int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 8)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -14210,6 +14314,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverDirectoryInfo1(struct ndr_push NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->directory_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14226,6 +14331,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverDirectoryInfo1(struct ndr_pull NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->directory_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14250,6 +14356,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverDirectoryInfo(struct ndr_push uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -14287,6 +14394,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverDirectoryInfo(struct ndr_pull int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -14349,6 +14457,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -14382,6 +14491,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -14426,6 +14536,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo(struct ndr_push * uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -14461,6 +14572,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo(struct ndr_pull * int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -14515,6 +14627,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo1(struct NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->directory_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14531,6 +14644,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo1(struct NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->directory_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14555,6 +14669,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo(struct n uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -14592,6 +14707,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo(struct n int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -14651,6 +14767,7 @@ static enum ndr_err_code ndr_push_spoolss_DocumentInfo1(struct ndr_push *ndr, in NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->output_file)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->datatype)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->document_name) { @@ -14703,6 +14820,7 @@ static enum ndr_err_code ndr_pull_spoolss_DocumentInfo1(struct ndr_pull *ndr, in } else { r->datatype = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->document_name) { @@ -14775,6 +14893,7 @@ static enum ndr_err_code ndr_push_spoolss_DocumentInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); @@ -14825,6 +14944,7 @@ static enum ndr_err_code ndr_pull_spoolss_DocumentInfo(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_info1; @@ -14919,6 +15039,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersion(struct ndr_push *ndr, int } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14945,6 +15066,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersion(struct ndr_pull *ndr, int } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14994,6 +15116,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersionEx(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->suite_mask)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->product_type)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -15025,6 +15148,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersionEx(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->suite_mask)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->product_type)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -15058,6 +15182,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterData(struct ndr_push *ndr, in { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case REG_NONE: { break; } @@ -15135,6 +15260,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterData(struct ndr_pull *ndr, in int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case REG_NONE: { break; } @@ -15275,6 +15401,7 @@ static enum ndr_err_code ndr_push_spoolss_FormSize(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->width)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->height)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -15287,6 +15414,7 @@ static enum ndr_err_code ndr_pull_spoolss_FormSize(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->width)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->height)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -15310,6 +15438,7 @@ static enum ndr_err_code ndr_push_spoolss_FormArea(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->top)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->right)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bottom)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -15324,6 +15453,7 @@ static enum ndr_err_code ndr_pull_spoolss_FormArea(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->top)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->right)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bottom)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -15354,6 +15484,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo1(struct ndr_push *ndr, int } NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -15390,6 +15521,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo1(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -15490,6 +15622,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo2(struct ndr_push *ndr, int ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lang_id)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -15598,6 +15731,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo2(struct ndr_pull *ndr, int ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lang_id)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -15711,6 +15845,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo(struct ndr_push *ndr, int n uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -15756,6 +15891,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo(struct ndr_pull *ndr, int n int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -15827,6 +15963,7 @@ static enum ndr_err_code ndr_push_spoolss_AddFormInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_unique_ptr(ndr, r->form_name)); NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->form_name) { @@ -15854,6 +15991,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddFormInfo1(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->form_name) { @@ -15902,6 +16040,7 @@ static enum ndr_err_code ndr_push_spoolss_AddFormInfo2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ressource_id)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->display_name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lang_id)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->form_name) { @@ -15974,6 +16113,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddFormInfo2(struct ndr_pull *ndr, int r->display_name = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lang_id)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->form_name) { @@ -16070,6 +16210,7 @@ static enum ndr_err_code ndr_push_spoolss_AddFormInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); @@ -16117,6 +16258,7 @@ static enum ndr_err_code ndr_pull_spoolss_AddFormInfo(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_info1; @@ -16208,6 +16350,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_relative_ptr1(ndr, r->port_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16241,6 +16384,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo1(struct ndr_pull *ndr, int } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16329,6 +16473,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo2(struct ndr_push *ndr, int } NDR_CHECK(ndr_push_spoolss_PortType(ndr, NDR_SCALARS, r->port_type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16410,6 +16555,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo2(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_spoolss_PortType(ndr, NDR_SCALARS, &r->port_type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16567,6 +16713,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo3(struct ndr_push *ndr, int ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_spoolss_PortSeverity(ndr, NDR_SCALARS, r->severity)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16602,6 +16749,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo3(struct ndr_pull *ndr, int ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_spoolss_PortSeverity(ndr, NDR_SCALARS, &r->severity)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16654,6 +16802,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfoFF(struct ndr_push *ndr, int ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->monitor_data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16688,6 +16837,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfoFF(struct ndr_pull *ndr, int ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->monitor_data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16733,6 +16883,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo(struct ndr_push *ndr, int n uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -16798,6 +16949,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo(struct ndr_pull *ndr, int n int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -16894,6 +17046,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo1(struct ndr_push *ndr, i NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16927,6 +17080,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo1(struct ndr_pull *ndr, i } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -16988,6 +17142,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo2(struct ndr_push *ndr, i NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dll_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -17067,6 +17222,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo2(struct ndr_pull *ndr, i } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -17153,6 +17309,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo(struct ndr_push *ndr, in uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -17198,6 +17355,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo(struct ndr_pull *ndr, in int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -17266,6 +17424,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo1(struct ndr_p NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name_array)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -17299,6 +17458,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo1(struct ndr_p } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -17343,6 +17503,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo(struct ndr_pu uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr); if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_align(ndr, 5)); @@ -17378,6 +17539,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo(struct ndr_pu int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_pull_align(ndr, 5)); @@ -17591,6 +17753,7 @@ static enum ndr_err_code ndr_push_spoolss_Field(struct ndr_push *ndr, int ndr_fl { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_union_align(ndr, 2)); switch (level) { case PRINTER_NOTIFY_TYPE: { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->field)); @@ -17628,6 +17791,7 @@ static enum ndr_err_code ndr_pull_spoolss_Field(struct ndr_pull *ndr, int ndr_fl int level; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_union_align(ndr, 2)); switch (level) { case PRINTER_NOTIFY_TYPE: { NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->field)); @@ -17670,6 +17834,7 @@ static enum ndr_err_code ndr_push_spoolss_NotifyOptionType(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->fields)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->fields) { @@ -17702,6 +17867,7 @@ static enum ndr_err_code ndr_pull_spoolss_NotifyOptionType(struct ndr_pull *ndr, } else { r->fields = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->fields) { @@ -17785,6 +17951,7 @@ static enum ndr_err_code ndr_push_spoolss_NotifyOption(struct ndr_push *ndr, int NDR_CHECK(ndr_push_spoolssNotifyOptionFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->types)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->types) { @@ -17817,6 +17984,7 @@ static enum ndr_err_code ndr_pull_spoolss_NotifyOption(struct ndr_pull *ndr, int } else { r->types = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->types) { @@ -17874,6 +18042,7 @@ static enum ndr_err_code ndr_push_spoolss_NotifyString(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -17897,6 +18066,7 @@ static enum ndr_err_code ndr_pull_spoolss_NotifyString(struct ndr_pull *ndr, int } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -17960,6 +18130,7 @@ static enum ndr_err_code ndr_push_spoolss_NotifyData(struct ndr_push *ndr, int n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { uint32_t cntr_integer_0; @@ -18027,6 +18198,7 @@ static enum ndr_err_code ndr_pull_spoolss_NotifyData(struct ndr_pull *ndr, int n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t cntr_integer_0; @@ -18135,6 +18307,7 @@ static enum ndr_err_code ndr_push_spoolss_Notify(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->variable_type)); NDR_CHECK(ndr_push_spoolss_NotifyData(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_spoolss_NotifyData(ndr, NDR_BUFFERS, &r->data)); @@ -18153,6 +18326,7 @@ static enum ndr_err_code ndr_pull_spoolss_Notify(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->variable_type)); NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr, NDR_SCALARS, &r->data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr, NDR_BUFFERS, &r->data)); @@ -18186,6 +18360,7 @@ static enum ndr_err_code ndr_push_spoolss_NotifyInfo(struct ndr_push *ndr, int n for (cntr_notifies_0 = 0; cntr_notifies_0 < r->count; cntr_notifies_0++) { NDR_CHECK(ndr_push_spoolss_Notify(ndr, NDR_SCALARS, &r->notifies[cntr_notifies_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { for (cntr_notifies_0 = 0; cntr_notifies_0 < r->count; cntr_notifies_0++) { @@ -18215,6 +18390,7 @@ static enum ndr_err_code ndr_pull_spoolss_NotifyInfo(struct ndr_pull *ndr, int n if (r->notifies) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->notifies, r->count)); } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_notifies_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -18253,6 +18429,7 @@ static enum ndr_err_code ndr_push_spoolss_ReplyPrinterInfo(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -18289,6 +18466,7 @@ static enum ndr_err_code ndr_pull_spoolss_ReplyPrinterInfo(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -18377,6 +18555,7 @@ static enum ndr_err_code ndr_push_spoolss_UserLevel1(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr, NDR_SCALARS, r->major)); NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr, NDR_SCALARS, r->minor)); NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -18420,6 +18599,7 @@ static enum ndr_err_code ndr_pull_spoolss_UserLevel1(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr, NDR_SCALARS, &r->major)); NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr, NDR_SCALARS, &r->minor)); NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -18479,6 +18659,7 @@ static enum ndr_err_code ndr_push_spoolss_UserLevel2(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, r->not_used)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -18490,6 +18671,7 @@ static enum ndr_err_code ndr_pull_spoolss_UserLevel2(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->not_used)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -18518,6 +18700,7 @@ static enum ndr_err_code ndr_push_spoolss_UserLevel3(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr, NDR_SCALARS, r->minor)); NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor)); NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reserved)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -18564,6 +18747,7 @@ static enum ndr_err_code ndr_pull_spoolss_UserLevel3(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr, NDR_SCALARS, &r->minor)); NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor)); NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reserved)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -18626,6 +18810,7 @@ static enum ndr_err_code ndr_push_spoolss_UserLevel(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->level1)); @@ -18684,6 +18869,7 @@ static enum ndr_err_code ndr_pull_spoolss_UserLevel(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_level1; @@ -18800,6 +18986,7 @@ static enum ndr_err_code ndr_push_spoolss_UserLevelCtr(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->user_info, r->level)); NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_SCALARS, &r->user_info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_BUFFERS, &r->user_info)); @@ -18814,6 +19001,7 @@ static enum ndr_err_code ndr_pull_spoolss_UserLevelCtr(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->user_info, r->level)); NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr, NDR_SCALARS, &r->user_info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr, NDR_BUFFERS, &r->user_info)); @@ -18874,6 +19062,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterEnumValues(struct ndr_push *n NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_PrinterData(r->data, r->type, ndr->iconv_convenience, ndr->flags))); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r)); @@ -18933,6 +19122,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterEnumValues(struct ndr_pull *n r->data = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r)); @@ -19068,6 +19258,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortData1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_number)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_enabled)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_dev_index)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19093,6 +19284,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortData1(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_number)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_enabled)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_dev_index)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19139,6 +19331,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortData2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_enabled)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_dev_index)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_monitor_mib_index)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19163,6 +19356,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortData2(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_enabled)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_dev_index)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_monitor_mib_index)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19200,6 +19394,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorUi(struct ndr_push *ndr, int NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dll_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19216,6 +19411,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorUi(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dll_name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19267,6 +19463,7 @@ static enum ndr_err_code ndr_push_spoolss_CorePrinterDriver(struct ndr_push *ndr NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->formname, 520, sizeof(uint8_t), CH_UTF8)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -19281,6 +19478,7 @@ static enum ndr_err_code ndr_pull_spoolss_CorePrinterDriver(struct ndr_pull *ndr NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->formname, 520, sizeof(uint8_t), CH_UTF8)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } diff --git a/librpc/gen_ndr/ndr_srvsvc.c b/librpc/gen_ndr/ndr_srvsvc.c index 54eca841ab..740f610821 100644 --- a/librpc/gen_ndr/ndr_srvsvc.c +++ b/librpc/gen_ndr/ndr_srvsvc.c @@ -10,6 +10,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->device)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -34,6 +35,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo0(struct ndr_pull *ndr, i } else { r->device = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -72,6 +74,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -102,6 +105,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, in } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -159,6 +163,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->user)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -199,6 +204,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, i r->user = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -257,6 +263,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -287,6 +294,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, in } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -341,6 +349,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -390,6 +399,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -479,6 +489,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -528,6 +539,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -619,6 +631,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfoCtr(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -633,6 +646,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfoCtr(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -655,6 +669,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->device)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -679,6 +694,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, } else { r->device = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -717,6 +733,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -747,6 +764,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -805,6 +823,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -846,6 +865,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->device) { @@ -905,6 +925,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -935,6 +956,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -989,6 +1011,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -1038,6 +1061,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, i if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -1127,6 +1151,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -1176,6 +1201,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -1267,6 +1293,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfoCtr(struct ndr_push *ndr NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -1281,6 +1308,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfoCtr(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -1303,6 +1331,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1314,6 +1343,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1335,6 +1365,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -1362,6 +1393,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -1419,6 +1451,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->user)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->share)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user) { @@ -1462,6 +1495,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int } else { r->share = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user) { @@ -1523,6 +1557,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -1553,6 +1588,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -1607,6 +1643,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -1656,6 +1693,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -1747,6 +1785,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetConnInfoCtr(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -1761,6 +1800,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetConnInfoCtr(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -1783,6 +1823,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1794,6 +1835,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1815,6 +1857,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -1842,6 +1885,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -1897,6 +1941,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->user)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -1938,6 +1983,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int } else { r->user = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->path) { @@ -1997,6 +2043,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2027,6 +2074,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2081,6 +2129,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); @@ -2130,6 +2179,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 2: { uint32_t _ptr_info2; @@ -2219,6 +2269,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2)); @@ -2268,6 +2319,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 2: { uint32_t _ptr_ctr2; @@ -2359,6 +2411,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileInfoCtr(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -2373,6 +2426,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileInfoCtr(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -2395,6 +2449,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->client)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -2419,6 +2474,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int } else { r->client = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -2457,6 +2513,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2487,6 +2544,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2546,6 +2604,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -2588,6 +2647,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -2648,6 +2708,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2678,6 +2739,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2738,6 +2800,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -2794,6 +2857,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int } else { r->client_type = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -2872,6 +2936,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2902,6 +2967,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int n } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -2959,6 +3025,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int NDR_CHECK(ndr_push_unique_ptr(ndr, r->user)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -2999,6 +3066,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -3057,6 +3125,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3087,6 +3156,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3148,6 +3218,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -3218,6 +3289,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, in } else { r->transport = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->client) { @@ -3314,6 +3386,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3344,6 +3417,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3398,6 +3472,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -3480,6 +3555,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -3655,6 +3731,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessInfoCtr(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -3669,6 +3746,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSessInfoCtr(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -3741,6 +3819,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -3765,6 +3844,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int } else { r->name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -3803,6 +3883,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3833,6 +3914,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3889,6 +3971,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -3928,6 +4011,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int } else { r->comment = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -3985,6 +4069,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4015,6 +4100,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4076,6 +4162,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -4146,6 +4233,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int } else { r->password = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -4242,6 +4330,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4272,6 +4361,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4329,6 +4419,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, i NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -4369,6 +4460,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, i r->comment = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -4427,6 +4519,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4457,6 +4550,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, in } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4519,6 +4613,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->path)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -4591,6 +4686,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, i r->password = NULL; } NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -4689,6 +4785,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, in NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4719,6 +4816,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, in } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4773,6 +4871,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -4797,6 +4896,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, } else { r->comment = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -4835,6 +4935,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4865,6 +4966,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4942,6 +5044,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4953,6 +5056,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -4974,6 +5078,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5001,6 +5106,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5052,6 +5158,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5063,6 +5170,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5084,6 +5192,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5111,6 +5220,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5163,6 +5273,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->alternate_directory_name) { @@ -5188,6 +5299,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, } else { r->alternate_directory_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->alternate_directory_name) { @@ -5227,6 +5339,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5257,6 +5370,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5313,6 +5427,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5343,6 +5458,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5397,6 +5513,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -5534,6 +5651,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -5847,6 +5965,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -5984,6 +6103,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -6299,6 +6419,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfoCtr(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -6313,6 +6434,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareInfoCtr(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -6364,6 +6486,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -6389,6 +6512,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, i } else { r->server_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -6431,6 +6555,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor)); NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -6473,6 +6598,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, i } else { r->comment = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -6543,6 +6669,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -6605,6 +6732,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int } else { r->userpath = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -6717,6 +6845,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->alerts) { @@ -6797,6 +6926,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int } else { r->srvheuristics = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->alerts) { @@ -6930,6 +7060,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->alerts) { @@ -7026,6 +7157,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int } else { r->autopath = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->alerts) { @@ -7163,6 +7295,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7191,6 +7324,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7268,6 +7402,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain) { @@ -7333,6 +7468,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain) { @@ -7464,6 +7600,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain) { @@ -7542,6 +7679,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->domain) { @@ -7632,6 +7770,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -7656,6 +7795,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, in } else { r->comment = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->comment) { @@ -7692,6 +7832,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7703,6 +7844,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7722,6 +7864,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7733,6 +7876,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7752,6 +7896,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7763,6 +7908,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7782,6 +7928,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7793,6 +7940,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7812,6 +7960,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7823,6 +7972,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7842,6 +7992,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopens)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7853,6 +8004,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopens)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7872,6 +8024,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessvcs)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7883,6 +8036,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessvcs)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7902,6 +8056,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7913,6 +8068,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7932,6 +8088,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7943,6 +8100,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7962,6 +8120,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7973,6 +8132,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -7992,6 +8152,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8003,6 +8164,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8022,6 +8184,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesscons)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8033,6 +8196,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesscons)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8052,6 +8216,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8063,6 +8228,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8082,6 +8248,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8093,6 +8260,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8112,6 +8280,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8123,6 +8292,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8142,6 +8312,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8153,6 +8324,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8172,6 +8344,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8183,6 +8356,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8202,6 +8376,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8213,6 +8388,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8232,6 +8408,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8243,6 +8420,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8262,6 +8440,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8273,6 +8452,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8292,6 +8472,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8303,6 +8484,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8322,6 +8504,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8333,6 +8516,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8352,6 +8536,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8363,6 +8548,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8382,6 +8568,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8393,6 +8580,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8412,6 +8600,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8423,6 +8612,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8442,6 +8632,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8453,6 +8644,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8472,6 +8664,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8483,6 +8676,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8502,6 +8696,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8513,6 +8708,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8532,6 +8728,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8543,6 +8740,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8562,6 +8760,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8573,6 +8772,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8592,6 +8792,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8603,6 +8804,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8622,6 +8824,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8633,6 +8836,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8652,6 +8856,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8663,6 +8868,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8682,6 +8888,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8693,6 +8900,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8712,6 +8920,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8723,6 +8932,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8742,6 +8952,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8753,6 +8964,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8772,6 +8984,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8783,6 +8996,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8802,6 +9016,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8813,6 +9028,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8832,6 +9048,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8843,6 +9060,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8862,6 +9080,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8873,6 +9092,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8892,6 +9112,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8903,6 +9124,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8922,6 +9144,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8933,6 +9156,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8952,6 +9176,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8963,6 +9188,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8982,6 +9208,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -8993,6 +9220,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9012,6 +9240,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9023,6 +9252,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9042,6 +9272,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9053,6 +9284,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9072,6 +9304,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9083,6 +9316,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9102,6 +9336,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9113,6 +9348,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9132,6 +9368,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9143,6 +9380,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9162,6 +9400,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9173,6 +9412,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -9192,6 +9432,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 100: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); @@ -9868,6 +10109,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int nd if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 100: { uint32_t _ptr_info100; @@ -11555,6 +11797,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->disk) + 1)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->disk, strlen(r->disk) + 1, sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11568,6 +11811,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_offset)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_length)); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->disk, r->__disk_length, sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11591,6 +11835,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->disks)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->disks) { @@ -11620,6 +11865,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int n } else { r->disks = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->disks) { @@ -11694,6 +11940,7 @@ static enum ndr_err_code ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->avresponse)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reqbufneed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bigbufneed)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11721,6 +11968,7 @@ static enum ndr_err_code ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->avresponse)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reqbufneed)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bigbufneed)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -11760,6 +12008,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -11812,6 +12061,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, } else { r->net_addr = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -11887,6 +12137,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -11917,6 +12168,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -11976,6 +12228,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -12042,6 +12295,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, } else { r->domain = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -12135,6 +12389,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -12165,6 +12420,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -12225,6 +12481,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -12292,6 +12549,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, r->domain = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -12386,6 +12644,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -12416,6 +12675,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -12478,6 +12738,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -12547,6 +12808,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -12643,6 +12905,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -12673,6 +12936,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -12727,6 +12991,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, i if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -12798,6 +13063,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, i if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -12945,6 +13211,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportInfoCtr(struct ndr_push *nd NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -12959,6 +13226,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfoCtr(struct ndr_pull *nd NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -12992,6 +13260,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->month)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->year)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weekday)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -13014,6 +13283,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->month)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->year)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weekday)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -13044,6 +13314,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0)); @@ -13101,6 +13372,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0)); diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c index 4b190b6c91..4a81cc683c 100644 --- a/librpc/gen_ndr/ndr_svcctl.c +++ b/librpc/gen_ndr/ndr_svcctl.c @@ -12,6 +12,7 @@ static enum ndr_err_code ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_locked)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->lock_owner)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_duration)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->lock_owner) { @@ -38,6 +39,7 @@ static enum ndr_err_code ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, int r->lock_owner = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_duration)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->lock_owner) { @@ -141,6 +143,7 @@ static enum ndr_err_code ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wait_hint)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -158,6 +161,7 @@ static enum ndr_err_code ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wait_hint)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -185,6 +189,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->process_id)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_flags)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -198,6 +203,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->process_id)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_flags)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -231,6 +237,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -288,6 +295,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -366,6 +374,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -423,6 +432,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, i ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -711,6 +721,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->executablepath) { @@ -795,6 +806,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, i } else { r->displayname = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->executablepath) { @@ -912,6 +924,7 @@ static enum ndr_err_code ndr_push_svcctl_ArgumentString(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -936,6 +949,7 @@ static enum ndr_err_code ndr_pull_svcctl_ArgumentString(struct ndr_pull *ndr, in } else { r->string = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { @@ -1002,6 +1016,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, in NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1035,6 +1050,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1107,6 +1123,7 @@ static enum ndr_err_code ndr_push_SC_ACTION(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->delay)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1119,6 +1136,7 @@ static enum ndr_err_code ndr_pull_SC_ACTION(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr, NDR_SCALARS, &r->type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->delay)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1154,6 +1172,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push *ndr } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions)); NDR_CHECK(ndr_push_relative_ptr1(ndr, r->actions)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { @@ -1233,6 +1252,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr } else { r->actions = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { { diff --git a/librpc/gen_ndr/ndr_winreg.c b/librpc/gen_ndr/ndr_winreg.c index e28e9ac7f0..21d97b8756 100644 --- a/librpc/gen_ndr/ndr_winreg.c +++ b/librpc/gen_ndr/ndr_winreg.c @@ -5,6 +5,7 @@ #include "librpc/gen_ndr/ndr_lsa.h" #include "librpc/gen_ndr/ndr_security.h" +#include "librpc/gen_ndr/ndr_misc.h" static enum ndr_err_code ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -34,41 +35,6 @@ _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *nam ndr->depth--; } -_PUBLIC_ enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r) -{ - NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r) -{ - uint32_t v; - NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v)); - *r = v; - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r) -{ - const char *val = NULL; - - switch (r) { - case REG_NONE: val = "REG_NONE"; break; - case REG_SZ: val = "REG_SZ"; break; - case REG_EXPAND_SZ: val = "REG_EXPAND_SZ"; break; - case REG_BINARY: val = "REG_BINARY"; break; - case REG_DWORD: val = "REG_DWORD"; break; - case REG_DWORD_BIG_ENDIAN: val = "REG_DWORD_BIG_ENDIAN"; break; - case REG_LINK: val = "REG_LINK"; break; - case REG_MULTI_SZ: val = "REG_MULTI_SZ"; break; - case REG_RESOURCE_LIST: val = "REG_RESOURCE_LIST"; break; - case REG_FULL_RESOURCE_DESCRIPTOR: val = "REG_FULL_RESOURCE_DESCRIPTOR"; break; - case REG_RESOURCE_REQUIREMENTS_LIST: val = "REG_RESOURCE_REQUIREMENTS_LIST"; break; - case REG_QWORD: val = "REG_QWORD"; break; - } - ndr_print_enum(ndr, name, "ENUM", val, r); -} - _PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r) { if (ndr_flags & NDR_SCALARS) { @@ -76,6 +42,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -102,6 +69,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_ } else { r->name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -142,6 +110,7 @@ static enum ndr_err_code ndr_push_KeySecurityData(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -168,6 +137,7 @@ static enum ndr_err_code ndr_pull_KeySecurityData(struct ndr_pull *ndr, int ndr_ } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->data) { @@ -214,6 +184,7 @@ static enum ndr_err_code ndr_push_winreg_SecBuf(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS, &r->sd)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->inherit)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sd)); @@ -228,6 +199,7 @@ static enum ndr_err_code ndr_pull_winreg_SecBuf(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS, &r->sd)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->inherit)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sd)); @@ -278,6 +250,7 @@ static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -304,6 +277,7 @@ static enum ndr_err_code ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr } else { r->name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -349,6 +323,7 @@ static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -375,6 +350,7 @@ static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int nd } else { r->name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -445,6 +421,7 @@ static enum ndr_err_code ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_size)); NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS, &r->sec_data)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->inherit)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data)); @@ -459,6 +436,7 @@ static enum ndr_err_code ndr_pull_KeySecurityAttribute(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_size)); NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS, &r->sec_data)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->inherit)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data)); @@ -484,6 +462,7 @@ static enum ndr_err_code ndr_push_QueryMultipleValue(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->offset)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -508,6 +487,7 @@ static enum ndr_err_code ndr_pull_QueryMultipleValue(struct ndr_pull *ndr, int n NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->offset)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { diff --git a/librpc/gen_ndr/ndr_winreg.h b/librpc/gen_ndr/ndr_winreg.h index a8766f4cca..a496d4ccc6 100644 --- a/librpc/gen_ndr/ndr_winreg.h +++ b/librpc/gen_ndr/ndr_winreg.h @@ -83,9 +83,6 @@ extern const struct ndr_interface_table ndr_table_winreg; #define NDR_WINREG_CALL_COUNT (35) void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r); -enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r); -enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r); -void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r); enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r); enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r); void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r); diff --git a/librpc/gen_ndr/ndr_wkssvc.c b/librpc/gen_ndr/ndr_wkssvc.c index fab7e5c554..012f296631 100644 --- a/librpc/gen_ndr/ndr_wkssvc.c +++ b/librpc/gen_ndr/ndr_wkssvc.c @@ -14,6 +14,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo100(struct ndr_push *ndr, i NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -55,6 +56,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo100(struct ndr_pull *ndr, i } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -117,6 +119,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo101(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->lan_root)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -172,6 +175,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo101(struct ndr_pull *ndr, i } else { r->lan_root = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -253,6 +257,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo102(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->lan_root)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logged_on_users)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -309,6 +314,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo102(struct ndr_pull *ndr, i r->lan_root = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logged_on_users)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_name) { @@ -419,6 +425,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo502(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_read_only_files)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->force_core_create_mode)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_512_byte_max_transfer)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -464,6 +471,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo502(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_read_only_files)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->force_core_create_mode)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_512_byte_max_transfer)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -517,6 +525,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1010(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->char_wait)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -528,6 +537,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1010(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->char_wait)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -547,6 +557,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1011(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->collection_time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -558,6 +569,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1011(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->collection_time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -577,6 +589,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1012(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_collection_count)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -588,6 +601,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1012(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_collection_count)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -607,6 +621,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1013(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keep_connection)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -618,6 +633,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1013(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keep_connection)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -637,6 +653,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1018(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_timeout)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -648,6 +665,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1018(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_timeout)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -667,6 +685,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1023(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_char_buf)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -678,6 +697,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1023(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_char_buf)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -697,6 +717,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1027(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errorlog_sz)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -708,6 +729,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1027(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errorlog_sz)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -727,6 +749,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1028(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->print_buf_time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -738,6 +761,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1028(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->print_buf_time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -757,6 +781,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1032(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wrk_heuristics)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -768,6 +793,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1032(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wrk_heuristics)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -787,6 +813,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1033(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_threads)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -798,6 +825,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1033(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_threads)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -817,6 +845,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1041(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_quota)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -828,6 +857,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1041(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_quota)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -847,6 +877,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1042(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_increment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -858,6 +889,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1042(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_increment)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -877,6 +909,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1043(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_maximum)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -888,6 +921,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1043(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_maximum)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -907,6 +941,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1044(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pipe_increment)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -918,6 +953,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1044(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pipe_increment)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -937,6 +973,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1045(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pipe_maximum)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -948,6 +985,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1045(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pipe_maximum)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -967,6 +1005,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1046(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dormant_file_limit)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -978,6 +1017,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1046(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dormant_file_limit)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -997,6 +1037,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1047(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cache_file_timeout)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1008,6 +1049,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1047(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cache_file_timeout)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1027,6 +1069,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1048(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_opportunistic_locking)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1038,6 +1081,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1048(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_opportunistic_locking)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1057,6 +1101,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1049(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_unlock_behind)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1068,6 +1113,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1049(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_unlock_behind)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1087,6 +1133,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1050(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_close_behind)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1098,6 +1145,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1050(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_close_behind)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1117,6 +1165,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1051(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_named_pipes)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1128,6 +1177,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1051(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_named_pipes)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1147,6 +1197,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1052(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_lock_read_unlock)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1158,6 +1209,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1052(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_lock_read_unlock)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1177,6 +1229,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1053(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->utilize_nt_caching)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1188,6 +1241,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1053(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->utilize_nt_caching)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1207,6 +1261,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1054(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_raw_read)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1218,6 +1273,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1054(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_raw_read)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1237,6 +1293,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1055(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_raw_write)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1248,6 +1305,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1055(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_raw_write)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1267,6 +1325,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1056(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_write_raw_data)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1278,6 +1337,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1056(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_write_raw_data)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1297,6 +1357,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1057(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_encryption)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1308,6 +1369,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1057(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_encryption)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1327,6 +1389,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1058(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_files_deny_write)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1338,6 +1401,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1058(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_files_deny_write)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1357,6 +1421,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1059(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_read_only_files)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1368,6 +1433,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1059(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_read_only_files)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1387,6 +1453,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1060(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->force_core_create_mode)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1398,6 +1465,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1060(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->force_core_create_mode)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1417,6 +1485,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1061(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_512_byte_max_transfer)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1428,6 +1497,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1061(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_512_byte_max_transfer)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1447,6 +1517,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo1062(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->read_ahead_throughput)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1458,6 +1529,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo1062(struct ndr_pull *ndr, if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->read_ahead_throughput)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1477,6 +1549,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 100: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); @@ -1900,6 +1973,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaInfo(struct ndr_pull *ndr, int if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 100: { uint32_t _ptr_info100; @@ -2941,6 +3015,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo0(struct ndr_push *ndr if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user_name) { @@ -2965,6 +3040,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo0(struct ndr_pull *ndr } else { r->user_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user_name) { @@ -3003,6 +3079,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_push * NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries_read)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->user0)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user0) { @@ -3033,6 +3110,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_pull * } else { r->user0 = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user0) { @@ -3090,6 +3168,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo1(struct ndr_push *ndr NDR_CHECK(ndr_push_unique_ptr(ndr, r->logon_domain)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->other_domains)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->logon_server)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user_name) { @@ -3156,6 +3235,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo1(struct ndr_pull *ndr } else { r->logon_server = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user_name) { @@ -3248,6 +3328,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_push * NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries_read)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->user1)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user1) { @@ -3278,6 +3359,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_pull * } else { r->user1 = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->user1) { @@ -3332,6 +3414,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersCtr(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->user0)); @@ -3379,6 +3462,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersCtr(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_user0; @@ -3467,6 +3551,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersInfo(struct ndr_push * NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -3481,6 +3566,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaEnumUsersInfo(struct ndr_pull * NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_wkssvc_NetWkstaEnumUsersCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -3503,6 +3589,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo1101(struct ndr_push * if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->other_domains)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->other_domains) { @@ -3527,6 +3614,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo1101(struct ndr_pull * } else { r->other_domains = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->other_domains) { @@ -3563,6 +3651,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -3621,6 +3710,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrWkstaUserInfo(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -3739,6 +3829,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportInfo0(struct ndr_push NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->address)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wan_link)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -3780,6 +3871,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportInfo0(struct ndr_pull r->address = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wan_link)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->name) { @@ -3839,6 +3931,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportCtr0(struct ndr_push * NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3869,6 +3962,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportCtr0(struct ndr_pull * } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -3923,6 +4017,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push *n if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -3959,6 +4054,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportCtr(struct ndr_pull *n if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -4019,6 +4115,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportInfo(struct ndr_push * NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -4033,6 +4130,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetWkstaTransportInfo(struct ndr_pull * NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -4056,6 +4154,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo3(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown1)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->unknown1) { @@ -4094,6 +4193,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo3(struct ndr_pull *ndr, int } else { r->unknown2 = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->unknown1) { @@ -4156,6 +4256,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->local) { @@ -4240,6 +4341,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo2(struct ndr_pull *ndr, int } else { r->domain_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->local) { @@ -4358,6 +4460,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo1(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->asg_type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->use_count)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->local) { @@ -4414,6 +4517,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo1(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->asg_type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_count)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->use_count)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->local) { @@ -4491,6 +4595,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseInfo0(struct ndr_push *ndr, int NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->local)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->local) { @@ -4529,6 +4634,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseInfo0(struct ndr_pull *ndr, int } else { r->remote = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->local) { @@ -4583,6 +4689,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseGetInfoCtr(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); @@ -4652,6 +4759,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseGetInfoCtr(struct ndr_pull *ndr, if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_info0; @@ -4796,6 +4904,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr2(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4826,6 +4935,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr2(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4882,6 +4992,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr1(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4912,6 +5023,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr1(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4968,6 +5080,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr0(struct ndr_push *ndr, i NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -4998,6 +5111,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr0(struct ndr_pull *ndr, i } else { r->array = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->array) { @@ -5052,6 +5166,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); @@ -5110,6 +5225,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumCtr(struct ndr_pull *ndr, in if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 0: { uint32_t _ptr_ctr0; @@ -5226,6 +5342,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumInfo(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_wkssvc_NetrUseEnumCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -5240,6 +5357,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrUseEnumInfo(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_wkssvc_NetrUseEnumCtr(ndr, NDR_BUFFERS, &r->ctr)); @@ -5301,6 +5419,7 @@ static enum ndr_err_code ndr_push_wkssvc_NetrWorkstationStatistics(struct ndr_pu NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown38)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown39)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown40)); + NDR_CHECK(ndr_push_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5351,6 +5470,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrWorkstationStatistics(struct ndr_pu NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown38)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown39)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown40)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5428,14 +5548,14 @@ _PUBLIC_ void ndr_print_wkssvc_renameflags(struct ndr_print *ndr, const char *na static enum ndr_err_code ndr_push_wkssvc_NetValidateNameType(struct ndr_push *ndr, int ndr_flags, enum wkssvc_NetValidateNameType r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_wkssvc_NetValidateNameType(struct ndr_pull *ndr, int ndr_flags, enum wkssvc_NetValidateNameType *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -5457,14 +5577,14 @@ _PUBLIC_ void ndr_print_wkssvc_NetValidateNameType(struct ndr_print *ndr, const static enum ndr_err_code ndr_push_wkssvc_NetJoinStatus(struct ndr_push *ndr, int ndr_flags, enum wkssvc_NetJoinStatus r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_wkssvc_NetJoinStatus(struct ndr_pull *ndr, int ndr_flags, enum wkssvc_NetJoinStatus *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -5490,6 +5610,7 @@ static enum ndr_err_code ndr_push_wkssvc_PasswordBuffer(struct ndr_push *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 524)); + NDR_CHECK(ndr_push_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5506,6 +5627,7 @@ static enum ndr_err_code ndr_pull_wkssvc_PasswordBuffer(struct ndr_pull *ndr, in if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 524)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5561,14 +5683,14 @@ _PUBLIC_ void ndr_print_wkssvc_joinflags(struct ndr_print *ndr, const char *name static enum ndr_err_code ndr_push_wkssvc_ComputerNameType(struct ndr_push *ndr, int ndr_flags, enum wkssvc_ComputerNameType r) { - NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r)); + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_wkssvc_ComputerNameType(struct ndr_pull *ndr, int ndr_flags, enum wkssvc_ComputerNameType *r) { uint16_t v; - NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v)); + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); *r = v; return NDR_ERR_SUCCESS; } @@ -5593,6 +5715,7 @@ static enum ndr_err_code ndr_push_wkssvc_ComputerNamesCtr(struct ndr_push *ndr, NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_name)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->computer_name) { @@ -5623,6 +5746,7 @@ static enum ndr_err_code ndr_pull_wkssvc_ComputerNamesCtr(struct ndr_pull *ndr, } else { r->computer_name = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->computer_name) { diff --git a/librpc/gen_ndr/ndr_xattr.c b/librpc/gen_ndr/ndr_xattr.c index 33886499bd..6bcc831ded 100644 --- a/librpc/gen_ndr/ndr_xattr.c +++ b/librpc/gen_ndr/ndr_xattr.c @@ -14,6 +14,7 @@ static enum ndr_err_code ndr_push_xattr_DosInfo1(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->alloc_size)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->create_time)); NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->change_time)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -30,6 +31,7 @@ static enum ndr_err_code ndr_pull_xattr_DosInfo1(struct ndr_pull *ndr, int ndr_f NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->alloc_size)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->create_time)); NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->change_time)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -67,6 +69,7 @@ static enum ndr_err_code ndr_push_xattr_DosInfo2Old(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -91,6 +94,7 @@ static enum ndr_err_code ndr_pull_xattr_DosInfo2Old(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -118,6 +122,7 @@ static enum ndr_err_code ndr_push_xattr_DosInfo(struct ndr_push *ndr, int ndr_fl if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_push_xattr_DosInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -157,6 +162,7 @@ static enum ndr_err_code ndr_pull_xattr_DosInfo(struct ndr_pull *ndr, int ndr_fl if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 4)); switch (level) { case 1: { NDR_CHECK(ndr_pull_xattr_DosInfo1(ndr, NDR_SCALARS, &r->info1)); @@ -211,6 +217,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_xattr_DosAttrib(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version)); NDR_CHECK(ndr_push_xattr_DosInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -224,6 +231,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosAttrib(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version)); NDR_CHECK(ndr_pull_xattr_DosInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -251,6 +259,7 @@ static enum ndr_err_code ndr_push_xattr_EA(struct ndr_push *ndr, int ndr_flags, ndr->flags = _flags_save_string; } NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value)); + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -268,6 +277,7 @@ static enum ndr_err_code ndr_pull_xattr_EA(struct ndr_pull *ndr, int ndr_flags, ndr->flags = _flags_save_string; } NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -290,6 +300,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_xattr_DosEAs(struct ndr_push *ndr, int ndr_f NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_eas)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->eas)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->eas) { @@ -317,6 +328,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosEAs(struct ndr_pull *ndr, int ndr_f } else { r->eas = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->eas) { @@ -372,6 +384,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_fla for (cntr_eas_0 = 0; cntr_eas_0 < r->num_eas; cntr_eas_0++) { NDR_CHECK(ndr_push_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_0])); } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -392,6 +405,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_fla NDR_CHECK(ndr_pull_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eas_0, 0); + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -430,6 +444,7 @@ static enum ndr_err_code ndr_push_xattr_DosStream(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -449,6 +464,7 @@ static enum ndr_err_code ndr_pull_xattr_DosStream(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name)); ndr->flags = _flags_save_string; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -473,6 +489,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_xattr_DosStreams(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_streams)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->streams)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->streams) { @@ -500,6 +517,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosStreams(struct ndr_pull *ndr, int n } else { r->streams = NULL; } + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->streams) { @@ -552,6 +570,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_hash_v2(struct ndr_push NDR_CHECK(ndr_push_align(ndr, 5)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sd) { @@ -574,6 +593,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_hash_v2(struct ndr_pull r->sd = NULL; } NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sd) { @@ -607,6 +627,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_hash_v3(struct ndr_push NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hash_type)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 64)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sd) { @@ -630,6 +651,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_hash_v3(struct ndr_pull } NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hash_type)); NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 64)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { if (r->sd) { @@ -662,6 +684,7 @@ static enum ndr_err_code ndr_push_xattr_NTACL_Info(struct ndr_push *ndr, int ndr if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_union_align(ndr, 5)); switch (level) { case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd)); @@ -720,6 +743,7 @@ static enum ndr_err_code ndr_pull_xattr_NTACL_Info(struct ndr_pull *ndr, int ndr if (_level != level) { return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); } + NDR_CHECK(ndr_pull_union_align(ndr, 5)); switch (level) { case 1: { uint32_t _ptr_sd; @@ -836,6 +860,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_xattr_NTACL(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version)); NDR_CHECK(ndr_push_xattr_NTACL_Info(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_xattr_NTACL_Info(ndr, NDR_BUFFERS, &r->info)); @@ -850,6 +875,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_xattr_NTACL(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version)); NDR_CHECK(ndr_pull_xattr_NTACL_Info(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_xattr_NTACL_Info(ndr, NDR_BUFFERS, &r->info)); diff --git a/librpc/gen_ndr/netlogon.h b/librpc/gen_ndr/netlogon.h index 890fba1779..402e4a0d29 100644 --- a/librpc/gen_ndr/netlogon.h +++ b/librpc/gen_ndr/netlogon.h @@ -17,6 +17,7 @@ #define NETLOGON_NEG_128BIT ( NETLOGON_NEG_STRONG_KEYS ) #define NETLOGON_NEG_SCHANNEL ( NETLOGON_NEG_AUTHENTICATED_RPC ) #define DSGETDC_VALID_FLAGS ( (DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME) ) +#define NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT ( 0x02231968 ) #define DS_GFTI_UPDATE_TDO ( 0x1 ) struct netr_UasInfo { const char *account_name;/* [unique,charset(UTF16)] */ @@ -865,9 +866,9 @@ enum netr_DsRGetDCNameInfo_AddressType #define DS_SERVER_NDNC ( NBT_SERVER_NDNC ) #define DS_SERVER_SELECT_SECRET_DOMAIN_6 ( NBT_SERVER_SELECT_SECRET_DOMAIN_6 ) #define DS_SERVER_FULL_SECRET_DOMAIN_6 ( NBT_SERVER_FULL_SECRET_DOMAIN_6 ) -#define DS_DNS_CONTROLLER ( 0x20000000 ) -#define DS_DNS_DOMAIN ( 0x40000000 ) -#define DS_DNS_FOREST ( 0x80000000 ) +#define DS_DNS_CONTROLLER ( NBT_SERVER_HAS_DNS_NAME ) +#define DS_DNS_DOMAIN ( NBT_SERVER_IS_DEFAULT_NC ) +#define DS_DNS_FOREST_ROOT ( NBT_SERVER_FOREST_ROOT ) struct netr_DsRGetDCNameInfo { const char *dc_unc;/* [unique,charset(UTF16)] */ @@ -1033,6 +1034,12 @@ union netr_DomainInfo { struct netr_LsaPolicyInformation *lsa_policy_info;/* [unique,case(2)] */ }; +struct NL_PASSWORD_VERSION { + uint32_t ReservedField; + uint32_t PasswordVersionNumber; + uint32_t PasswordVersionPresent; +}; + struct netr_CryptPassword { uint8_t data[512]; uint32_t length; diff --git a/librpc/gen_ndr/ntsvcs.h b/librpc/gen_ndr/ntsvcs.h index f59fcae2e7..76b2628a66 100644 --- a/librpc/gen_ndr/ntsvcs.h +++ b/librpc/gen_ndr/ntsvcs.h @@ -4,7 +4,7 @@ #include "libcli/util/ntstatus.h" -#include "librpc/gen_ndr/winreg.h" +#include "librpc/gen_ndr/misc.h" #ifndef _HEADER_ntsvcs #define _HEADER_ntsvcs diff --git a/librpc/gen_ndr/samr.h b/librpc/gen_ndr/samr.h index 33b21d2d05..75462dec73 100644 --- a/librpc/gen_ndr/samr.h +++ b/librpc/gen_ndr/samr.h @@ -53,23 +53,6 @@ enum netr_SamDatabaseID #endif ; -enum samr_RejectReason -#ifndef USE_UINT_ENUMS - { - SAMR_REJECT_OTHER=(int)(0), - SAMR_REJECT_TOO_SHORT=(int)(1), - SAMR_REJECT_IN_HISTORY=(int)(2), - SAMR_REJECT_COMPLEXITY=(int)(5) -} -#else - { __donnot_use_enum_samr_RejectReason=0x7FFFFFFF} -#define SAMR_REJECT_OTHER ( 0 ) -#define SAMR_REJECT_TOO_SHORT ( 1 ) -#define SAMR_REJECT_IN_HISTORY ( 2 ) -#define SAMR_REJECT_COMPLEXITY ( 5 ) -#endif -; - /* bitmap samr_AcctFlags */ #define ACB_DISABLED ( 0x00000001 ) #define ACB_HOMDIRREQ ( 0x00000002 ) @@ -790,10 +773,36 @@ enum samr_ConnectVersion #endif ; -struct samr_ChangeReject { - enum samr_RejectReason reason; - uint32_t unknown1; - uint32_t unknown2; +enum samPwdChangeReason +#ifndef USE_UINT_ENUMS + { + SAM_PWD_CHANGE_NO_ERROR=(int)(0), + SAM_PWD_CHANGE_PASSWORD_TOO_SHORT=(int)(1), + SAM_PWD_CHANGE_PWD_IN_HISTORY=(int)(2), + SAM_PWD_CHANGE_USERNAME_IN_PASSWORD=(int)(3), + SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD=(int)(4), + SAM_PWD_CHANGE_NOT_COMPLEX=(int)(5), + SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT=(int)(6), + SAM_PWD_CHANGE_FAILED_BY_FILTER=(int)(7), + SAM_PWD_CHANGE_PASSWORD_TOO_LONG=(int)(8) +} +#else + { __donnot_use_enum_samPwdChangeReason=0x7FFFFFFF} +#define SAM_PWD_CHANGE_NO_ERROR ( 0 ) +#define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT ( 1 ) +#define SAM_PWD_CHANGE_PWD_IN_HISTORY ( 2 ) +#define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD ( 3 ) +#define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD ( 4 ) +#define SAM_PWD_CHANGE_NOT_COMPLEX ( 5 ) +#define SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT ( 6 ) +#define SAM_PWD_CHANGE_FAILED_BY_FILTER ( 7 ) +#define SAM_PWD_CHANGE_PASSWORD_TOO_LONG ( 8 ) +#endif +; + +struct userPwdChangeFailureInformation { + enum samPwdChangeReason extendedFailureReason; + const char *filterModuleName;/* [unique,charset(UTF16)] */ }; struct samr_ConnectInfo1 { @@ -1852,7 +1861,7 @@ struct samr_ChangePasswordUser3 { struct { struct samr_DomInfo1 **dominfo;/* [ref] */ - struct samr_ChangeReject **reject;/* [ref] */ + struct userPwdChangeFailureInformation **reject;/* [ref] */ NTSTATUS result; } out; diff --git a/librpc/gen_ndr/security.h b/librpc/gen_ndr/security.h index 05df02ae8f..297ba18d7f 100644 --- a/librpc/gen_ndr/security.h +++ b/librpc/gen_ndr/security.h @@ -70,6 +70,10 @@ #define SEC_RIGHTS_DIR_WRITE ( SEC_RIGHTS_FILE_WRITE ) #define SEC_RIGHTS_DIR_EXECUTE ( SEC_RIGHTS_FILE_EXECUTE ) #define SEC_RIGHTS_DIR_ALL ( SEC_RIGHTS_FILE_ALL ) +#define SEC_RIGHTS_PRIV_BACKUP ( SEC_STD_READ_CONTROL|SEC_FLAG_SYSTEM_SECURITY|SEC_GENERIC_READ ) +#define SEC_RIGHTS_DIR_PRIV_BACKUP ( SEC_RIGHTS_PRIV_BACKUP|SEC_DIR_TRAVERSE ) +#define SEC_RIGHTS_PRIV_RESTORE ( SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|SEC_FLAG_SYSTEM_SECURITY|SEC_STD_DELETE ) +#define SEC_RIGHTS_DIR_PRIV_RESTORE ( SEC_RIGHTS_PRIV_RESTORE|SEC_DIR_ADD_FILE|SEC_DIR_ADD_SUBDIR ) #define STANDARD_RIGHTS_ALL_ACCESS ( SEC_STD_ALL ) #define STANDARD_RIGHTS_MODIFY_ACCESS ( SEC_STD_READ_CONTROL ) #define STANDARD_RIGHTS_EXECUTE_ACCESS ( SEC_STD_READ_CONTROL ) diff --git a/librpc/gen_ndr/srv_samr.c b/librpc/gen_ndr/srv_samr.c index e1b6951b3c..eba50b3e11 100644 --- a/librpc/gen_ndr/srv_samr.c +++ b/librpc/gen_ndr/srv_samr.c @@ -5030,7 +5030,7 @@ static bool api_samr_ChangePasswordUser3(pipes_struct *p) return false; } - r->out.reject = talloc_zero(r, struct samr_ChangeReject *); + r->out.reject = talloc_zero(r, struct userPwdChangeFailureInformation *); if (r->out.reject == NULL) { talloc_free(r); return false; @@ -6195,7 +6195,7 @@ NTSTATUS rpc_samr_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con return NT_STATUS_NO_MEMORY; } - r->out.reject = talloc_zero(mem_ctx, struct samr_ChangeReject *); + r->out.reject = talloc_zero(mem_ctx, struct userPwdChangeFailureInformation *); if (r->out.reject == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/librpc/gen_ndr/winreg.h b/librpc/gen_ndr/winreg.h index 9962927008..7116810708 100644 --- a/librpc/gen_ndr/winreg.h +++ b/librpc/gen_ndr/winreg.h @@ -6,6 +6,7 @@ #include "librpc/gen_ndr/lsa.h" #include "librpc/gen_ndr/security.h" +#include "librpc/gen_ndr/misc.h" #ifndef _HEADER_winreg #define _HEADER_winreg @@ -23,39 +24,6 @@ #define KEY_WOW64_64KEY ( 0x00100 ) #define KEY_WOW64_32KEY ( 0x00200 ) -enum winreg_Type -#ifndef USE_UINT_ENUMS - { - REG_NONE=(int)(0), - REG_SZ=(int)(1), - REG_EXPAND_SZ=(int)(2), - REG_BINARY=(int)(3), - REG_DWORD=(int)(4), - REG_DWORD_BIG_ENDIAN=(int)(5), - REG_LINK=(int)(6), - REG_MULTI_SZ=(int)(7), - REG_RESOURCE_LIST=(int)(8), - REG_FULL_RESOURCE_DESCRIPTOR=(int)(9), - REG_RESOURCE_REQUIREMENTS_LIST=(int)(10), - REG_QWORD=(int)(11) -} -#else - { __donnot_use_enum_winreg_Type=0x7FFFFFFF} -#define REG_NONE ( 0 ) -#define REG_SZ ( 1 ) -#define REG_EXPAND_SZ ( 2 ) -#define REG_BINARY ( 3 ) -#define REG_DWORD ( 4 ) -#define REG_DWORD_BIG_ENDIAN ( 5 ) -#define REG_LINK ( 6 ) -#define REG_MULTI_SZ ( 7 ) -#define REG_RESOURCE_LIST ( 8 ) -#define REG_FULL_RESOURCE_DESCRIPTOR ( 9 ) -#define REG_RESOURCE_REQUIREMENTS_LIST ( 10 ) -#define REG_QWORD ( 11 ) -#endif -; - struct winreg_String { uint16_t name_len;/* [value(strlen_m_term(name)*2)] */ uint16_t name_size;/* [value(strlen_m_term(name)*2)] */ diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl index 9d2d153418..f53db00f5b 100644 --- a/librpc/idl/drsuapi.idl +++ b/librpc/idl/drsuapi.idl @@ -15,6 +15,40 @@ interface drsuapi { typedef bitmap samr_GroupAttrs samr_GroupAttrs; + /* see MS-DRSR section 5.37 */ + typedef [public,bitmap32bit] bitmap { + DRSUAPI_DRS_ASYNC_OP = 0x00000001, + DRSUAPI_DRS_GETCHG_CHECK = 0x00000002, + DRSUAPI_DRS_ADD_REF = 0x00000004, + DRSUAPI_DRS_SYNC_ALL = 0x00000008, + DRSUAPI_DRS_DEL_REF = 0x00000008, + DRSUAPI_DRS_WRIT_REP = 0x00000010, + DRSUAPI_DRS_INIT_SYNC = 0x00000020, + DRSUAPI_DRS_PER_SYNC = 0x00000040, + DRSUAPI_DRS_MAIL_REP = 0x00000080, + DRSUAPI_DRS_ASYNC_REP = 0x00000100, + DRSUAPI_DRS_IGNORE_ERROR = 0x00000100, + DRSUAPI_DRS_TWOWAY_SYNC = 0x00000200, + DRSUAPI_DRS_CRITICAL_ONLY = 0x00000400, + DRSUAPI_DRS_GET_ANC = 0x00000800, + DRSUAPI_DRS_GET_NC_SIZE = 0x00001000, + DRSUAPI_DRS_LOCAL_ONLY = 0x00001000, + DRSUAPI_DRS_SYNC_BYNAME = 0x00004000, + DRSUAPI_DRS_REF_OK = 0x00004000, + DRSUAPI_DRS_FULL_SYNC_NOW = 0x00008000, + DRSUAPI_DRS_NO_SOURCE = 0x00008000, + DRSUAPI_DRS_FULL_SYNC_PACKET = 0x00020000, + DRSUAPI_DRS_REF_GCSPN = 0x00100000, + DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING = 0x00800000, + DRSUAPI_DRS_SYNC_FORCED = 0x02000000, + DRSUAPI_DRS_DISABLE_AUTO_SYNC = 0x04000000, + DRSUAPI_DRS_DISABLE_PERIODIC_SYNC = 0x08000000, + DRSUAPI_DRS_USE_COMPRESSION = 0x10000000, + DRSUAPI_DRS_NEVER_NOTIFY = 0x20000000, + DRSUAPI_DRS_SYNC_PAS = 0x40000000, + DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP = 0x80000000 + } drsuapi_DrsOptions; + /*****************/ /* Function 0x00 */ typedef [bitmap32bit] bitmap { @@ -219,6 +253,8 @@ interface drsuapi /* the _WRITEABLE flag indicates a replication with all attributes * * --metze + * + * See drsuapi_DrsOptions for the WSPP bit names */ DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE = 0x00000010, DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP = 0x00000020, @@ -378,9 +414,9 @@ interface drsuapi * * 2.5.5.17 => dom_sid */ - typedef [nopush,nopull] struct { - [range(0,10000),value(ndr_size_drsuapi_DsReplicaOID_oid(oid, 0))] uint32 __ndr_size; - [size_is(__ndr_size),charset(DOS)] uint8 *oid; /* it's encoded with asn1_write_OID_String() */ + typedef [noprint] struct { + [range(0,10000)] uint32 length; + [size_is(length)] uint8 *binary_oid; /* partial-binary-OID encoded with asn1_write_partial_OID_String() */ } drsuapi_DsReplicaOID; typedef struct { diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl index 253b6d780c..58e0ea9e26 100644 --- a/librpc/idl/lsa.idl +++ b/librpc/idl/lsa.idl @@ -113,14 +113,14 @@ import "misc.idl", "security.idl"; /******************/ /* Function: 0x06 */ typedef struct { - uint32 len; /* ignored */ + uint3264 len; /* ignored */ uint16 impersonation_level; uint8 context_mode; uint8 effective_only; } lsa_QosInfo; typedef struct { - uint32 len; /* ignored */ + uint3264 len; /* ignored */ uint8 *root_dir; [string,charset(UTF16)] uint16 *object_name; uint32 attributes; @@ -628,8 +628,8 @@ import "misc.idl", "security.idl"; ); typedef [flag(NDR_PAHEX)] struct { - uint32 length; - uint32 size; + uint3264 length; + uint3264 size; [size_is(size),length_is(length)] uint8 *data; } lsa_DATA_BUF; @@ -1220,7 +1220,7 @@ import "misc.idl", "security.idl"; /* Function 0x49 */ typedef struct { - [range(0,131072)] uint32 length; + [range(0,131072)] uint3264 length; [size_is(length)] uint8 *data; } lsa_ForestTrustBinaryData; diff --git a/librpc/idl/misc.idl b/librpc/idl/misc.idl index 5bc3c9f976..5a2bf75a74 100644 --- a/librpc/idl/misc.idl +++ b/librpc/idl/misc.idl @@ -1,3 +1,5 @@ +#include "idl_types.h" + /* miscellaneous IDL structures */ @@ -43,4 +45,28 @@ interface misc uint32 unknown1; uint32 unknown2; /* 0x00000001 */ } KRB5_EDATA_NTSTATUS; + + typedef [public,v1_enum] enum { + REG_NONE = 0, + REG_SZ = 1, + REG_EXPAND_SZ = 2, + REG_BINARY = 3, + REG_DWORD = 4, + REG_DWORD_BIG_ENDIAN = 5, + REG_LINK = 6, + REG_MULTI_SZ = 7, + REG_RESOURCE_LIST = 8, + REG_FULL_RESOURCE_DESCRIPTOR = 9, + REG_RESOURCE_REQUIREMENTS_LIST = 10, + REG_QWORD = 11 + } winreg_Type; + + typedef [nodiscriminant,public] union { + [case(REG_NONE)]; + [case(REG_SZ)] nstring string; + [case(REG_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary; + [case(REG_DWORD)] uint32 value; + [case(REG_MULTI_SZ)] nstring_array string_array; + [default,flag(NDR_REMAINING)] DATA_BLOB data; + } winreg_Data; } diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl index fc82b1c897..a51132c4d4 100644 --- a/librpc/idl/nbt.idl +++ b/librpc/idl/nbt.idl @@ -357,7 +357,10 @@ interface nbt NBT_SERVER_NDNC = 0x00000400, NBT_SERVER_SELECT_SECRET_DOMAIN_6 = 0x00000800, NBT_SERVER_FULL_SECRET_DOMAIN_6 = 0x00001000, - NBT_SERVER_DNS_FOREST = 0x01000000 + NBT_SERVER_ADS_WEB_SERVICE = 0x00002000, + NBT_SERVER_HAS_DNS_NAME = 0x20000000, + NBT_SERVER_IS_DEFAULT_NC = 0x40000000, + NBT_SERVER_FOREST_ROOT = 0x80000000 } nbt_server_type; typedef [bitmap32bit,public] bitmap { diff --git a/librpc/idl/netlogon.idl b/librpc/idl/netlogon.idl index ef2c8a4721..82a60c7c3e 100644 --- a/librpc/idl/netlogon.idl +++ b/librpc/idl/netlogon.idl @@ -1142,9 +1142,9 @@ interface netlogon DS_SERVER_NDNC = NBT_SERVER_NDNC, DS_SERVER_SELECT_SECRET_DOMAIN_6 = NBT_SERVER_SELECT_SECRET_DOMAIN_6, DS_SERVER_FULL_SECRET_DOMAIN_6 = NBT_SERVER_FULL_SECRET_DOMAIN_6, - DS_DNS_CONTROLLER = 0x20000000, - DS_DNS_DOMAIN = 0x40000000, - DS_DNS_FOREST = 0x80000000 + DS_DNS_CONTROLLER = NBT_SERVER_HAS_DNS_NAME, + DS_DNS_DOMAIN = NBT_SERVER_IS_DEFAULT_NC, + DS_DNS_FOREST_ROOT = NBT_SERVER_FOREST_ROOT } netr_DsR_DcFlags; typedef [public] struct { @@ -1412,6 +1412,18 @@ interface netlogon /*****************/ /* Function 0x1e */ + + /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */ + + /* someone's birthday ? */ + const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT = 0x02231968; + + typedef struct { + uint32 ReservedField; + uint32 PasswordVersionNumber; + uint32 PasswordVersionPresent; + } NL_PASSWORD_VERSION; + typedef [flag(NDR_PAHEX)] struct { uint8 data[512]; uint32 length; diff --git a/librpc/idl/ntsvcs.idl b/librpc/idl/ntsvcs.idl index b1a3b78c34..91a85b96b9 100644 --- a/librpc/idl/ntsvcs.idl +++ b/librpc/idl/ntsvcs.idl @@ -2,7 +2,7 @@ plug and play services */ -import "winreg.idl"; +import "misc.idl"; [ uuid("8d9f4e40-a03d-11ce-8f69-08003e30051b"), diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl index 8a5692fe17..da7b1aa82e 100644 --- a/librpc/idl/samr.idl +++ b/librpc/idl/samr.idl @@ -24,15 +24,6 @@ import "misc.idl", "lsa.idl", "security.idl"; SAM_DATABASE_PRIVS = 2 /* Privileges */ } netr_SamDatabaseID; - typedef [public,v1_enum] enum { - SAMR_REJECT_OTHER = 0, - SAMR_REJECT_TOO_SHORT = 1, - SAMR_REJECT_IN_HISTORY = 2, - SAMR_REJECT_COMPLEXITY = 5 - } samr_RejectReason; - - - /* account control (acct_flags) bits */ typedef [public,bitmap32bit] bitmap { ACB_DISABLED = 0x00000001, /* 1 = User account disabled */ @@ -1447,13 +1438,22 @@ import "misc.idl", "lsa.idl", "security.idl"; /************************/ /* Function 0x3f */ - typedef enum samr_RejectReason samr_RejectReason; + typedef [public,v1_enum] enum { + SAM_PWD_CHANGE_NO_ERROR = 0, + SAM_PWD_CHANGE_PASSWORD_TOO_SHORT = 1, + SAM_PWD_CHANGE_PWD_IN_HISTORY = 2, + SAM_PWD_CHANGE_USERNAME_IN_PASSWORD = 3, + SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD = 4, + SAM_PWD_CHANGE_NOT_COMPLEX = 5, + SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT = 6, + SAM_PWD_CHANGE_FAILED_BY_FILTER = 7, + SAM_PWD_CHANGE_PASSWORD_TOO_LONG = 8 + } samPwdChangeReason; typedef struct { - samr_RejectReason reason; - uint32 unknown1; - uint32 unknown2; - } samr_ChangeReject; + samPwdChangeReason extendedFailureReason; + [string,charset(UTF16)] uint16 *filterModuleName; + } userPwdChangeFailureInformation; NTSTATUS samr_ChangePasswordUser3( [in,unique] lsa_String *server, @@ -1465,7 +1465,7 @@ import "misc.idl", "lsa.idl", "security.idl"; [in,unique] samr_Password *lm_verifier, [in,unique] samr_CryptPassword *password3, [out,ref] samr_DomInfo1 **dominfo, - [out,ref] samr_ChangeReject **reject + [out,ref] userPwdChangeFailureInformation **reject ); /************************/ diff --git a/librpc/idl/security.idl b/librpc/idl/security.idl index 96d24b6685..c24dc64bd7 100644 --- a/librpc/idl/security.idl +++ b/librpc/idl/security.idl @@ -144,6 +144,21 @@ interface security const int SEC_RIGHTS_DIR_EXECUTE = SEC_RIGHTS_FILE_EXECUTE; const int SEC_RIGHTS_DIR_ALL = SEC_RIGHTS_FILE_ALL; + /* rights granted by some specific privileges */ + const int SEC_RIGHTS_PRIV_BACKUP = SEC_STD_READ_CONTROL | + SEC_FLAG_SYSTEM_SECURITY | + SEC_GENERIC_READ; + const int SEC_RIGHTS_DIR_PRIV_BACKUP = SEC_RIGHTS_PRIV_BACKUP + | SEC_DIR_TRAVERSE; + + const int SEC_RIGHTS_PRIV_RESTORE = SEC_STD_WRITE_DAC | + SEC_STD_WRITE_OWNER | + SEC_FLAG_SYSTEM_SECURITY | + SEC_STD_DELETE; + const int SEC_RIGHTS_DIR_PRIV_RESTORE = SEC_RIGHTS_PRIV_RESTORE | + SEC_DIR_ADD_FILE | + SEC_DIR_ADD_SUBDIR; + /* combinations of standard masks. */ const int STANDARD_RIGHTS_ALL_ACCESS = SEC_STD_ALL; /* 0x001f0000 */ const int STANDARD_RIGHTS_MODIFY_ACCESS = SEC_STD_READ_CONTROL; /* 0x00020000 */ diff --git a/librpc/idl/winreg.idl b/librpc/idl/winreg.idl index 18b5edcb5d..f1f4dfb719 100644 --- a/librpc/idl/winreg.idl +++ b/librpc/idl/winreg.idl @@ -2,7 +2,7 @@ winreg interface definition */ -import "lsa.idl", "security.idl"; +import "lsa.idl", "security.idl", "misc.idl"; [ uuid("338cd001-2244-31f1-aaaa-900038001003"), @@ -45,21 +45,6 @@ import "lsa.idl", "security.idl"; REG_KEY_WRITE | KEY_CREATE_LINK); - typedef [public,v1_enum] enum { - REG_NONE = 0, - REG_SZ = 1, - REG_EXPAND_SZ = 2, - REG_BINARY = 3, - REG_DWORD = 4, - REG_DWORD_BIG_ENDIAN = 5, - REG_LINK = 6, - REG_MULTI_SZ = 7, - REG_RESOURCE_LIST = 8, - REG_FULL_RESOURCE_DESCRIPTOR = 9, - REG_RESOURCE_REQUIREMENTS_LIST = 10, - REG_QWORD = 11 - } winreg_Type; - typedef [public] struct { [value(strlen_m_term(name)*2)] uint16 name_len; [value(strlen_m_term(name)*2)] uint16 name_size; diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 03b4362b37..45cb24405f 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -467,9 +467,11 @@ NDR_SCALAR_PROTO(uint8, uint8_t) NDR_SCALAR_PROTO(int8, int8_t) NDR_SCALAR_PROTO(uint16, uint16_t) NDR_SCALAR_PROTO(int16, int16_t) +NDR_SCALAR_PROTO(uint1632, uint16_t) NDR_SCALAR_PROTO(uint32, uint32_t) NDR_SCALAR_PROTO(uint3264, uint32_t) NDR_SCALAR_PROTO(int32, int32_t) +NDR_SCALAR_PROTO(int3264, int32_t) NDR_SCALAR_PROTO(udlong, uint64_t) NDR_SCALAR_PROTO(udlongr, uint64_t) NDR_SCALAR_PROTO(dlong, int64_t) @@ -498,6 +500,10 @@ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n); enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size); enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size); +enum ndr_err_code ndr_push_union_align(struct ndr_push *ndr, size_t size); +enum ndr_err_code ndr_pull_union_align(struct ndr_pull *ndr, size_t size); +enum ndr_err_code ndr_push_trailer_align(struct ndr_push *ndr, size_t size); +enum ndr_err_code ndr_pull_trailer_align(struct ndr_pull *ndr, size_t size); enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n); enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n); enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n); @@ -544,8 +550,10 @@ struct GUID GUID_random(void); _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v); _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v); _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v); +_PUBLIC_ enum ndr_err_code ndr_pull_enum_uint1632(struct ndr_pull *ndr, int ndr_flags, uint16_t *v); _PUBLIC_ enum ndr_err_code ndr_push_enum_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v); _PUBLIC_ enum ndr_err_code ndr_push_enum_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v); _PUBLIC_ enum ndr_err_code ndr_push_enum_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v); +_PUBLIC_ enum ndr_err_code ndr_push_enum_uint1632(struct ndr_push *ndr, int ndr_flags, uint16_t v); #endif /* __LIBNDR_H__ */ diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index 00e33ad9d0..64fa5a6299 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -102,6 +102,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, } /* + parse a uint1632_t +*/ +_PUBLIC_ enum ndr_err_code ndr_pull_uint1632(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) +{ + if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) { + uint32_t v32 = 0; + enum ndr_err_code err = ndr_pull_uint32(ndr, ndr_flags, &v32); + *v = v32; + if (unlikely(v32 != *v)) { + DEBUG(0,(__location__ ": non-zero upper 16 bits 0x%08x\n", (unsigned)v32)); + return NDR_ERR_NDR64; + } + return err; + } + return ndr_pull_uint16(ndr, ndr_flags, v); +} + +/* parse a int32_t */ _PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v) @@ -282,10 +300,18 @@ _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint8(struct ndr_pull *ndr, int ndr_fla } /* - parse a uint16_t enum (uint32_t on NDR64) + parse a uint16_t enum */ _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) { + return ndr_pull_uint16(ndr, ndr_flags, v); +} + +/* + parse a uint1632_t enum (uint32_t on NDR64) +*/ +_PUBLIC_ enum ndr_err_code ndr_pull_enum_uint1632(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) +{ if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) { uint32_t v32; NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &v32)); @@ -296,11 +322,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint16(struct ndr_pull *ndr, int ndr_fl } return NDR_ERR_SUCCESS; } - NDR_PULL_ALIGN(ndr, 2); - NDR_PULL_NEED_BYTES(ndr, 2); - *v = NDR_SVAL(ndr, ndr->offset); - ndr->offset += 2; - return NDR_ERR_SUCCESS; + return ndr_pull_uint16(ndr, ndr_flags, v); } /* @@ -320,13 +342,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_enum_uint8(struct ndr_push *ndr, int ndr_fla } /* - push a uint16_t enum (uint32_t on NDR64) + push a uint16_t enum */ _PUBLIC_ enum ndr_err_code ndr_push_enum_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v) { - if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) { - return ndr_push_uint32(ndr, ndr_flags, v); - } return ndr_push_uint16(ndr, ndr_flags, v); } @@ -338,6 +357,16 @@ _PUBLIC_ enum ndr_err_code ndr_push_enum_uint32(struct ndr_push *ndr, int ndr_fl return ndr_push_uint32(ndr, ndr_flags, v); } +/* + push a uint1632_t enum +*/ +_PUBLIC_ enum ndr_err_code ndr_push_enum_uint1632(struct ndr_push *ndr, int ndr_flags, uint16_t v) +{ + if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) { + return ndr_push_uint32(ndr, ndr_flags, v); + } + return ndr_push_uint16(ndr, ndr_flags, v); +} /* push a WERROR @@ -421,6 +450,17 @@ _PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, } /* + push a uint1632 +*/ +_PUBLIC_ enum ndr_err_code ndr_push_uint1632(struct ndr_push *ndr, int ndr_flags, uint16_t v) +{ + if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) { + return ndr_push_uint32(ndr, ndr_flags, v); + } + return ndr_push_uint16(ndr, ndr_flags, v); +} + +/* push a int32_t */ _PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v) @@ -452,11 +492,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_uint3264(struct ndr_push *ndr, int ndr_flags if (unlikely(ndr->flags & LIBNDR_FLAG_NDR64)) { return ndr_push_hyper(ndr, ndr_flags, v); } - NDR_PUSH_ALIGN(ndr, 4); - NDR_PUSH_NEED_BYTES(ndr, 4); - NDR_SIVAL(ndr, ndr->offset, v); - ndr->offset += 4; - return NDR_ERR_SUCCESS; + return ndr_push_uint32(ndr, ndr_flags, v); } /* @@ -536,6 +572,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size) } else { size = 4; } + } else if (size == 3) { + if (ndr->flags & LIBNDR_FLAG_NDR64) { + size = 4; + } else { + size = 2; + } } NDR_PUSH_ALIGN(ndr, size); return NDR_ERR_SUCCESS; @@ -550,11 +592,53 @@ _PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size) } else { size = 4; } + } else if (size == 3) { + if (ndr->flags & LIBNDR_FLAG_NDR64) { + size = 4; + } else { + size = 2; + } } NDR_PULL_ALIGN(ndr, size); return NDR_ERR_SUCCESS; } +_PUBLIC_ enum ndr_err_code ndr_push_union_align(struct ndr_push *ndr, size_t size) +{ + /* MS-RPCE section 2.2.5.3.4.4 */ + if (ndr->flags & LIBNDR_FLAG_NDR64) { + return ndr_push_align(ndr, size); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_union_align(struct ndr_pull *ndr, size_t size) +{ + /* MS-RPCE section 2.2.5.3.4.4 */ + if (ndr->flags & LIBNDR_FLAG_NDR64) { + return ndr_pull_align(ndr, size); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_push_trailer_align(struct ndr_push *ndr, size_t size) +{ + /* MS-RPCE section 2.2.5.3.4.1 */ + if (ndr->flags & LIBNDR_FLAG_NDR64) { + return ndr_push_align(ndr, size); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_trailer_align(struct ndr_pull *ndr, size_t size) +{ + /* MS-RPCE section 2.2.5.3.4.1 */ + if (ndr->flags & LIBNDR_FLAG_NDR64) { + return ndr_pull_align(ndr, size); + } + return NDR_ERR_SUCCESS; +} + /* push some bytes */ @@ -806,6 +890,16 @@ _PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v); } +_PUBLIC_ void ndr_print_int3264(struct ndr_print *ndr, const char *name, int32_t v) +{ + ndr->print(ndr, "%-25s: %d", name, v); +} + +_PUBLIC_ void ndr_print_uint3264(struct ndr_print *ndr, const char *name, uint32_t v) +{ + ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v); +} + _PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v) { ndr->print(ndr, "%-25s: 0x%016llx (%llu)", name, (unsigned long long)v, (unsigned long long)v); diff --git a/librpc/ndr/ndr_drsuapi.c b/librpc/ndr/ndr_drsuapi.c index 0c790e52ca..bfc3c75b4e 100644 --- a/librpc/ndr/ndr_drsuapi.c +++ b/librpc/ndr/ndr_drsuapi.c @@ -82,102 +82,24 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch } \ } while (0) -enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r) +_PUBLIC_ void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOID *r) { - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0))); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->oid)); - } - if (ndr_flags & NDR_BUFFERS) { - if (r->oid) { - DATA_BLOB blob; - - if (strncasecmp("ff", r->oid, 2) == 0) { - blob = strhex_to_data_blob(ndr, r->oid); - if (!blob.data) { - return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, - "HEX String Conversion Error: %s\n", - __location__); - } - } else { - _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid)); - talloc_steal(ndr, blob.data); - } - - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length)); - } - } - return NDR_ERR_SUCCESS; -} - -enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r) -{ - uint32_t _ptr_oid; - TALLOC_CTX *_mem_save_oid_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size)); - if (r->__ndr_size < 0 || r->__ndr_size > 10000) { - return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); - } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_oid)); - if (_ptr_oid) { - NDR_PULL_ALLOC(ndr, r->oid); - } else { - r->oid = NULL; - } - } - if (ndr_flags & NDR_BUFFERS) { - if (r->oid) { - DATA_BLOB _oid_array; - const char *_oid; - - _mem_save_oid_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, ndr, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->oid)); - _oid_array.length = ndr_get_array_size(ndr, &r->oid); - NDR_PULL_ALLOC_N(ndr, _oid_array.data, _oid_array.length); - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, _oid_array.data, _oid_array.length)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oid_0, 0); - - if (_oid_array.length && _oid_array.data[0] == 0xFF) { - _oid = data_blob_hex_string(ndr, &_oid_array); - NDR_ERR_HAVE_NO_MEMORY(_oid); - } else { - _OID_PULL_CHECK(ber_read_OID_String(ndr, _oid_array, &_oid)); - } - data_blob_free(&_oid_array); - talloc_steal(r->oid, _oid); - r->oid = _oid; - } - if (r->oid) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->oid, r->__ndr_size)); - } - } - return NDR_ERR_SUCCESS; -} - -size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags) -{ - DATA_BLOB _blob; - size_t ret = 0; - - if (!oid) return 0; - - if (strncasecmp("ff", oid, 2) == 0) { - _blob = strhex_to_data_blob(NULL, oid); - if (_blob.data) { - ret = _blob.length; - } - } else { - if (ber_write_OID_String(&_blob, oid)) { - ret = _blob.length; - } + ndr_print_struct(ndr, name, "drsuapi_DsReplicaOID"); + ndr->depth++; + ndr_print_uint32(ndr, "length", r->length); + ndr->print(ndr, "%-25s: length=%u", "oid", r->length); + if (r->binary_oid) { + char *partial_oid = NULL; + DATA_BLOB oid_blob = data_blob_const(r->binary_oid, r->length); + char *hex_str = data_blob_hex_string(ndr, &oid_blob); + ber_read_partial_OID_String(ndr, oid_blob, (const char **)&partial_oid); + ndr->depth++; + ndr->print(ndr, "%-25s: 0x%s (%s)", "binary_oid", hex_str, partial_oid); + ndr->depth--; + talloc_free(hex_str); + talloc_free(partial_oid); } - data_blob_free(&_blob); - return ret; + ndr->depth--; } enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r) diff --git a/librpc/ndr/ndr_drsuapi.h b/librpc/ndr/ndr_drsuapi.h index 12c2c78bde..179879a3b7 100644 --- a/librpc/ndr/ndr_drsuapi.h +++ b/librpc/ndr/ndr_drsuapi.h @@ -28,8 +28,5 @@ void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItemEx *r); -enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r); -enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r); -size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags); #endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */ |