mirror of
https://github.com/samba-team/samba.git
synced 2025-06-02 13:06:57 +03:00
s3-ndr: add stub smb_iconv_convenience to some ndr_ functions.
Guenther
This commit is contained in:
parent
5fa451ea84
commit
022947097f
@ -3881,7 +3881,7 @@ NTSTATUS rpc_wkssvc_init(void);
|
||||
/* The following definitions come from librpc/ndr/ndr.c */
|
||||
|
||||
_PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n);
|
||||
_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
|
||||
_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
|
||||
_PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save);
|
||||
_PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save);
|
||||
@ -3944,8 +3944,9 @@ _PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p)
|
||||
_PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p);
|
||||
_PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, void *p, ndr_pull_flags_fn_t fn);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
|
||||
ndr_pull_flags_fn_t fn);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
struct smb_iconv_convenience *iconv_convenience,
|
||||
void *p, ndr_pull_flags_fn_t fn);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
|
||||
uint32_t level, ndr_pull_flags_fn_t fn);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
|
||||
|
@ -179,7 +179,7 @@ static NTSTATUS parse_supplemental_credentials(TALLOC_CTX *mem_ctx,
|
||||
bool newer_keys = false;
|
||||
uint32_t j;
|
||||
|
||||
ndr_err = ndr_pull_struct_blob_all(blob, mem_ctx, &scb,
|
||||
ndr_err = ndr_pull_struct_blob_all(blob, mem_ctx, NULL, &scb,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
@ -53,7 +53,7 @@ _PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n)
|
||||
/*
|
||||
initialise a ndr parse structure from a data blob
|
||||
*/
|
||||
_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
|
||||
_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience)
|
||||
{
|
||||
struct ndr_pull *ndr;
|
||||
|
||||
@ -810,7 +810,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob,
|
||||
ndr_pull_flags_fn_t fn)
|
||||
{
|
||||
struct ndr_pull *ndr;
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx);
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
|
||||
NDR_ERR_HAVE_NO_MEMORY(ndr);
|
||||
NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
|
||||
return NDR_ERR_SUCCESS;
|
||||
@ -819,11 +819,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob,
|
||||
/*
|
||||
pull a struct from a blob using NDR - failing if all bytes are not consumed
|
||||
*/
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
|
||||
ndr_pull_flags_fn_t fn)
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
struct smb_iconv_convenience *iconv_convenience,
|
||||
void *p, ndr_pull_flags_fn_t fn)
|
||||
{
|
||||
struct ndr_pull *ndr;
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx);
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
|
||||
NDR_ERR_HAVE_NO_MEMORY(ndr);
|
||||
NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
|
||||
if (ndr->offset < ndr->data_size) {
|
||||
@ -841,7 +842,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX
|
||||
uint32_t level, ndr_pull_flags_fn_t fn)
|
||||
{
|
||||
struct ndr_pull *ndr;
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx);
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx, NULL);
|
||||
NDR_ERR_HAVE_NO_MEMORY(ndr);
|
||||
NDR_CHECK(ndr_pull_set_switch_value(ndr, p, level));
|
||||
NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
|
||||
@ -856,7 +857,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC
|
||||
uint32_t level, ndr_pull_flags_fn_t fn)
|
||||
{
|
||||
struct ndr_pull *ndr;
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx);
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx, NULL);
|
||||
NDR_ERR_HAVE_NO_MEMORY(ndr);
|
||||
NDR_CHECK(ndr_pull_set_switch_value(ndr, p, level));
|
||||
NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
|
||||
|
@ -357,7 +357,7 @@ _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struc
|
||||
_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
|
||||
{
|
||||
TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
|
||||
struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx);
|
||||
struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
|
||||
enum ndr_err_code ndr_err;
|
||||
uint16_t if_version=0;
|
||||
|
||||
|
@ -100,7 +100,7 @@ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
|
||||
|
||||
prs_mem_free( &r_ps );
|
||||
|
||||
pull = ndr_pull_init_blob(&blob, req);
|
||||
pull = ndr_pull_init_blob(&blob, req, NULL);
|
||||
if (pull == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
|
||||
|
||||
prs_mem_free( &r_ps );
|
||||
|
||||
pull = ndr_pull_init_blob(&blob, mem_ctx);
|
||||
pull = ndr_pull_init_blob(&blob, mem_ctx, NULL);
|
||||
if (pull == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user