diff options
author | Günther Deschner <gd@samba.org> | 2008-09-23 20:43:41 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-09-23 23:35:14 +0200 |
commit | 022947097fb6bb84ff32e279bc65d73ac5c8eb8f (patch) | |
tree | 6dac901ab5491d8052f2540278eee3319f7b0fb9 /source3 | |
parent | 5fa451ea84838ca9808e4090f541ea1bec7ec17c (diff) | |
download | samba-022947097fb6bb84ff32e279bc65d73ac5c8eb8f.tar.gz samba-022947097fb6bb84ff32e279bc65d73ac5c8eb8f.tar.bz2 samba-022947097fb6bb84ff32e279bc65d73ac5c8eb8f.zip |
s3-ndr: add stub smb_iconv_convenience to some ndr_ functions.
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 7 | ||||
-rw-r--r-- | source3/libnet/libnet_dssync_keytab.c | 2 | ||||
-rw-r--r-- | source3/librpc/ndr/ndr.c | 15 | ||||
-rw-r--r-- | source3/librpc/rpc/binding.c | 2 | ||||
-rw-r--r-- | source3/librpc/rpc/dcerpc.c | 2 | ||||
-rw-r--r-- | source3/rpc_client/ndr.c | 2 |
6 files changed, 16 insertions, 14 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index a2772384c5..9ee3fc9071 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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, diff --git a/source3/libnet/libnet_dssync_keytab.c b/source3/libnet/libnet_dssync_keytab.c index e762ecbe49..6a3139d6ad 100644 --- a/source3/libnet/libnet_dssync_keytab.c +++ b/source3/libnet/libnet_dssync_keytab.c @@ -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); diff --git a/source3/librpc/ndr/ndr.c b/source3/librpc/ndr/ndr.c index 624024c94d..56d5967de9 100644 --- a/source3/librpc/ndr/ndr.c +++ b/source3/librpc/ndr/ndr.c @@ -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)); diff --git a/source3/librpc/rpc/binding.c b/source3/librpc/rpc/binding.c index 01e3479c23..469c5db8d5 100644 --- a/source3/librpc/rpc/binding.c +++ b/source3/librpc/rpc/binding.c @@ -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; diff --git a/source3/librpc/rpc/dcerpc.c b/source3/librpc/rpc/dcerpc.c index 58d676a9d9..7a870981fd 100644 --- a/source3/librpc/rpc/dcerpc.c +++ b/source3/librpc/rpc/dcerpc.c @@ -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; } diff --git a/source3/rpc_client/ndr.c b/source3/rpc_client/ndr.c index 72a33137a6..5565ae3dc3 100644 --- a/source3/rpc_client/ndr.c +++ b/source3/rpc_client/ndr.c @@ -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; } |