diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-01 22:05:13 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-01-01 16:12:15 -0600 |
commit | 7d5f0e0893d42b56145a3ffa34e3b4b9906cbd91 (patch) | |
tree | 444af87d26b95edc8293bdbd669ddddd54f9b177 /source4/libcli | |
parent | 86dc05e99f124db47f2743d1fc23117a7f5145ab (diff) | |
download | samba-7d5f0e0893d42b56145a3ffa34e3b4b9906cbd91.tar.gz |
r26639: librpc: Pass iconv convenience on from RPC connection to NDR library, so it can be overridden by OpenChange.
(This used to be commit 2f29f80e07adef1f020173f2cd6d947d0ef505ce)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/cldap/cldap.c | 8 | ||||
-rw-r--r-- | source4/libcli/cldap/cldap.h | 1 | ||||
-rw-r--r-- | source4/libcli/dgram/browse.c | 2 | ||||
-rw-r--r-- | source4/libcli/dgram/dgramsocket.c | 2 | ||||
-rw-r--r-- | source4/libcli/dgram/netlogon.c | 2 | ||||
-rw-r--r-- | source4/libcli/dgram/ntlogon.c | 2 | ||||
-rw-r--r-- | source4/libcli/ldap/ldap_ndr.c | 2 | ||||
-rw-r--r-- | source4/libcli/nbt/nbtname.c | 2 | ||||
-rw-r--r-- | source4/libcli/nbt/nbtsocket.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawfileinfo.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawfsinfo.c | 2 | ||||
-rw-r--r-- | source4/libcli/util/clilsa.c | 4 | ||||
-rw-r--r-- | source4/libcli/wrepl/winsrepl.c | 3 |
13 files changed, 19 insertions, 15 deletions
diff --git a/source4/libcli/cldap/cldap.c b/source4/libcli/cldap/cldap.c index 4c6bd68c13c..7c8d40e608a 100644 --- a/source4/libcli/cldap/cldap.c +++ b/source4/libcli/cldap/cldap.c @@ -617,7 +617,9 @@ NTSTATUS cldap_netlogon_recv(struct cldap_request *req, } data = search.out.response->attributes[0].values; - ndr_err = ndr_pull_union_blob_all(data, mem_ctx, &io->out.netlogon, + ndr_err = ndr_pull_union_blob_all(data, mem_ctx, + lp_iconv_convenience(global_loadparm), + &io->out.netlogon, io->in.version & 0xF, (ndr_pull_flags_fn_t)ndr_pull_nbt_cldap_netlogon); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { @@ -711,7 +713,9 @@ NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap, TALLOC_CTX *tmp_ctx = talloc_new(cldap); DATA_BLOB blob; - ndr_err = ndr_push_union_blob(&blob, tmp_ctx, netlogon, version & 0xF, + ndr_err = ndr_push_union_blob(&blob, tmp_ctx, + lp_iconv_convenience(global_loadparm), + netlogon, version & 0xF, (ndr_push_flags_fn_t)ndr_push_nbt_cldap_netlogon); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(tmp_ctx); diff --git a/source4/libcli/cldap/cldap.h b/source4/libcli/cldap/cldap.h index 217ac0ff1b4..8aa98f03312 100644 --- a/source4/libcli/cldap/cldap.h +++ b/source4/libcli/cldap/cldap.h @@ -73,7 +73,6 @@ struct cldap_request { struct cldap_socket { struct socket_context *sock; struct event_context *event_ctx; - struct loadparm_context *lp_ctx; /* the fd event */ struct fd_event *fde; diff --git a/source4/libcli/dgram/browse.c b/source4/libcli/dgram/browse.c index d70cda02ee0..eb19555d152 100644 --- a/source4/libcli/dgram/browse.c +++ b/source4/libcli/dgram/browse.c @@ -99,7 +99,7 @@ NTSTATUS dgram_mailslot_browse_parse(struct dgram_mailslot_handler *dgmslot, DATA_BLOB data = dgram_mailslot_data(dgram); enum ndr_err_code ndr_err; - ndr_err = ndr_pull_struct_blob(&data, mem_ctx, pkt, + ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(global_loadparm), pkt, (ndr_pull_flags_fn_t)ndr_pull_nbt_browse_packet); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/dgram/dgramsocket.c b/source4/libcli/dgram/dgramsocket.c index cd3ac6630fd..032d9de67bc 100644 --- a/source4/libcli/dgram/dgramsocket.c +++ b/source4/libcli/dgram/dgramsocket.c @@ -72,7 +72,7 @@ static void dgm_socket_recv(struct nbt_dgram_socket *dgmsock) } /* parse the request */ - ndr_err = ndr_pull_struct_blob(&blob, packet, packet, + ndr_err = ndr_pull_struct_blob(&blob, packet, lp_iconv_convenience(global_loadparm), packet, (ndr_pull_flags_fn_t)ndr_pull_nbt_dgram_packet); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/dgram/netlogon.c b/source4/libcli/dgram/netlogon.c index 161d48cbbca..670af4ea636 100644 --- a/source4/libcli/dgram/netlogon.c +++ b/source4/libcli/dgram/netlogon.c @@ -114,7 +114,7 @@ NTSTATUS dgram_mailslot_netlogon_parse(struct dgram_mailslot_handler *dgmslot, DATA_BLOB data = dgram_mailslot_data(dgram); enum ndr_err_code ndr_err; - ndr_err = ndr_pull_struct_blob(&data, mem_ctx, netlogon, + ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(global_loadparm), netlogon, (ndr_pull_flags_fn_t)ndr_pull_nbt_netlogon_packet); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/dgram/ntlogon.c b/source4/libcli/dgram/ntlogon.c index bbcfc1b2dc7..98aad1af8c6 100644 --- a/source4/libcli/dgram/ntlogon.c +++ b/source4/libcli/dgram/ntlogon.c @@ -113,7 +113,7 @@ NTSTATUS dgram_mailslot_ntlogon_parse(struct dgram_mailslot_handler *dgmslot, DATA_BLOB data = dgram_mailslot_data(dgram); enum ndr_err_code ndr_err; - ndr_err = ndr_pull_struct_blob(&data, mem_ctx, ntlogon, + ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(global_loadparm), ntlogon, (ndr_pull_flags_fn_t)ndr_pull_nbt_ntlogon_packet); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/ldap/ldap_ndr.c b/source4/libcli/ldap/ldap_ndr.c index fde623bece2..3f7cb8f5380 100644 --- a/source4/libcli/ldap/ldap_ndr.c +++ b/source4/libcli/ldap/ldap_ndr.c @@ -85,7 +85,7 @@ NTSTATUS ldap_decode_ndr_GUID(TALLOC_CTX *mem_ctx, struct ldb_val val, struct GU blob.data = val.data; blob.length = val.length; - ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, guid, + ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, guid, (ndr_pull_flags_fn_t)ndr_pull_GUID); talloc_free(val.data); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c index 079d0595de2..142dad02961 100644 --- a/source4/libcli/nbt/nbtname.c +++ b/source4/libcli/nbt/nbtname.c @@ -400,7 +400,7 @@ _PUBLIC_ NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, { enum ndr_err_code ndr_err; - ndr_err = ndr_pull_struct_blob(blob, mem_ctx, name, + ndr_err = ndr_pull_struct_blob(blob, mem_ctx, NULL, name, (ndr_pull_flags_fn_t)ndr_pull_nbt_name); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c index 3716d409412..8bfe746294e 100644 --- a/source4/libcli/nbt/nbtsocket.c +++ b/source4/libcli/nbt/nbtsocket.c @@ -190,7 +190,7 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock) } /* parse the request */ - ndr_err = ndr_pull_struct_blob(&blob, packet, packet, + ndr_err = ndr_pull_struct_blob(&blob, packet, lp_iconv_convenience(global_loadparm), packet, (ndr_pull_flags_fn_t)ndr_pull_nbt_name_packet); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c index 9827217a043..ed5475e9265 100644 --- a/source4/libcli/raw/rawfileinfo.c +++ b/source4/libcli/raw/rawfileinfo.c @@ -253,7 +253,7 @@ NTSTATUS smb_raw_fileinfo_passthru_parse(const DATA_BLOB *blob, TALLOC_CTX *mem_ parms->query_secdesc.out.sd = talloc(mem_ctx, struct security_descriptor); NT_STATUS_HAVE_NO_MEMORY(parms->query_secdesc.out.sd); - ndr_err = ndr_pull_struct_blob(blob, mem_ctx, + ndr_err = ndr_pull_struct_blob(blob, mem_ctx, NULL, parms->query_secdesc.out.sd, (ndr_pull_flags_fn_t)ndr_pull_security_descriptor); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { diff --git a/source4/libcli/raw/rawfsinfo.c b/source4/libcli/raw/rawfsinfo.c index 73f1192df06..bfb5db828eb 100644 --- a/source4/libcli/raw/rawfsinfo.c +++ b/source4/libcli/raw/rawfsinfo.c @@ -216,7 +216,7 @@ NTSTATUS smb_raw_fsinfo_passthru_parse(DATA_BLOB blob, TALLOC_CTX *mem_ctx, case RAW_QFS_OBJECTID_INFORMATION: QFS_CHECK_SIZE(64); - ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &fsinfo->objectid_information.out.guid, + ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, &fsinfo->objectid_information.out.guid, (ndr_pull_flags_fn_t)ndr_pull_GUID); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/util/clilsa.c b/source4/libcli/util/clilsa.c index 7c322946487..1eb2de83d2c 100644 --- a/source4/libcli/util/clilsa.c +++ b/source4/libcli/util/clilsa.c @@ -32,6 +32,7 @@ #include "librpc/gen_ndr/ndr_lsa.h" #include "librpc/gen_ndr/ndr_lsa_c.h" #include "libcli/util/clilsa.h" +#include "param/param.h" struct smblsa_state { struct dcerpc_pipe *pipe; @@ -79,7 +80,8 @@ static NTSTATUS smblsa_connect(struct smbcli_state *cli) } lsa->ipc_tree->tid = tcon.tconx.out.tid; - lsa->pipe = dcerpc_pipe_init(lsa, cli->transport->socket->event.ctx); + lsa->pipe = dcerpc_pipe_init(lsa, cli->transport->socket->event.ctx, + lp_iconv_convenience(global_loadparm)); if (lsa->pipe == NULL) { talloc_free(lsa); return NT_STATUS_NO_MEMORY; diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c index 381df902b40..d027e883960 100644 --- a/source4/libcli/wrepl/winsrepl.c +++ b/source4/libcli/wrepl/winsrepl.c @@ -102,8 +102,7 @@ static NTSTATUS wrepl_finish_recv(void *private, DATA_BLOB packet_blob_in) blob.length = packet_blob_in.length - 4; /* we have a full request - parse it */ - ndr_err = ndr_pull_struct_blob(&blob, - req->packet, req->packet, + ndr_err = ndr_pull_struct_blob(&blob, req->packet, lp_iconv_convenience(global_loadparm), req->packet, (ndr_pull_flags_fn_t)ndr_pull_wrepl_packet); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS status = ndr_map_error2ntstatus(ndr_err); |