summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tdr/tdr.c17
-rw-r--r--lib/tdr/tdr.h2
-rw-r--r--lib/tdr/testsuite.c18
-rw-r--r--libcli/auth/ntlmssp_ndr.c22
-rw-r--r--libcli/auth/ntlmssp_ndr.h6
-rw-r--r--libcli/auth/schannel_state.h3
-rw-r--r--libcli/auth/schannel_state_tdb.c17
-rw-r--r--libcli/cldap/cldap.c7
-rw-r--r--libcli/cldap/cldap.h3
-rw-r--r--libcli/ldap/ldap_ndr.c4
-rw-r--r--libcli/named_pipe_auth/npa_tstream.c7
-rw-r--r--libcli/named_pipe_auth/npa_tstream.h1
-rw-r--r--libcli/nbt/libnbt.h6
-rw-r--r--libcli/nbt/nbtname.c6
-rw-r--r--libcli/nbt/nbtsocket.c8
-rw-r--r--libcli/nbt/pynbt.c12
-rw-r--r--libcli/nbt/tools/nmblookup.c2
-rw-r--r--libcli/ndr_netlogon.c6
-rw-r--r--libcli/netlogon.c17
-rw-r--r--libcli/netlogon_proto.h4
-rw-r--r--libcli/registry/util_reg.c19
-rw-r--r--libcli/samsync/decrypt.c2
-rw-r--r--libcli/security/secace.c4
-rw-r--r--librpc/idl/drsblobs.idl22
-rw-r--r--librpc/idl/drsuapi.idl10
-rw-r--r--librpc/idl/epmapper.idl2
-rw-r--r--librpc/idl/frsrpc.idl2
-rw-r--r--librpc/idl/named_pipe_auth.idl4
-rw-r--r--librpc/idl/nbt.idl2
-rw-r--r--librpc/idl/netlogon.idl2
-rw-r--r--librpc/idl/ntlmssp.idl4
-rw-r--r--librpc/idl/security.idl6
-rw-r--r--librpc/idl/spoolss.idl32
-rw-r--r--librpc/ndr/libndr.h25
-rw-r--r--librpc/ndr/ndr.c56
-rw-r--r--librpc/ndr/ndr_compression.c8
-rw-r--r--librpc/ndr/ndr_drsuapi.c4
-rw-r--r--librpc/ndr/ndr_drsuapi.h2
-rw-r--r--librpc/ndr/ndr_frsrpc.c4
-rw-r--r--librpc/ndr/ndr_frsrpc.h1
-rw-r--r--librpc/ndr/ndr_krb5pac.c16
-rw-r--r--librpc/ndr/ndr_ntlmssp.c10
-rw-r--r--librpc/ndr/ndr_ntlmssp.h2
-rw-r--r--librpc/ndr/ndr_schannel.c4
-rw-r--r--librpc/ndr/ndr_sec_helper.c20
-rw-r--r--librpc/ndr/ndr_spoolss_buf.c42
-rw-r--r--librpc/ndr/ndr_spoolss_buf.h24
-rw-r--r--librpc/ndr/uuid.c4
-rw-r--r--librpc/rpc/binding.c6
-rw-r--r--librpc/tools/ndrdump.c8
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm8
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm4
-rwxr-xr-xpidl/tests/ndr_string.pl18
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/proto.h12
-rw-r--r--source3/librpc/ndr/util.c4
-rw-r--r--source4/auth/gensec/gensec.h1
-rw-r--r--source4/auth/gensec/gensec_gssapi.c1
-rw-r--r--source4/auth/gensec/gensec_krb5.c1
-rw-r--r--source4/auth/gensec/pygensec.c1
-rw-r--r--source4/auth/gensec/schannel.c11
-rw-r--r--source4/auth/kerberos/kerberos.h4
-rw-r--r--source4/auth/kerberos/kerberos_pac.c30
-rw-r--r--source4/auth/ntlm/auth_winbind.c11
-rw-r--r--source4/cldap_server/netlogon.c10
-rw-r--r--source4/client/cifsdd.c6
-rw-r--r--source4/client/cifsdd.h1
-rw-r--r--source4/client/cifsddio.c6
-rw-r--r--source4/client/client.c7
-rw-r--r--source4/dsdb/common/dsdb_access.c2
-rw-r--r--source4/dsdb/common/util.c12
-rw-r--r--source4/dsdb/kcc/kcc_drs_replica_info.c2
-rw-r--r--source4/dsdb/repl/drepl_partitions.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/descriptor.c11
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn_out.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c14
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c29
-rw-r--r--source4/dsdb/samdb/ldb_modules/ridalloc.c1
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba3sam.c5
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_load.c1
-rw-r--r--source4/dsdb/schema/schema_info_attr.c4
-rw-r--r--source4/dsdb/schema/schema_init.c21
-rw-r--r--source4/dsdb/schema/schema_set.c2
-rw-r--r--source4/dsdb/schema/schema_syntax.c28
-rw-r--r--source4/kdc/db-glue.c11
-rw-r--r--source4/kdc/kdc.c4
-rw-r--r--source4/kdc/pac-glue.c12
-rw-r--r--source4/lib/ldb-samba/ldif_handlers.c15
-rw-r--r--source4/lib/messaging/irpc.h2
-rw-r--r--source4/lib/messaging/messaging.c12
-rw-r--r--source4/lib/messaging/pymessaging.c4
-rw-r--r--source4/lib/messaging/tests/irpc.c2
-rw-r--r--source4/lib/messaging/tests/messaging.c5
-rw-r--r--source4/lib/registry/hive.c2
-rw-r--r--source4/lib/registry/patchfile.c11
-rw-r--r--source4/lib/registry/patchfile_dotreg.c9
-rw-r--r--source4/lib/registry/patchfile_preg.c2
-rw-r--r--source4/lib/registry/pyregistry.c3
-rw-r--r--source4/lib/registry/regf.c58
-rw-r--r--source4/lib/registry/registry.h30
-rw-r--r--source4/lib/registry/tests/diff.c19
-rw-r--r--source4/lib/registry/tests/generic.c24
-rw-r--r--source4/lib/registry/tests/hive.c3
-rw-r--r--source4/lib/registry/tools/regdiff.c3
-rw-r--r--source4/lib/registry/tools/regpatch.c2
-rw-r--r--source4/lib/registry/tools/regshell.c8
-rw-r--r--source4/lib/registry/tools/regtree.c3
-rw-r--r--source4/lib/registry/util.c30
-rw-r--r--source4/libcli/cliconnect.c6
-rw-r--r--source4/libcli/dgram/browse.c6
-rw-r--r--source4/libcli/dgram/dgramsocket.c8
-rw-r--r--source4/libcli/dgram/libdgram.h3
-rw-r--r--source4/libcli/dgram/netlogon.c13
-rw-r--r--source4/libcli/finddcs.c9
-rw-r--r--source4/libcli/raw/clitransport.c8
-rw-r--r--source4/libcli/raw/clitree.c2
-rw-r--r--source4/libcli/raw/rawacl.c4
-rw-r--r--source4/libcli/raw/rawfile.c2
-rw-r--r--source4/libcli/raw/rawfileinfo.c6
-rw-r--r--source4/libcli/raw/rawsetfileinfo.c3
-rw-r--r--source4/libcli/resolve/nbtlist.c3
-rw-r--r--source4/libcli/smb2/create.c3
-rw-r--r--source4/libcli/smb_composite/connect.c2
-rw-r--r--source4/libcli/util/clilsa.c3
-rw-r--r--source4/libcli/wrepl/winsrepl.c9
-rw-r--r--source4/libnet/libnet_become_dc.c48
-rw-r--r--source4/libnet/libnet_lookup.c15
-rw-r--r--source4/libnet/libnet_site.c2
-rw-r--r--source4/libnet/libnet_unbecome_dc.c4
-rw-r--r--source4/libnet/libnet_vampire.c2
-rw-r--r--source4/librpc/idl/winsrepl.idl2
-rw-r--r--source4/librpc/ndr/ndr_string.c34
-rw-r--r--source4/librpc/rpc/dcerpc.c35
-rw-r--r--source4/librpc/rpc/dcerpc.h4
-rw-r--r--source4/librpc/rpc/dcerpc_connect.c3
-rw-r--r--source4/librpc/rpc/dcerpc_secondary.c2
-rw-r--r--source4/librpc/rpc/dcerpc_util.c5
-rw-r--r--source4/nbt_server/dgram/request.c7
-rw-r--r--source4/nbt_server/interfaces.c5
-rw-r--r--source4/ntp_signd/ntp_signd.c9
-rw-r--r--source4/ntptr/simple_ldb/ntptr_simple_ldb.c6
-rw-r--r--source4/ntvfs/common/notify.c11
-rw-r--r--source4/ntvfs/common/opendb_tdb.c4
-rw-r--r--source4/ntvfs/ipc/ipc_rap.c12
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c3
-rw-r--r--source4/ntvfs/posix/pvfs_rename.c16
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c18
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c6
-rw-r--r--source4/ntvfs/posix/pvfs_xattr.c6
-rw-r--r--source4/param/loadparm.c3
-rw-r--r--source4/param/secrets.c2
-rw-r--r--source4/rpc_server/dcerpc_server.c14
-rw-r--r--source4/rpc_server/dcesrv_auth.c8
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c3
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c13
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c3
-rw-r--r--source4/rpc_server/service_rpc.c16
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c32
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c2
-rw-r--r--source4/scripting/python/modules.h3
-rw-r--r--source4/smb_server/smb/nttrans.c6
-rw-r--r--source4/smb_server/smb2/fileinfo.c4
-rw-r--r--source4/smb_server/smb2/fileio.c2
-rw-r--r--source4/smbd/server.c4
-rw-r--r--source4/smbd/service_named_pipe.c2
-rw-r--r--source4/smbd/service_stream.c4
-rw-r--r--source4/smbd/service_task.c1
-rw-r--r--source4/torture/auth/pac.c16
-rw-r--r--source4/torture/basic/base.c1
-rw-r--r--source4/torture/basic/scanner.c13
-rw-r--r--source4/torture/basic/utable.c14
-rw-r--r--source4/torture/drs/unit/prefixmap_tests.c6
-rw-r--r--source4/torture/drs/unit/schemainfo_tests.c2
-rw-r--r--source4/torture/gentest.c1
-rw-r--r--source4/torture/ldap/cldap.c51
-rw-r--r--source4/torture/ldap/cldapbench.c4
-rw-r--r--source4/torture/ldap/uptodatevector.c4
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c2
-rw-r--r--source4/torture/locktest.c1
-rw-r--r--source4/torture/masktest.c3
-rw-r--r--source4/torture/nbt/dgram.c9
-rw-r--r--source4/torture/nbt/nbt.c2
-rw-r--r--source4/torture/nbt/winsbench.c2
-rw-r--r--source4/torture/nbt/winsreplication.c20
-rw-r--r--source4/torture/ndr/ndr.c6
-rw-r--r--source4/torture/ntp/ntp_signd.c2
-rw-r--r--source4/torture/rap/printing.c44
-rw-r--r--source4/torture/rap/rap.c107
-rw-r--r--source4/torture/rap/rpc.c4
-rw-r--r--source4/torture/raw/oplock.c1
-rw-r--r--source4/torture/raw/qfileinfo.c3
-rw-r--r--source4/torture/raw/tconrate.c1
-rw-r--r--source4/torture/rpc/autoidl.c2
-rw-r--r--source4/torture/rpc/dssync.c7
-rw-r--r--source4/torture/rpc/eventlog.c3
-rw-r--r--source4/torture/rpc/join.c2
-rw-r--r--source4/torture/rpc/lsa.c2
-rw-r--r--source4/torture/rpc/remote_pac.c6
-rw-r--r--source4/torture/rpc/samba3rpc.c39
-rw-r--r--source4/torture/rpc/samlogon.c5
-rw-r--r--source4/torture/rpc/samsync.c2
-rw-r--r--source4/torture/rpc/spoolss.c79
-rw-r--r--source4/torture/rpc/svcctl.c2
-rw-r--r--source4/torture/rpc/winreg.c6
-rw-r--r--source4/torture/unix/unix_info2.c1
-rw-r--r--source4/torture/unix/whoami.c1
-rw-r--r--source4/torture/util_smb.c1
-rw-r--r--source4/utils/ntlm_auth.c3
-rw-r--r--source4/winbind/idmap.c6
-rw-r--r--source4/winbind/wb_dom_info.c1
-rw-r--r--source4/winbind/wb_pam_auth.c3
-rw-r--r--source4/winbind/wb_samba3_cmd.c1
-rw-r--r--source4/wrepl_server/wrepl_in_call.c4
-rw-r--r--source4/wrepl_server/wrepl_in_connection.c2
-rw-r--r--source4/wrepl_server/wrepl_out_helpers.c2
216 files changed, 774 insertions, 1260 deletions
diff --git a/lib/tdr/tdr.c b/lib/tdr/tdr.c
index ce67003f8b..95871047b7 100644
--- a/lib/tdr/tdr.c
+++ b/lib/tdr/tdr.c
@@ -163,7 +163,7 @@ NTSTATUS tdr_pull_charset(struct tdr_pull *tdr, TALLOC_CTX *ctx, const char **v,
TDR_PULL_NEED_BYTES(tdr, el_size*length);
- if (!convert_string_talloc_convenience(ctx, tdr->iconv_convenience, chset, CH_UNIX, tdr->data.data+tdr->offset, el_size*length, discard_const_p(void *, v), &ret, false)) {
+ if (!convert_string_talloc(ctx, chset, CH_UNIX, tdr->data.data+tdr->offset, el_size*length, discard_const_p(void *, v), &ret, false)) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -183,7 +183,8 @@ NTSTATUS tdr_push_charset(struct tdr_push *tdr, const char **v, uint32_t length,
required = el_size * length;
TDR_PUSH_NEED_BYTES(tdr, required);
- if (!convert_string_convenience(tdr->iconv_convenience, CH_UNIX, chset, *v, strlen(*v), tdr->data.data+tdr->data.length, required, &ret, false)) {
+ ret = convert_string(CH_UNIX, chset, *v, strlen(*v), tdr->data.data+tdr->data.length, required, false);
+ if (ret == -1) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -343,33 +344,29 @@ NTSTATUS tdr_pull_DATA_BLOB(struct tdr_pull *tdr, TALLOC_CTX *ctx, DATA_BLOB *bl
return NT_STATUS_OK;
}
-struct tdr_push *tdr_push_init(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic)
+struct tdr_push *tdr_push_init(TALLOC_CTX *mem_ctx)
{
struct tdr_push *push = talloc_zero(mem_ctx, struct tdr_push);
if (push == NULL)
return NULL;
- push->iconv_convenience = talloc_reference(push, ic);
-
return push;
}
-struct tdr_pull *tdr_pull_init(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic)
+struct tdr_pull *tdr_pull_init(TALLOC_CTX *mem_ctx)
{
struct tdr_pull *pull = talloc_zero(mem_ctx, struct tdr_pull);
if (pull == NULL)
return NULL;
- pull->iconv_convenience = talloc_reference(pull, ic);
-
return pull;
}
-NTSTATUS tdr_push_to_fd(int fd, struct smb_iconv_convenience *iconv_convenience, tdr_push_fn_t push_fn, const void *p)
+NTSTATUS tdr_push_to_fd(int fd, tdr_push_fn_t push_fn, const void *p)
{
- struct tdr_push *push = tdr_push_init(NULL, iconv_convenience);
+ struct tdr_push *push = tdr_push_init(NULL);
if (push == NULL)
return NT_STATUS_NO_MEMORY;
diff --git a/lib/tdr/tdr.h b/lib/tdr/tdr.h
index 84f3e50c2b..c3ffd2f6ff 100644
--- a/lib/tdr/tdr.h
+++ b/lib/tdr/tdr.h
@@ -33,13 +33,11 @@ struct tdr_pull {
DATA_BLOB data;
uint32_t offset;
int flags;
- struct smb_iconv_convenience *iconv_convenience;
};
struct tdr_push {
DATA_BLOB data;
int flags;
- struct smb_iconv_convenience *iconv_convenience;
};
struct tdr_print {
diff --git a/lib/tdr/testsuite.c b/lib/tdr/testsuite.c
index ca76b5291e..1db7a1d5fe 100644
--- a/lib/tdr/testsuite.c
+++ b/lib/tdr/testsuite.c
@@ -25,7 +25,7 @@
static bool test_push_uint8(struct torture_context *tctx)
{
uint8_t v = 4;
- struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
+ struct tdr_push *tdr = tdr_push_init(tctx);
torture_assert_ntstatus_ok(tctx, tdr_push_uint8(tdr, &v), "push failed");
torture_assert_int_equal(tctx, tdr->data.length, 1, "length incorrect");
@@ -37,7 +37,7 @@ static bool test_pull_uint8(struct torture_context *tctx)
{
uint8_t d = 2;
uint8_t l;
- struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
+ struct tdr_pull *tdr = tdr_pull_init(tctx);
tdr->data.data = &d;
tdr->data.length = 1;
tdr->offset = 0;
@@ -52,7 +52,7 @@ static bool test_pull_uint8(struct torture_context *tctx)
static bool test_push_uint16(struct torture_context *tctx)
{
uint16_t v = 0xF32;
- struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
+ struct tdr_push *tdr = tdr_push_init(tctx);
torture_assert_ntstatus_ok(tctx, tdr_push_uint16(tdr, &v), "push failed");
torture_assert_int_equal(tctx, tdr->data.length, 2, "length incorrect");
@@ -65,7 +65,7 @@ static bool test_pull_uint16(struct torture_context *tctx)
{
uint8_t d[2] = { 782 & 0xFF, (782 & 0xFF00) / 0x100 };
uint16_t l;
- struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
+ struct tdr_pull *tdr = tdr_pull_init(tctx);
tdr->data.data = d;
tdr->data.length = 2;
tdr->offset = 0;
@@ -80,7 +80,7 @@ static bool test_pull_uint16(struct torture_context *tctx)
static bool test_push_uint32(struct torture_context *tctx)
{
uint32_t v = 0x100F32;
- struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
+ struct tdr_push *tdr = tdr_push_init(tctx);
torture_assert_ntstatus_ok(tctx, tdr_push_uint32(tdr, &v), "push failed");
torture_assert_int_equal(tctx, tdr->data.length, 4, "length incorrect");
@@ -95,7 +95,7 @@ static bool test_pull_uint32(struct torture_context *tctx)
{
uint8_t d[4] = { 782 & 0xFF, (782 & 0xFF00) / 0x100, 0, 0 };
uint32_t l;
- struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
+ struct tdr_pull *tdr = tdr_pull_init(tctx);
tdr->data.data = d;
tdr->data.length = 4;
tdr->offset = 0;
@@ -109,7 +109,7 @@ static bool test_pull_uint32(struct torture_context *tctx)
static bool test_pull_charset(struct torture_context *tctx)
{
- struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
+ struct tdr_pull *tdr = tdr_pull_init(tctx);
const char *l = NULL;
tdr->data.data = (uint8_t *)talloc_strdup(tctx, "bla");
tdr->data.length = 4;
@@ -131,7 +131,7 @@ static bool test_pull_charset(struct torture_context *tctx)
static bool test_pull_charset_empty(struct torture_context *tctx)
{
- struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
+ struct tdr_pull *tdr = tdr_pull_init(tctx);
const char *l = NULL;
tdr->data.data = (uint8_t *)talloc_strdup(tctx, "bla");
tdr->data.length = 4;
@@ -150,7 +150,7 @@ static bool test_pull_charset_empty(struct torture_context *tctx)
static bool test_push_charset(struct torture_context *tctx)
{
const char *l = "bloe";
- struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
+ struct tdr_push *tdr = tdr_push_init(tctx);
torture_assert_ntstatus_ok(tctx, tdr_push_charset(tdr, &l, 4, 1, CH_UTF8),
"push failed");
torture_assert_int_equal(tctx, 4, tdr->data.length, "offset invalid");
diff --git a/libcli/auth/ntlmssp_ndr.c b/libcli/auth/ntlmssp_ndr.c
index 53a2378e20..8f15044e1a 100644
--- a/libcli/auth/ntlmssp_ndr.c
+++ b/libcli/auth/ntlmssp_ndr.c
@@ -22,10 +22,10 @@
#include "../librpc/gen_ndr/ndr_ntlmssp.h"
#include "../libcli/auth/ntlmssp_ndr.h"
-#define NTLMSSP_PULL_MESSAGE(type, blob, mem_ctx, ic, r) \
+#define NTLMSSP_PULL_MESSAGE(type, blob, mem_ctx, r) \
do { \
enum ndr_err_code __ndr_err; \
- __ndr_err = ndr_pull_struct_blob(blob, mem_ctx, ic, r, \
+ __ndr_err = ndr_pull_struct_blob(blob, mem_ctx, r, \
(ndr_pull_flags_fn_t)ndr_pull_ ##type); \
if (!NDR_ERR_CODE_IS_SUCCESS(__ndr_err)) { \
return ndr_map_error2ntstatus(__ndr_err); \
@@ -58,10 +58,9 @@ do { \
NTSTATUS ntlmssp_pull_NEGOTIATE_MESSAGE(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct NEGOTIATE_MESSAGE *r)
{
- NTLMSSP_PULL_MESSAGE(NEGOTIATE_MESSAGE, blob, mem_ctx, ic, r);
+ NTLMSSP_PULL_MESSAGE(NEGOTIATE_MESSAGE, blob, mem_ctx, r);
}
/**
@@ -74,10 +73,9 @@ NTSTATUS ntlmssp_pull_NEGOTIATE_MESSAGE(const DATA_BLOB *blob,
NTSTATUS ntlmssp_pull_CHALLENGE_MESSAGE(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct CHALLENGE_MESSAGE *r)
{
- NTLMSSP_PULL_MESSAGE(CHALLENGE_MESSAGE, blob, mem_ctx, ic, r);
+ NTLMSSP_PULL_MESSAGE(CHALLENGE_MESSAGE, blob, mem_ctx, r);
}
/**
@@ -90,10 +88,9 @@ NTSTATUS ntlmssp_pull_CHALLENGE_MESSAGE(const DATA_BLOB *blob,
NTSTATUS ntlmssp_pull_AUTHENTICATE_MESSAGE(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct AUTHENTICATE_MESSAGE *r)
{
- NTLMSSP_PULL_MESSAGE(AUTHENTICATE_MESSAGE, blob, mem_ctx, ic, r);
+ NTLMSSP_PULL_MESSAGE(AUTHENTICATE_MESSAGE, blob, mem_ctx, r);
}
/**
@@ -106,10 +103,9 @@ NTSTATUS ntlmssp_pull_AUTHENTICATE_MESSAGE(const DATA_BLOB *blob,
NTSTATUS ntlmssp_push_NEGOTIATE_MESSAGE(DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const struct NEGOTIATE_MESSAGE *r)
{
- NTLMSSP_PUSH_MESSAGE(NEGOTIATE_MESSAGE, blob, mem_ctx, ic, r);
+ NTLMSSP_PUSH_MESSAGE(NEGOTIATE_MESSAGE, blob, mem_ctx, r);
}
/**
@@ -122,10 +118,9 @@ NTSTATUS ntlmssp_push_NEGOTIATE_MESSAGE(DATA_BLOB *blob,
NTSTATUS ntlmssp_push_CHALLENGE_MESSAGE(DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const struct CHALLENGE_MESSAGE *r)
{
- NTLMSSP_PUSH_MESSAGE(CHALLENGE_MESSAGE, blob, mem_ctx, ic, r);
+ NTLMSSP_PUSH_MESSAGE(CHALLENGE_MESSAGE, blob, mem_ctx, r);
}
/**
@@ -138,8 +133,7 @@ NTSTATUS ntlmssp_push_CHALLENGE_MESSAGE(DATA_BLOB *blob,
NTSTATUS ntlmssp_push_AUTHENTICATE_MESSAGE(DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const struct AUTHENTICATE_MESSAGE *r)
{
- NTLMSSP_PUSH_MESSAGE(AUTHENTICATE_MESSAGE, blob, mem_ctx, ic, r);
+ NTLMSSP_PUSH_MESSAGE(AUTHENTICATE_MESSAGE, blob, mem_ctx, r);
}
diff --git a/libcli/auth/ntlmssp_ndr.h b/libcli/auth/ntlmssp_ndr.h
index 52990b2a56..e61923170e 100644
--- a/libcli/auth/ntlmssp_ndr.h
+++ b/libcli/auth/ntlmssp_ndr.h
@@ -20,25 +20,19 @@
NTSTATUS ntlmssp_pull_NEGOTIATE_MESSAGE(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct NEGOTIATE_MESSAGE *r);
NTSTATUS ntlmssp_pull_CHALLENGE_MESSAGE(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct CHALLENGE_MESSAGE *r);
NTSTATUS ntlmssp_pull_AUTHENTICATE_MESSAGE(const DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct AUTHENTICATE_MESSAGE *r);
NTSTATUS ntlmssp_push_NEGOTIATE_MESSAGE(DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const struct NEGOTIATE_MESSAGE *r);
NTSTATUS ntlmssp_push_CHALLENGE_MESSAGE(DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const struct CHALLENGE_MESSAGE *r);
NTSTATUS ntlmssp_push_AUTHENTICATE_MESSAGE(DATA_BLOB *blob,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const struct AUTHENTICATE_MESSAGE *r);
diff --git a/libcli/auth/schannel_state.h b/libcli/auth/schannel_state.h
index d378a39d8f..017fdbe28d 100644
--- a/libcli/auth/schannel_state.h
+++ b/libcli/auth/schannel_state.h
@@ -24,18 +24,15 @@
#define _LIBCLI_AUTH_SCHANNEL_STATE_H__
NTSTATUS schannel_get_creds_state(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const char *db_priv_dir,
const char *computer_name,
struct netlogon_creds_CredentialState **creds);
NTSTATUS schannel_save_creds_state(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const char *db_priv_dir,
struct netlogon_creds_CredentialState *creds);
NTSTATUS schannel_check_creds_state(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const char *db_priv_dir,
const char *computer_name,
struct netr_Authenticator *received_authenticator,
diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c
index 3f6618c744..9e767810a1 100644
--- a/libcli/auth/schannel_state_tdb.c
+++ b/libcli/auth/schannel_state_tdb.c
@@ -103,7 +103,6 @@ static struct tdb_wrap *open_schannel_session_store(TALLOC_CTX *mem_ctx,
static
NTSTATUS schannel_store_session_key_tdb(struct tdb_wrap *tdb_sc,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct netlogon_creds_CredentialState *creds)
{
enum ndr_err_code ndr_err;
@@ -125,7 +124,7 @@ NTSTATUS schannel_store_session_key_tdb(struct tdb_wrap *tdb_sc,
return NT_STATUS_NO_MEMORY;
}
- ndr_err = ndr_push_struct_blob(&blob, mem_ctx, ic, creds,
+ ndr_err = ndr_push_struct_blob(&blob, mem_ctx, creds,
(ndr_push_flags_fn_t)ndr_push_netlogon_creds_CredentialState);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(keystr);
@@ -161,7 +160,6 @@ NTSTATUS schannel_store_session_key_tdb(struct tdb_wrap *tdb_sc,
static
NTSTATUS schannel_fetch_session_key_tdb(struct tdb_wrap *tdb_sc,
TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const char *computer_name,
struct netlogon_creds_CredentialState **pcreds)
{
@@ -203,7 +201,7 @@ NTSTATUS schannel_fetch_session_key_tdb(struct tdb_wrap *tdb_sc,
blob = data_blob_const(value.dptr, value.dsize);
- ndr_err = ndr_pull_struct_blob(&blob, creds, ic, creds,
+ ndr_err = ndr_pull_struct_blob(&blob, creds, creds,
(ndr_pull_flags_fn_t)ndr_pull_netlogon_creds_CredentialState);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -240,7 +238,6 @@ NTSTATUS schannel_fetch_session_key_tdb(struct tdb_wrap *tdb_sc,
*******************************************************************************/
NTSTATUS schannel_get_creds_state(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const char *db_priv_dir,
const char *computer_name,
struct netlogon_creds_CredentialState **_creds)
@@ -260,7 +257,7 @@ NTSTATUS schannel_get_creds_state(TALLOC_CTX *mem_ctx,
return NT_STATUS_ACCESS_DENIED;
}
- status = schannel_fetch_session_key_tdb(tdb_sc, tmpctx, ic,
+ status = schannel_fetch_session_key_tdb(tdb_sc, tmpctx,
computer_name, &creds);
if (NT_STATUS_IS_OK(status)) {
*_creds = talloc_steal(mem_ctx, creds);
@@ -279,7 +276,6 @@ NTSTATUS schannel_get_creds_state(TALLOC_CTX *mem_ctx,
*******************************************************************************/
NTSTATUS schannel_save_creds_state(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const char *db_priv_dir,
struct netlogon_creds_CredentialState *creds)
{
@@ -297,7 +293,7 @@ NTSTATUS schannel_save_creds_state(TALLOC_CTX *mem_ctx,
return NT_STATUS_ACCESS_DENIED;
}
- status = schannel_store_session_key_tdb(tdb_sc, tmpctx, ic, creds);
+ status = schannel_store_session_key_tdb(tdb_sc, tmpctx, creds);
talloc_free(tmpctx);
return status;
@@ -314,7 +310,6 @@ NTSTATUS schannel_save_creds_state(TALLOC_CTX *mem_ctx,
********************************************************************/
NTSTATUS schannel_check_creds_state(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const char *db_priv_dir,
const char *computer_name,
struct netr_Authenticator *received_authenticator,
@@ -348,7 +343,7 @@ NTSTATUS schannel_check_creds_state(TALLOC_CTX *mem_ctx,
* disconnects) we must update the database every time we
* update the structure */
- status = schannel_fetch_session_key_tdb(tdb_sc, tmpctx, ic,
+ status = schannel_fetch_session_key_tdb(tdb_sc, tmpctx,
computer_name, &creds);
if (!NT_STATUS_IS_OK(status)) {
tdb_transaction_cancel(tdb_sc->tdb);
@@ -363,7 +358,7 @@ NTSTATUS schannel_check_creds_state(TALLOC_CTX *mem_ctx,
goto done;
}
- status = schannel_store_session_key_tdb(tdb_sc, tmpctx, ic, creds);
+ status = schannel_store_session_key_tdb(tdb_sc, tmpctx, creds);
if (!NT_STATUS_IS_OK(status)) {
tdb_transaction_cancel(tdb_sc->tdb);
goto done;
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c
index 191d0eeee4..896319e75c 100644
--- a/libcli/cldap/cldap.c
+++ b/libcli/cldap/cldap.c
@@ -946,7 +946,6 @@ static void cldap_netlogon_state_done(struct tevent_req *subreq)
receive a cldap netlogon reply
*/
NTSTATUS cldap_netlogon_recv(struct tevent_req *req,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct cldap_netlogon *io)
{
@@ -974,7 +973,6 @@ NTSTATUS cldap_netlogon_recv(struct tevent_req *req,
data = state->search.out.response->attributes[0].values;
status = pull_netlogon_samlogon_response(data, mem_ctx,
- iconv_convenience,
&io->out.netlogon);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
@@ -994,7 +992,6 @@ failed:
sync cldap netlogon search
*/
NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct cldap_netlogon *io)
{
@@ -1017,7 +1014,7 @@ NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
return NT_STATUS_INTERNAL_ERROR;
}
- status = cldap_netlogon_recv(req, iconv_convenience, mem_ctx, io);
+ status = cldap_netlogon_recv(req, mem_ctx, io);
talloc_free(req);
return status;
@@ -1081,7 +1078,6 @@ NTSTATUS cldap_error_reply(struct cldap_socket *cldap,
send a netlogon reply
*/
NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap,
- struct smb_iconv_convenience *iconv_convenience,
uint32_t message_id,
struct tsocket_address *dest,
uint32_t version,
@@ -1095,7 +1091,6 @@ NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap,
DATA_BLOB blob;
status = push_netlogon_samlogon_response(&blob, tmp_ctx,
- iconv_convenience,
netlogon);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(tmp_ctx);
diff --git a/libcli/cldap/cldap.h b/libcli/cldap/cldap.h
index 111fa2cfc4..d05e5b9936 100644
--- a/libcli/cldap/cldap.h
+++ b/libcli/cldap/cldap.h
@@ -116,16 +116,13 @@ struct tevent_req *cldap_netlogon_send(TALLOC_CTX *mem_ctx,
struct cldap_socket *cldap,
const struct cldap_netlogon *io);
NTSTATUS cldap_netlogon_recv(struct tevent_req *req,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct cldap_netlogon *io);
NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct cldap_netlogon *io);
NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap,
- struct smb_iconv_convenience *iconv_convenience,
uint32_t message_id,
struct tsocket_address *dst,
uint32_t version,
diff --git a/libcli/ldap/ldap_ndr.c b/libcli/ldap/ldap_ndr.c
index c176d0e1e0..3b40fbba25 100644
--- a/libcli/ldap/ldap_ndr.c
+++ b/libcli/ldap/ldap_ndr.c
@@ -51,7 +51,7 @@ char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
DATA_BLOB blob;
enum ndr_err_code ndr_err;
char *ret;
- ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, sid,
+ ndr_err = ndr_push_struct_blob(&blob, mem_ctx, sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return NULL;
@@ -89,7 +89,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, NULL, guid,
+ ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, guid,
(ndr_pull_flags_fn_t)ndr_pull_GUID);
talloc_free(val.data);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/libcli/named_pipe_auth/npa_tstream.c b/libcli/named_pipe_auth/npa_tstream.c
index b41fa3eb6d..20228a2df2 100644
--- a/libcli/named_pipe_auth/npa_tstream.c
+++ b/libcli/named_pipe_auth/npa_tstream.c
@@ -39,7 +39,6 @@ struct tstream_npa {
struct tstream_npa_connect_state {
struct {
struct tevent_context *ev;
- struct smb_iconv_convenience *smb_iconv_c;
} caller;
const char *unix_path;
@@ -59,7 +58,6 @@ static void tstream_npa_connect_unix_done(struct tevent_req *subreq);
struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct smb_iconv_convenience *smb_iconv_c,
const char *directory,
const char *npipe,
const struct tsocket_address *client,
@@ -83,7 +81,6 @@ struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
}
state->caller.ev = ev;
- state->caller.smb_iconv_c = smb_iconv_c;
state->unix_path = talloc_asprintf(state, "%s/%s",
directory,
@@ -161,7 +158,7 @@ struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
}
ndr_err = ndr_push_struct_blob(&state->auth_req_blob,
- state, smb_iconv_c, &state->auth_req,
+ state, &state->auth_req,
(ndr_push_flags_fn_t)ndr_push_named_pipe_auth_req);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
tevent_req_error(req, EINVAL);
@@ -343,7 +340,7 @@ static void tstream_npa_connect_readv_done(struct tevent_req *subreq)
ndr_err = ndr_pull_struct_blob(
&state->auth_rep_blob, state,
- state->caller.smb_iconv_c, &state->auth_rep,
+ &state->auth_rep,
(ndr_pull_flags_fn_t)ndr_pull_named_pipe_auth_rep);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/libcli/named_pipe_auth/npa_tstream.h b/libcli/named_pipe_auth/npa_tstream.h
index bff010f094..7a19e10410 100644
--- a/libcli/named_pipe_auth/npa_tstream.h
+++ b/libcli/named_pipe_auth/npa_tstream.h
@@ -26,7 +26,6 @@ struct netr_SamInfo3;
struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct smb_iconv_convenience *smb_iconv_c,
const char *directory,
const char *npipe,
const struct tsocket_address *client,
diff --git a/libcli/nbt/libnbt.h b/libcli/nbt/libnbt.h
index e150b35566..6165548320 100644
--- a/libcli/nbt/libnbt.h
+++ b/libcli/nbt/libnbt.h
@@ -95,7 +95,6 @@ struct nbt_name_request {
struct nbt_name_socket {
struct socket_context *sock;
struct tevent_context *event_ctx;
- struct smb_iconv_convenience *iconv_convenience;
/* a queue of requests pending to be sent */
struct nbt_name_request *send_queue;
@@ -275,8 +274,7 @@ struct nbt_name_release {
};
struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *event_ctx,
- struct smb_iconv_convenience *iconv_convenience);
+ struct tevent_context *event_ctx);
void nbt_name_socket_handle_response_packet(struct nbt_name_request *req,
struct nbt_name_packet *packet,
struct socket_address *src);
@@ -294,7 +292,7 @@ NTSTATUS nbt_name_status(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_status *io);
NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname);
-NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, DATA_BLOB *blob, struct nbt_name *name);
+NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name);
NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name);
void nbt_choose_called_name(TALLOC_CTX *mem_ctx, struct nbt_name *n, const char *name, int type);
char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name);
diff --git a/libcli/nbt/nbtname.c b/libcli/nbt/nbtname.c
index 385905abf1..3f0a1228e7 100644
--- a/libcli/nbt/nbtname.c
+++ b/libcli/nbt/nbtname.c
@@ -381,11 +381,11 @@ _PUBLIC_ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struc
/**
push a nbt name into a blob
*/
-_PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, DATA_BLOB *blob, struct nbt_name *name)
+_PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name)
{
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(blob, mem_ctx, iconv_convenience, name, (ndr_push_flags_fn_t)ndr_push_nbt_name);
+ ndr_err = ndr_push_struct_blob(blob, mem_ctx, name, (ndr_push_flags_fn_t)ndr_push_nbt_name);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
}
@@ -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, NULL, name,
+ ndr_err = ndr_pull_struct_blob(blob, mem_ctx, 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/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c
index d9bc72e499..2b792c5e2d 100644
--- a/libcli/nbt/nbtsocket.c
+++ b/libcli/nbt/nbtsocket.c
@@ -191,7 +191,7 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
}
/* parse the request */
- ndr_err = ndr_pull_struct_blob(&blob, packet, nbtsock->iconv_convenience, packet,
+ ndr_err = ndr_pull_struct_blob(&blob, packet, 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);
@@ -332,8 +332,7 @@ static void nbt_name_socket_handler(struct tevent_context *ev, struct tevent_fd
then operations will use that event context
*/
_PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *event_ctx,
- struct smb_iconv_convenience *iconv_convenience)
+ struct tevent_context *event_ctx)
{
struct nbt_name_socket *nbtsock;
NTSTATUS status;
@@ -358,7 +357,6 @@ _PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
nbtsock->num_pending = 0;
nbtsock->incoming.handler = NULL;
nbtsock->unexpected.handler = NULL;
- nbtsock->iconv_convenience = iconv_convenience;
nbtsock->fde = event_add_fd(nbtsock->event_ctx, nbtsock,
socket_get_fd(nbtsock->sock), 0,
@@ -416,7 +414,6 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock,
talloc_set_destructor(req, nbt_name_request_destructor);
ndr_err = ndr_push_struct_blob(&req->encoded, req,
- req->nbtsock->iconv_convenience,
request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) goto failed;
@@ -465,7 +462,6 @@ _PUBLIC_ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
}
ndr_err = ndr_push_struct_blob(&req->encoded, req,
- req->nbtsock->iconv_convenience,
request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c
index 425ad13c6d..dbb4d18237 100644
--- a/libcli/nbt/pynbt.c
+++ b/libcli/nbt/pynbt.c
@@ -52,7 +52,7 @@ static PyObject *py_nbt_node_init(PyTypeObject *self, PyObject *args, PyObject *
return NULL;
ev = s4_event_context_init(ret->mem_ctx);
- ret->socket = nbt_name_socket_init(ret->mem_ctx, ev, py_iconv_convenience(ret->mem_ctx));
+ ret->socket = nbt_name_socket_init(ret->mem_ctx, ev);
return (PyObject *)ret;
}
@@ -124,7 +124,7 @@ static bool PyObject_AsNBTName(PyObject *obj, struct nbt_name_socket *name_socke
return false;
}
-static PyObject *PyObject_FromNBTName(struct nbt_name_socket *name_socket, struct smb_iconv_convenience *ic,
+static PyObject *PyObject_FromNBTName(struct nbt_name_socket *name_socket,
struct nbt_name *name)
{
if (name->scope) {
@@ -175,7 +175,7 @@ static PyObject *py_nbt_name_query(PyObject *self, PyObject *args, PyObject *kwa
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(node->socket), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
@@ -233,7 +233,7 @@ static PyObject *py_nbt_name_status(PyObject *self, PyObject *args, PyObject *kw
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
@@ -296,7 +296,7 @@ static PyObject *py_nbt_name_register(PyObject *self, PyObject *args, PyObject *
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
@@ -351,7 +351,7 @@ static PyObject *py_nbt_name_refresh(PyObject *self, PyObject *args, PyObject *k
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
diff --git a/libcli/nbt/tools/nmblookup.c b/libcli/nbt/tools/nmblookup.c
index 96023f64c3..b756c1e30c 100644
--- a/libcli/nbt/tools/nmblookup.c
+++ b/libcli/nbt/tools/nmblookup.c
@@ -212,7 +212,7 @@ static bool process_one(struct loadparm_context *lp_ctx, struct tevent_context *
node_name = talloc_strdup(tmp_ctx, name);
}
- nbtsock = nbt_name_socket_init(tmp_ctx, ev, lp_iconv_convenience(lp_ctx));
+ nbtsock = nbt_name_socket_init(tmp_ctx, ev);
if (options.root_port) {
all_zero_addr = socket_address_from_strings(tmp_ctx, nbtsock->sock->backend_name,
diff --git a/libcli/ndr_netlogon.c b/libcli/ndr_netlogon.c
index 1c6b2bccb6..d15154d2c9 100644
--- a/libcli/ndr_netlogon.c
+++ b/libcli/ndr_netlogon.c
@@ -137,12 +137,12 @@ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags(struct ndr_
NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site));
NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site));
if (r->nt_version & NETLOGON_NT_VERSION_5EX_WITH_IP) {
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->iconv_convenience, ndr->flags)));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
{
struct ndr_push *_ndr_sockaddr;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->iconv_convenience, ndr->flags)));
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
NDR_CHECK(ndr_push_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS|NDR_BUFFERS, &r->sockaddr));
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->iconv_convenience, ndr->flags)));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
}
}
if (r->nt_version & NETLOGON_NT_VERSION_WITH_CLOSEST_SITE) {
diff --git a/libcli/netlogon.c b/libcli/netlogon.c
index 9ad941cfb6..e32842ec0a 100644
--- a/libcli/netlogon.c
+++ b/libcli/netlogon.c
@@ -30,23 +30,19 @@
#define DEBUGLEVEL 0
NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct netlogon_samlogon_response *response)
{
enum ndr_err_code ndr_err;
if (response->ntver == NETLOGON_NT_VERSION_1) {
ndr_err = ndr_push_struct_blob(data, mem_ctx,
- iconv_convenience,
&response->data.nt4,
(ndr_push_flags_fn_t)ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40);
} else if (response->ntver & NETLOGON_NT_VERSION_5EX) {
ndr_err = ndr_push_struct_blob(data, mem_ctx,
- iconv_convenience,
&response->data.nt5_ex,
(ndr_push_flags_fn_t)ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags);
} else if (response->ntver & NETLOGON_NT_VERSION_5) {
ndr_err = ndr_push_struct_blob(data, mem_ctx,
- iconv_convenience,
&response->data.nt5,
(ndr_push_flags_fn_t)ndr_push_NETLOGON_SAM_LOGON_RESPONSE);
} else {
@@ -62,7 +58,6 @@ NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
}
NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct netlogon_samlogon_response *response)
{
uint32_t ntver;
@@ -85,7 +80,6 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
if (ntver == NETLOGON_NT_VERSION_1) {
ndr_err = ndr_pull_struct_blob_all(data, mem_ctx,
- iconv_convenience,
&response->data.nt4,
(ndr_pull_flags_fn_t)ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40);
response->ntver = NETLOGON_NT_VERSION_1;
@@ -96,7 +90,7 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
} else if (ntver & NETLOGON_NT_VERSION_5EX) {
struct ndr_pull *ndr;
- ndr = ndr_pull_init_blob(data, mem_ctx, iconv_convenience);
+ ndr = ndr_pull_init_blob(data, mem_ctx);
if (!ndr) {
return NT_STATUS_NO_MEMORY;
}
@@ -116,7 +110,6 @@ NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
} else if (ntver & NETLOGON_NT_VERSION_5) {
ndr_err = ndr_pull_struct_blob_all(data, mem_ctx,
- iconv_convenience,
&response->data.nt5,
(ndr_pull_flags_fn_t)ndr_pull_NETLOGON_SAM_LOGON_RESPONSE);
response->ntver = NETLOGON_NT_VERSION_5;
@@ -183,7 +176,6 @@ void map_netlogon_samlogon_response(struct netlogon_samlogon_response *response)
}
NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct nbt_netlogon_response *response)
{
NTSTATUS status = NT_STATUS_INVALID_NETWORK_RESPONSE;
@@ -191,7 +183,6 @@ NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
switch (response->response_type) {
case NETLOGON_GET_PDC:
ndr_err = ndr_push_struct_blob(data, mem_ctx,
- iconv_convenience,
&response->data.get_pdc,
(ndr_push_flags_fn_t)ndr_push_nbt_netlogon_response_from_pdc);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -207,7 +198,7 @@ NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
break;
case NETLOGON_SAMLOGON:
status = push_netlogon_samlogon_response(
- data, mem_ctx, iconv_convenience,
+ data, mem_ctx,
&response->data.samlogon);
break;
}
@@ -216,7 +207,6 @@ NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct nbt_netlogon_response *response)
{
NTSTATUS status = NT_STATUS_INVALID_NETWORK_RESPONSE;
@@ -231,7 +221,6 @@ NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
switch (command) {
case NETLOGON_RESPONSE_FROM_PDC:
ndr_err = ndr_pull_struct_blob_all(data, mem_ctx,
- iconv_convenience,
&response->data.get_pdc,
(ndr_pull_flags_fn_t)ndr_pull_nbt_netlogon_response_from_pdc);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -253,7 +242,7 @@ NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
case LOGON_SAM_LOGON_PAUSE_RESPONSE_EX:
case LOGON_SAM_LOGON_USER_UNKNOWN_EX:
status = pull_netlogon_samlogon_response(
- data, mem_ctx, iconv_convenience,
+ data, mem_ctx,
&response->data.samlogon);
response->response_type = NETLOGON_SAMLOGON;
break;
diff --git a/libcli/netlogon_proto.h b/libcli/netlogon_proto.h
index 905feed876..53c7d004ee 100644
--- a/libcli/netlogon_proto.h
+++ b/libcli/netlogon_proto.h
@@ -13,17 +13,13 @@
/* The following definitions come from ../libcli/netlogon.c */
NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct netlogon_samlogon_response *response);
NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct netlogon_samlogon_response *response);
void map_netlogon_samlogon_response(struct netlogon_samlogon_response *response);
NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct nbt_netlogon_response *response);
NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct nbt_netlogon_response *response);
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)
diff --git a/libcli/registry/util_reg.c b/libcli/registry/util_reg.c
index 6ab2be0a11..3a1168f615 100644
--- a/libcli/registry/util_reg.c
+++ b/libcli/registry/util_reg.c
@@ -75,13 +75,12 @@ _PUBLIC_ int regtype_by_string(const char *str)
push a string in unix charset into a REG_SZ UCS2 null terminated blob
********************************************************************/
-bool push_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- DATA_BLOB *blob, const char *s)
+bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
data.string = s;
- ndr_err = ndr_push_union_blob(blob, mem_ctx, ic, &data, REG_SZ,
+ ndr_err = ndr_push_union_blob(blob, mem_ctx, &data, REG_SZ,
(ndr_push_flags_fn_t)ndr_push_winreg_Data);
return NDR_ERR_CODE_IS_SUCCESS(ndr_err);
}
@@ -91,13 +90,12 @@ bool push_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
terminated blob
********************************************************************/
-bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- DATA_BLOB *blob, const char **a)
+bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
data.string_array = a;
- ndr_err = ndr_push_union_blob(blob, mem_ctx, ic, &data, REG_MULTI_SZ,
+ ndr_err = ndr_push_union_blob(blob, mem_ctx, &data, REG_MULTI_SZ,
(ndr_push_flags_fn_t)ndr_push_winreg_Data);
return NDR_ERR_CODE_IS_SUCCESS(ndr_err);
}
@@ -106,12 +104,11 @@ bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
pull a string in unix charset out of a REG_SZ UCS2 null terminated blob
********************************************************************/
-bool pull_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- const DATA_BLOB *blob, const char **s)
+bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_union_blob(blob, mem_ctx, ic, &data, REG_SZ,
+ ndr_err = ndr_pull_union_blob(blob, mem_ctx, &data, REG_SZ,
(ndr_pull_flags_fn_t)ndr_pull_winreg_Data);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
@@ -125,12 +122,12 @@ bool pull_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
terminated blob
********************************************************************/
-bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx,
const DATA_BLOB *blob, const char ***a)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_union_blob(blob, mem_ctx, ic, &data, REG_MULTI_SZ,
+ ndr_err = ndr_pull_union_blob(blob, mem_ctx, &data, REG_MULTI_SZ,
(ndr_pull_flags_fn_t)ndr_pull_winreg_Data);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
diff --git a/libcli/samsync/decrypt.c b/libcli/samsync/decrypt.c
index b3fab712bc..117151e887 100644
--- a/libcli/samsync/decrypt.c
+++ b/libcli/samsync/decrypt.c
@@ -79,7 +79,7 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
user->user_private_info.SensitiveData = data.data;
user->user_private_info.DataLength = data.length;
- ndr_err = ndr_pull_struct_blob(&data, mem_ctx, NULL, &keys,
+ ndr_err = ndr_pull_struct_blob(&data, mem_ctx, &keys,
(ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
dump_data(10, data.data, data.length);
diff --git a/libcli/security/secace.c b/libcli/security/secace.c
index 8a73a6ab94..2ee5bfaee5 100644
--- a/libcli/security/secace.c
+++ b/libcli/security/secace.c
@@ -63,7 +63,7 @@ void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum securi
{
t->type = type;
t->flags = flag;
- t->size = ndr_size_dom_sid(sid, NULL, 0) + 8;
+ t->size = ndr_size_dom_sid(sid, 0) + 8;
t->access_mask = mask;
t->trustee = *sid;
@@ -89,7 +89,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct s
(*pp_new)[i].type = SEC_ACE_TYPE_ACCESS_ALLOWED;
(*pp_new)[i].flags = 0;
- (*pp_new)[i].size = SEC_ACE_HEADER_SIZE + ndr_size_dom_sid(sid, NULL, 0);
+ (*pp_new)[i].size = SEC_ACE_HEADER_SIZE + ndr_size_dom_sid(sid, 0);
(*pp_new)[i].access_mask = mask;
(*pp_new)[i].trustee = *sid;
return NT_STATUS_OK;
diff --git a/librpc/idl/drsblobs.idl b/librpc/idl/drsblobs.idl
index 89b5760823..1b4649cff9 100644
--- a/librpc/idl/drsblobs.idl
+++ b/librpc/idl/drsblobs.idl
@@ -92,13 +92,13 @@ interface drsblobs {
typedef [public,gensize,flag(NDR_PAHEX)] struct {
/* this includes the 8 bytes of the repsFromToBlob header */
- [value(ndr_size_repsFromTo1(this, ndr->iconv_convenience, ndr->flags)+8)] uint32 blobsize;
+ [value(ndr_size_repsFromTo1(this, ndr->flags)+8)] uint32 blobsize;
uint32 consecutive_sync_failures;
NTTIME_1sec last_success;
NTTIME_1sec last_attempt;
WERROR result_last_attempt;
[relative] repsFromTo1OtherInfo *other_info;
- [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->iconv_convenience, ndr->flags))] uint32 other_info_length;
+ [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
drsuapi_DrsOptions replica_flags;
uint8 schedule[84];
[value(0)] uint32 reserved;
@@ -109,7 +109,7 @@ interface drsblobs {
} repsFromTo1;
typedef [public,relative_base,gensize] struct {
- [value(ndr_size_repsFromTo2OtherInfo(this,ndr->iconv_convenience, ndr->flags))]
+ [value(ndr_size_repsFromTo2OtherInfo(this,ndr->flags))]
uint32 __ndr_size;
[relative] nstring *dns_name1;
uint32 unknown1;
@@ -119,13 +119,13 @@ interface drsblobs {
typedef [public,gensize,flag(NDR_PAHEX)] struct {
/* this includes the 8 bytes of the repsFromToBlob header */
- [value(ndr_size_repsFromTo2(this, ndr->iconv_convenience, ndr->flags)+8)] uint32 blobsize;
+ [value(ndr_size_repsFromTo2(this, ndr->flags)+8)] uint32 blobsize;
uint32 consecutive_sync_failures;
NTTIME_1sec last_success;
NTTIME_1sec last_attempt;
WERROR result_last_attempt;
[relative] repsFromTo2OtherInfo *other_info;
- [value(ndr_size_repsFromTo2OtherInfo(other_info, ndr->iconv_convenience, ndr->flags))] uint32 other_info_length;
+ [value(ndr_size_repsFromTo2OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
drsuapi_DrsOptions replica_flags;
uint8 schedule[84];
[value(0)] uint32 reserved;
@@ -209,7 +209,7 @@ interface drsblobs {
typedef [public,gensize] struct {
uint32 num_entries;
- [value(ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->flags))] uint32 __ndr_size;
drsuapi_MSPrefixMap_Entry entries[num_entries];
} drsuapi_MSPrefixMap_Ctr;
@@ -255,7 +255,7 @@ interface drsblobs {
NTTIME time;
uint32 u2;
uint32 u3;
- [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, ndr->iconv_convenience, 0))]
+ [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))]
uint32 extra_length;
drsuapi_DsReplicaHighWaterMark highwatermark;
GUID guid1;
@@ -316,7 +316,7 @@ interface drsblobs {
typedef [public] struct {
[value(0)] uint32 unknown1;
- [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
+ [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->flags))] uint32 __ndr_size;
[value(0)] uint32 unknown2;
[subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
[value(0)] uint8 unknown3;
@@ -499,8 +499,8 @@ interface drsblobs {
uint8 confounder[512];
[subcontext(0),subcontext_size(outgoing_size)] trustCurrentPasswords outgoing;
[subcontext(0),subcontext_size(incoming_size)] trustCurrentPasswords incoming;
- [value(ndr_size_trustCurrentPasswords(&outgoing, ndr->iconv_convenience, ndr->flags))] uint32 outgoing_size;
- [value(ndr_size_trustCurrentPasswords(&incoming, ndr->iconv_convenience, ndr->flags))] uint32 incoming_size;
+ [value(ndr_size_trustCurrentPasswords(&outgoing, ndr->flags))] uint32 outgoing_size;
+ [value(ndr_size_trustCurrentPasswords(&incoming, ndr->flags))] uint32 incoming_size;
} trustDomainPasswords;
[nopython] void decode_trustDomainPasswords(
@@ -631,7 +631,7 @@ interface drsblobs {
} ForestTrustInfoRecord;
typedef [flag(NDR_NOALIGN)] struct {
- [value(ndr_size_ForestTrustInfoRecord(&record, ndr->iconv_convenience, ndr->flags))] uint32 record_size;
+ [value(ndr_size_ForestTrustInfoRecord(&record, ndr->flags))] uint32 record_size;
ForestTrustInfoRecord record;
} ForestTrustInfoRecordArmor;
diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl
index 97ae9641f0..ef6ffef4b3 100644
--- a/librpc/idl/drsuapi.idl
+++ b/librpc/idl/drsuapi.idl
@@ -186,7 +186,7 @@ interface drsuapi
/*****************/
/* Function 0x02 */
typedef [public,gensize] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->iconv_convenience, ndr->flags)-4)] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid, ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
@@ -532,7 +532,7 @@ interface drsuapi
/* DN String values */
typedef [public,gensize] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
@@ -541,7 +541,7 @@ interface drsuapi
} drsuapi_DsReplicaObjectIdentifier3;
typedef [public] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags))] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
@@ -604,7 +604,7 @@ interface drsuapi
drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */
uint32 object_count;
/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
- [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->iconv_convenience,ndr->flags)+55)] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
drsuapi_DsReplicaObjectListItemEx *first_object;
boolean32 more_data;
} drsuapi_DsGetNCChangesCtr1;
@@ -638,7 +638,7 @@ interface drsuapi
drsuapi_DsExtendedError extended_ret;
uint32 object_count;
/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
- [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->iconv_convenience,ndr->flags)+55)] uint32 __ndr_size;
+ [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
drsuapi_DsReplicaObjectListItemEx *first_object;
boolean32 more_data;
uint32 nc_object_count; /* estimated amount of objects in the whole NC */
diff --git a/librpc/idl/epmapper.idl b/librpc/idl/epmapper.idl
index 3d9113892b..25b9517a8e 100644
--- a/librpc/idl/epmapper.idl
+++ b/librpc/idl/epmapper.idl
@@ -216,7 +216,7 @@ interface epmapper
} epm_tower;
typedef struct {
- [value(ndr_size_epm_tower(&tower, ndr->iconv_convenience, ndr->flags))] uint32 tower_length;
+ [value(ndr_size_epm_tower(&tower, ndr->flags))] uint32 tower_length;
[subcontext(4)] epm_tower tower;
} epm_twr_t;
diff --git a/librpc/idl/frsrpc.idl b/librpc/idl/frsrpc.idl
index 996c375aa8..e85042c27c 100644
--- a/librpc/idl/frsrpc.idl
+++ b/librpc/idl/frsrpc.idl
@@ -338,7 +338,7 @@ interface frsrpc
[value(1)] uint32 cs_id;
[value(pkt_len+12)] uint32 memory_len;
[value(ndr_size_frsrpc_CommPktChunkCtr(r->ctr,
- ndr->iconv_convenience, ndr->flags))]
+ ndr->flags))]
[range(0, 262144)]
uint32 pkt_len;
[value(0)] uint32 upk_len;
diff --git a/librpc/idl/named_pipe_auth.idl b/librpc/idl/named_pipe_auth.idl
index 43db989327..e2928515ba 100644
--- a/librpc/idl/named_pipe_auth.idl
+++ b/librpc/idl/named_pipe_auth.idl
@@ -48,7 +48,7 @@ interface named_pipe_auth
typedef [public,gensize] struct {
[flag(NDR_BIG_ENDIAN),
- value(ndr_size_named_pipe_auth_req(r,ndr->iconv_convenience,ndr->flags)-4)]
+ value(ndr_size_named_pipe_auth_req(r,ndr->flags)-4)]
uint32 length;
[charset(DOS),value(NAMED_PIPE_AUTH_MAGIC)] uint8 magic[4];
uint32 level;
@@ -76,7 +76,7 @@ interface named_pipe_auth
typedef [public,gensize] struct {
[flag(NDR_BIG_ENDIAN),
- value(ndr_size_named_pipe_auth_rep(r,ndr->iconv_convenience,ndr->flags)-4)]
+ value(ndr_size_named_pipe_auth_rep(r,ndr->flags)-4)]
uint32 length;
[charset(DOS),value(NAMED_PIPE_AUTH_MAGIC)] uint8 magic[4];
uint32 level;
diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl
index 6d9f9b5557..897abb26e4 100644
--- a/librpc/idl/nbt.idl
+++ b/librpc/idl/nbt.idl
@@ -458,7 +458,7 @@ interface nbt
nbt_string client_site;
/* Optional on NETLOGON_NT_VERSION_5EX_WITH_IP */
- [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->iconv_convenience, ndr->flags))] uint8 sockaddr_size;
+ [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->flags))] uint8 sockaddr_size;
[subcontext(0),subcontext_size(sockaddr_size)] nbt_sockaddr sockaddr;
/* Optional on NETLOGON_NT_VERSION_WITH_CLOSEST_SITE */
diff --git a/librpc/idl/netlogon.idl b/librpc/idl/netlogon.idl
index d66b2194ca..4bebb83374 100644
--- a/librpc/idl/netlogon.idl
+++ b/librpc/idl/netlogon.idl
@@ -1056,7 +1056,7 @@ interface netlogon
[in] [subcontext(4)/*,subcontext_size(change_log_entry_size)*/]
netr_ChangeLogEntry change_log_entry,
[in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,
- ndr->iconv_convenience, ndr->flags))]
+ ndr->flags))]
uint32 change_log_entry_size,
[out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array
);
diff --git a/librpc/idl/ntlmssp.idl b/librpc/idl/ntlmssp.idl
index 8cabec33da..1227952ff2 100644
--- a/librpc/idl/ntlmssp.idl
+++ b/librpc/idl/ntlmssp.idl
@@ -162,7 +162,7 @@ interface ntlmssp
typedef [public,flag(NDR_NOALIGN)] struct {
ntlmssp_AvId AvId;
- [value(ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, ndr->iconv_convenience, 0))] uint16 AvLen;
+ [value(ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, 0))] uint16 AvLen;
[subcontext(0),subcontext_size(AvLen),switch_is(AvId)] ntlmssp_AvValue Value;
} AV_PAIR;
@@ -182,7 +182,7 @@ interface ntlmssp
NEGOTIATE NegotiateFlags;
uint8 ServerChallenge[8];
uint8 Reserved[8];
- [value(ndr_size_AV_PAIR_LIST(TargetInfo, ndr->iconv_convenience, ndr->flags))] uint16 TargetInfoLen;
+ [value(ndr_size_AV_PAIR_LIST(TargetInfo, ndr->flags))] uint16 TargetInfoLen;
[value(TargetInfoLen)] uint16 TargetNameInfoMaxLen;
[relative] [subcontext(0),subcontext_size(TargetInfoLen)] AV_PAIR_LIST *TargetInfo;
[switch_is(NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION)] ntlmssp_Version Version;
diff --git a/librpc/idl/security.idl b/librpc/idl/security.idl
index 740a928d87..fb1dc0dcc0 100644
--- a/librpc/idl/security.idl
+++ b/librpc/idl/security.idl
@@ -405,7 +405,7 @@ interface security
typedef [public,nopull,gensize,nosize] struct {
security_ace_type type; /* SEC_ACE_TYPE_* */
security_ace_flags flags; /* SEC_ACE_FLAG_* */
- [value(ndr_size_security_ace(r,ndr->iconv_convenience,ndr->flags))] uint16 size;
+ [value(ndr_size_security_ace(r,ndr->flags))] uint16 size;
uint32 access_mask;
[switch_is(type)] security_ace_object_ctr object;
dom_sid trustee;
@@ -420,7 +420,7 @@ interface security
typedef [public,gensize,nosize] struct {
security_acl_revision revision;
- [value(ndr_size_security_acl(r,ndr->iconv_convenience,ndr->flags))] uint16 size;
+ [value(ndr_size_security_acl(r,ndr->flags))] uint16 size;
[range(0,1000)] uint32 num_aces;
security_ace aces[num_aces];
} security_acl;
@@ -462,7 +462,7 @@ interface security
} security_descriptor;
typedef [public] struct {
- [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->iconv_convenience,ndr->flags))] uint32 sd_size;
+ [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->flags))] uint32 sd_size;
[subcontext(4)] security_descriptor *sd;
} sec_desc_buf;
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index c7df80d7ce..028015b696 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -29,7 +29,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
} spoolss_Time;
typedef struct {
- [value(ndr_size_spoolss_Time(time, ndr->iconv_convenience, ndr->flags))] uint32 size;
+ [value(ndr_size_spoolss_Time(time, ndr->flags))] uint32 size;
[unique] spoolss_Time *time;
} spoolss_TimeCtr;
@@ -333,7 +333,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
uint16 caColorfulness;
uint16 caRedGreenTint;
uint16 wCoreJTExpSize;
- [value(ndr_size_spoolss_PSDRVEXTRA(r, ndr->iconv_convenience, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
+ [value(ndr_size_spoolss_PSDRVEXTRA(r, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
uint32 fxScrFreq;
uint32 fxScrAngle;
spoolss_DMPS_Dialect iDialect;
@@ -404,7 +404,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
[value(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA)] spoolss_DM_Signature dwSignature;
[value(0x0022)] uint16 wVer;
uint16 wCoreJTExpSize;
- [value(ndr_size_spoolss_UNIDRVEXTRA(r, ndr->iconv_convenience, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
+ [value(ndr_size_spoolss_UNIDRVEXTRA(r, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
uint16 wOEMExtra;
uint32 dwChecksum32;
spoolss_DMUNI_Flags dwFlags;
@@ -884,7 +884,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
/******************/
/* Function: 0x01 */
typedef struct {
- [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->iconv_convenience, ndr->flags))] uint32 _ndr_size;
+ [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size;
[subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
} spoolss_DevmodeContainer;
@@ -1291,7 +1291,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
/* Function: 0x09 */
typedef [public] struct {
- [value((ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags)-4)/2)] uint32 _ndr_size;
+ [value((ndr_size_spoolss_StringArray(r, ndr->flags)-4)/2)] uint32 _ndr_size;
/*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array string;
} spoolss_StringArray;
@@ -1325,7 +1325,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
[string,charset(UTF16)] uint16 *help_file;
[string,charset(UTF16)] uint16 *monitor_name;
[string,charset(UTF16)] uint16 *default_datatype;
- [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
+ [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
spoolss_StringArray *dependent_files;
} spoolss_AddDriverInfo3;
@@ -1339,9 +1339,9 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
[string,charset(UTF16)] uint16 *help_file;
[string,charset(UTF16)] uint16 *monitor_name;
[string,charset(UTF16)] uint16 *default_datatype;
- [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
+ [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
spoolss_StringArray *dependent_files;
- [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
+ [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
spoolss_StringArray *previous_names;
} spoolss_AddDriverInfo4;
@@ -1371,9 +1371,9 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
[string,charset(UTF16)] uint16 *help_file;
[string,charset(UTF16)] uint16 *monitor_name;
[string,charset(UTF16)] uint16 *default_datatype;
- [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
+ [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
spoolss_StringArray *dependent_files;
- [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
+ [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
spoolss_StringArray *previous_names;
NTTIME driver_date;
hyper driver_version;
@@ -1393,9 +1393,9 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
[string,charset(UTF16)] uint16 *help_file;
[string,charset(UTF16)] uint16 *monitor_name;
[string,charset(UTF16)] uint16 *default_datatype;
- [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
+ [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
spoolss_StringArray *dependent_files;
- [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
+ [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
spoolss_StringArray *previous_names;
NTTIME driver_date;
hyper driver_version;
@@ -1405,11 +1405,11 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
[string,charset(UTF16)] uint16 *provider;
[string,charset(UTF16)] uint16 *print_processor;
[string,charset(UTF16)] uint16 *vendor_setup;
- [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
+ [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
spoolss_StringArray *color_profiles;
[string,charset(UTF16)] uint16 *inf_path;
uint32 printer_driver_attributes;
- [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
+ [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
spoolss_StringArray *core_driver_dependencies;
NTTIME min_inbox_driver_ver_date;
hyper min_inbox_driver_ver_version;
@@ -1826,7 +1826,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool";
typedef [public,gensize] struct {
- [value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
+ [value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size;
uint32 major;
uint32 minor;
uint32 build;
@@ -1835,7 +1835,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
} spoolss_OSVersion;
typedef [public,gensize] struct {
- [value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
+ [value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size;
uint32 major;
uint32 minor;
uint32 build;
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 72e8d21ba4..133a119069 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -60,8 +60,6 @@ struct ndr_pull {
uint32_t data_size;
uint32_t offset;
- struct smb_iconv_convenience *iconv_convenience;
-
uint32_t relative_highest_offset;
uint32_t relative_base_offset;
struct ndr_token_list *relative_base_list;
@@ -97,8 +95,6 @@ struct ndr_push {
/* this is used to ensure we generate unique reference IDs */
uint32_t ptr_count;
-
- struct smb_iconv_convenience *iconv_convenience;
};
/* structure passed to functions that print IDL structures */
@@ -106,7 +102,6 @@ struct ndr_print {
uint32_t flags; /* LIBNDR_FLAG_* */
uint32_t depth;
struct ndr_token_list *switch_list;
- struct smb_iconv_convenience *iconv_convenience;
void (*print)(struct ndr_print *, const char *, ...) PRINTF_ATTRIBUTE(2,3);
void *private_data;
};
@@ -381,10 +376,10 @@ size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
void ndr_print_ipv4_addr(struct ndr_print *ndr, const char *name, const struct in_addr *_ip);
void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1, const struct ndr_syntax_id *i2);
-enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, const void *p, ndr_push_flags_fn_t fn);
-enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, void *p, uint32_t level, ndr_push_flags_fn_t fn);
-size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push, struct smb_iconv_convenience *);
-size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push, struct smb_iconv_convenience *);
+enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p, ndr_push_flags_fn_t fn);
+enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, uint32_t level, ndr_push_flags_fn_t fn);
+size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push);
+size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push);
uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr);
void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset);
enum ndr_err_code ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset);
@@ -402,9 +397,9 @@ enum ndr_err_code ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, ui
enum ndr_err_code ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p);
enum ndr_err_code ndr_pull_relative_ptr_short(struct ndr_pull *ndr, uint16_t *v);
size_t ndr_align_size(uint32_t offset, size_t n);
-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_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
-struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience);
+struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
@@ -459,10 +454,10 @@ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *
uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p);
uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p);
uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p);
-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);
-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);
-enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, void *p, uint32_t level, ndr_pull_flags_fn_t fn);
-enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, void *p, uint32_t level, ndr_pull_flags_fn_t fn);
+enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, ndr_pull_flags_fn_t fn);
+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);
+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);
+enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, uint32_t level, ndr_pull_flags_fn_t fn);
/* from libndr_basic.h */
#define NDR_SCALAR_PROTO(name, type) \
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 90be787526..1600d51c1c 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -58,7 +58,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, struct smb_iconv_convenience *iconv_convenience)
+_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
{
struct ndr_pull *ndr;
@@ -68,7 +68,6 @@ _PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *
ndr->data = blob->data;
ndr->data_size = blob->length;
- ndr->iconv_convenience = talloc_reference(ndr, iconv_convenience);
return ndr;
}
@@ -102,7 +101,7 @@ static enum ndr_err_code ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs)
}
/* create a ndr_push structure, ready for some marshalling */
-_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience)
+_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
{
struct ndr_push *ndr;
@@ -117,7 +116,6 @@ _PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx, struct smb_icon
if (!ndr->data) {
return NULL;
}
- ndr->iconv_convenience = talloc_reference(ndr, iconv_convenience);
return ndr;
}
@@ -256,14 +254,6 @@ _PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name
ndr->depth = 1;
ndr->flags = 0;
- /* this is a s4 hack until we build up the courage to pass
- * this all the way down
- */
-#if _SAMBA_BUILD_ == 4
- ndr->iconv_convenience = smb_iconv_convenience_reinit(talloc_autofree_context(),
- "ASCII", "UTF-8", true, NULL);
-#endif
-
fn(ndr, name, flags, ptr);
talloc_free(ndr);
}
@@ -286,14 +276,6 @@ _PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, c
ndr->depth = 1;
ndr->flags = 0;
- /* this is a s4 hack until we build up the courage to pass
- * this all the way down
- */
-#if _SAMBA_BUILD_ == 4
- ndr->iconv_convenience = smb_iconv_convenience_reinit(talloc_autofree_context(),
- "ASCII", "UTF-8", true, NULL);
-#endif
-
fn(ndr, name, ptr);
ret = talloc_steal(mem_ctx, (char *)ndr->private_data);
failed:
@@ -555,7 +537,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
subndr->data = ndr->data + ndr->offset;
subndr->offset = 0;
subndr->data_size = r_content_size;
- subndr->iconv_convenience = talloc_reference(subndr, ndr->iconv_convenience);
if (force_le) {
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
@@ -591,7 +572,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr,
{
struct ndr_push *subndr;
- subndr = ndr_push_init_ctx(ndr, ndr->iconv_convenience);
+ subndr = ndr_push_init_ctx(ndr);
NDR_ERR_HAVE_NO_MEMORY(subndr);
subndr->flags = ndr->flags & ~LIBNDR_FLAG_NDR64;
@@ -852,11 +833,11 @@ _PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *
/*
pull a struct from a blob using NDR
*/
-_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,
+_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
ndr_pull_flags_fn_t fn)
{
struct ndr_pull *ndr;
- ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
+ ndr = ndr_pull_init_blob(blob, mem_ctx);
NDR_ERR_HAVE_NO_MEMORY(ndr);
NDR_CHECK_FREE(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
talloc_free(ndr);
@@ -867,12 +848,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CT
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,
- struct smb_iconv_convenience *iconv_convenience,
void *p, ndr_pull_flags_fn_t fn)
{
struct ndr_pull *ndr;
uint32_t highest_ofs;
- ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
+ ndr = ndr_pull_init_blob(blob, mem_ctx);
NDR_ERR_HAVE_NO_MEMORY(ndr);
NDR_CHECK_FREE(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
if (ndr->offset > ndr->relative_highest_offset) {
@@ -896,11 +876,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLO
pull a union from a blob using NDR, given the union discriminator
*/
_PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience, void *p,
+ void *p,
uint32_t level, ndr_pull_flags_fn_t fn)
{
struct ndr_pull *ndr;
- ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
+ ndr = ndr_pull_init_blob(blob, mem_ctx);
NDR_ERR_HAVE_NO_MEMORY(ndr);
NDR_CHECK_FREE(ndr_pull_set_switch_value(ndr, p, level));
NDR_CHECK_FREE(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
@@ -913,12 +893,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX
failing if all bytes are not consumed
*/
_PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience, void *p,
+ void *p,
uint32_t level, ndr_pull_flags_fn_t fn)
{
struct ndr_pull *ndr;
uint32_t highest_ofs;
- ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
+ ndr = ndr_pull_init_blob(blob, mem_ctx);
NDR_ERR_HAVE_NO_MEMORY(ndr);
NDR_CHECK_FREE(ndr_pull_set_switch_value(ndr, p, level));
NDR_CHECK_FREE(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
@@ -942,10 +922,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC
/*
push a struct to a blob using NDR
*/
-_PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, const void *p, ndr_push_flags_fn_t fn)
+_PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p, ndr_push_flags_fn_t fn)
{
struct ndr_push *ndr;
- ndr = ndr_push_init_ctx(mem_ctx, iconv_convenience);
+ ndr = ndr_push_init_ctx(mem_ctx);
NDR_ERR_HAVE_NO_MEMORY(ndr);
NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
@@ -960,11 +940,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem
/*
push a union to a blob using NDR
*/
-_PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, void *p,
+_PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
uint32_t level, ndr_push_flags_fn_t fn)
{
struct ndr_push *ndr;
- ndr = ndr_push_init_ctx(mem_ctx, iconv_convenience);
+ ndr = ndr_push_init_ctx(mem_ctx);
NDR_ERR_HAVE_NO_MEMORY(ndr);
NDR_CHECK(ndr_push_set_switch_value(ndr, p, level));
@@ -980,7 +960,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_
/*
generic ndr_size_*() handler for structures
*/
-_PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push, struct smb_iconv_convenience *iconv_convenience)
+_PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push)
{
struct ndr_push *ndr;
enum ndr_err_code status;
@@ -989,7 +969,7 @@ _PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t pu
/* avoid recursion */
if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0;
- ndr = ndr_push_init_ctx(NULL, iconv_convenience);
+ ndr = ndr_push_init_ctx(NULL);
if (!ndr) return 0;
ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;
status = push(ndr, NDR_SCALARS|NDR_BUFFERS, discard_const(p));
@@ -1005,7 +985,7 @@ _PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t pu
/*
generic ndr_size_*() handler for unions
*/
-_PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push, struct smb_iconv_convenience *iconv_convenience)
+_PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push)
{
struct ndr_push *ndr;
enum ndr_err_code status;
@@ -1014,7 +994,7 @@ _PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_pus
/* avoid recursion */
if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0;
- ndr = ndr_push_init_ctx(NULL, iconv_convenience);
+ ndr = ndr_push_init_ctx(NULL);
if (!ndr) return 0;
ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;
diff --git a/librpc/ndr/ndr_compression.c b/librpc/ndr/ndr_compression.c
index c73c3bb6fa..d291df5ad8 100644
--- a/librpc/ndr/ndr_compression.c
+++ b/librpc/ndr/ndr_compression.c
@@ -391,7 +391,7 @@ enum ndr_err_code ndr_pull_compression_start(struct ndr_pull *subndr,
bool last = false;
z_stream z;
- ndrpush = ndr_push_init_ctx(subndr, subndr->iconv_convenience);
+ ndrpush = ndr_push_init_ctx(subndr);
NDR_ERR_HAVE_NO_MEMORY(ndrpush);
switch (compression_alg) {
@@ -431,8 +431,6 @@ enum ndr_err_code ndr_pull_compression_start(struct ndr_pull *subndr,
comndr->data_size = uncompressed.length;
comndr->offset = 0;
- comndr->iconv_convenience = talloc_reference(comndr, subndr->iconv_convenience);
-
*_comndr = comndr;
return NDR_ERR_SUCCESS;
}
@@ -465,7 +463,7 @@ enum ndr_err_code ndr_push_compression_start(struct ndr_push *subndr,
compression_alg);
}
- uncomndr = ndr_push_init_ctx(subndr, subndr->iconv_convenience);
+ uncomndr = ndr_push_init_ctx(subndr);
NDR_ERR_HAVE_NO_MEMORY(uncomndr);
uncomndr->flags = subndr->flags;
@@ -492,8 +490,6 @@ enum ndr_err_code ndr_push_compression_end(struct ndr_push *subndr,
ndrpull->data_size = uncomndr->offset;
ndrpull->offset = 0;
- ndrpull->iconv_convenience = talloc_reference(ndrpull, subndr->iconv_convenience);
-
switch (compression_alg) {
case NDR_COMPRESSION_MSZIP:
ZERO_STRUCT(z);
diff --git a/librpc/ndr/ndr_drsuapi.c b/librpc/ndr/ndr_drsuapi.c
index e9888fdf85..0cc3e5236c 100644
--- a/librpc/ndr/ndr_drsuapi.c
+++ b/librpc/ndr/ndr_drsuapi.c
@@ -258,9 +258,9 @@ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, struct smb_iconv_convenience *ic, int flags)
+_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, int flags)
{
- return ndr_size_struct((const struct drsuapi_DsReplicaObjectIdentifier3 *)r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3, ic);
+ return ndr_size_struct((const struct drsuapi_DsReplicaObjectIdentifier3 *)r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
}
_PUBLIC_ void ndr_print_drsuapi_SecBufferType(struct ndr_print *ndr, const char *name, enum drsuapi_SecBufferType r)
diff --git a/librpc/ndr/ndr_drsuapi.h b/librpc/ndr/ndr_drsuapi.h
index 43c6c18bd7..9d1d371b60 100644
--- a/librpc/ndr/ndr_drsuapi.h
+++ b/librpc/ndr/ndr_drsuapi.h
@@ -28,7 +28,7 @@ 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);
-size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, struct smb_iconv_convenience *ic, int flags);
+size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, int flags);
#endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */
diff --git a/librpc/ndr/ndr_frsrpc.c b/librpc/ndr/ndr_frsrpc.c
index e0c7f1cd75..96d34687bc 100644
--- a/librpc/ndr/ndr_frsrpc.c
+++ b/librpc/ndr/ndr_frsrpc.c
@@ -84,11 +84,9 @@ enum ndr_err_code ndr_pull_frsrpc_CommPktChunkCtr(struct ndr_pull *ndr,
}
size_t ndr_size_frsrpc_CommPktChunkCtr(const struct frsrpc_CommPktChunkCtr *r,
- struct smb_iconv_convenience *ic,
int flags)
{
flags |= LIBNDR_FLAG_NOALIGN;
return ndr_size_struct(r, flags,
- (ndr_push_flags_fn_t)ndr_push_frsrpc_CommPktChunkCtr,
- ic);
+ (ndr_push_flags_fn_t)ndr_push_frsrpc_CommPktChunkCtr);
}
diff --git a/librpc/ndr/ndr_frsrpc.h b/librpc/ndr/ndr_frsrpc.h
index e8dc76959b..9e5ac92d6c 100644
--- a/librpc/ndr/ndr_frsrpc.h
+++ b/librpc/ndr/ndr_frsrpc.h
@@ -29,7 +29,6 @@ enum ndr_err_code ndr_pull_frsrpc_CommPktChunkCtr(struct ndr_pull *ndr,
int ndr_flags,
struct frsrpc_CommPktChunkCtr *r);
size_t ndr_size_frsrpc_CommPktChunkCtr(const struct frsrpc_CommPktChunkCtr *r,
- struct smb_iconv_convenience *ic,
int flags);
#endif /* _LIBRPC_NDR_NDR_FRSRPC_H */
diff --git a/librpc/ndr/ndr_krb5pac.c b/librpc/ndr/ndr_krb5pac.c
index 34a2ef88a7..237c0b65d4 100644
--- a/librpc/ndr/ndr_krb5pac.c
+++ b/librpc/ndr/ndr_krb5pac.c
@@ -23,9 +23,9 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_krb5pac.h"
-static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
+static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
{
- size_t s = ndr_size_PAC_INFO(r, level, ic, flags);
+ size_t s = ndr_size_PAC_INFO(r, level, flags);
switch (level) {
case PAC_TYPE_LOGON_INFO:
return NDR_ROUND(s,8);
@@ -34,9 +34,9 @@ static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct
}
}
-static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
+static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
{
- size_t s = ndr_size_PAC_INFO(r, level, ic, flags);
+ size_t s = ndr_size_PAC_INFO(r, level, flags);
return NDR_ROUND(s,8);
}
@@ -45,7 +45,7 @@ enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_PAC_INFO(r->info,r->type,ndr->iconv_convenience,0)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_PAC_INFO(r->info,r->type,0)));
{
uint32_t _flags_save_PAC_INFO = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
@@ -62,10 +62,10 @@ enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const
NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->info));
{
struct ndr_push *_ndr_info;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,ndr->iconv_convenience, 0)));
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0)));
NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->info, r->type));
NDR_CHECK(ndr_push_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info));
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,ndr->iconv_convenience,0)));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0)));
}
NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->info));
}
@@ -128,7 +128,7 @@ void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct
ndr_print_struct(ndr, name, "PAC_BUFFER");
ndr->depth++;
ndr_print_PAC_TYPE(ndr, "type", r->type);
- ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_PAC_INFO(r->info,r->type,ndr->iconv_convenience,0):r->_ndr_size);
+ ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_PAC_INFO(r->info,r->type,0):r->_ndr_size);
ndr_print_ptr(ndr, "info", r->info);
ndr->depth++;
if (r->info) {
diff --git a/librpc/ndr/ndr_ntlmssp.c b/librpc/ndr/ndr_ntlmssp.c
index 4808aa5f5f..02fc3c2cc7 100644
--- a/librpc/ndr/ndr_ntlmssp.c
+++ b/librpc/ndr/ndr_ntlmssp.c
@@ -108,7 +108,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_AV_PAIR_LIST(struct ndr_pull *ndr, int ndr_f
}
_PUBLIC_ void ndr_print_ntlmssp_nt_response(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const DATA_BLOB *nt_response,
bool ntlmv2)
{
@@ -117,7 +116,7 @@ _PUBLIC_ void ndr_print_ntlmssp_nt_response(TALLOC_CTX *mem_ctx,
if (ntlmv2) {
struct NTLMv2_RESPONSE nt;
if (nt_response->length > 24) {
- ndr_err = ndr_pull_struct_blob(nt_response, mem_ctx, ic, &nt,
+ ndr_err = ndr_pull_struct_blob(nt_response, mem_ctx, &nt,
(ndr_pull_flags_fn_t)ndr_pull_NTLMv2_RESPONSE);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NDR_PRINT_DEBUG(NTLMv2_RESPONSE, &nt);
@@ -126,7 +125,7 @@ _PUBLIC_ void ndr_print_ntlmssp_nt_response(TALLOC_CTX *mem_ctx,
} else {
struct NTLM_RESPONSE nt;
if (nt_response->length == 24) {
- ndr_err = ndr_pull_struct_blob(nt_response, mem_ctx, ic, &nt,
+ ndr_err = ndr_pull_struct_blob(nt_response, mem_ctx, &nt,
(ndr_pull_flags_fn_t)ndr_pull_NTLM_RESPONSE);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NDR_PRINT_DEBUG(NTLM_RESPONSE, &nt);
@@ -136,7 +135,6 @@ _PUBLIC_ void ndr_print_ntlmssp_nt_response(TALLOC_CTX *mem_ctx,
}
_PUBLIC_ void ndr_print_ntlmssp_lm_response(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const DATA_BLOB *lm_response,
bool ntlmv2)
{
@@ -145,7 +143,7 @@ _PUBLIC_ void ndr_print_ntlmssp_lm_response(TALLOC_CTX *mem_ctx,
if (ntlmv2) {
struct LMv2_RESPONSE lm;
if (lm_response->length == 24) {
- ndr_err = ndr_pull_struct_blob(lm_response, mem_ctx, ic, &lm,
+ ndr_err = ndr_pull_struct_blob(lm_response, mem_ctx, &lm,
(ndr_pull_flags_fn_t)ndr_pull_LMv2_RESPONSE);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NDR_PRINT_DEBUG(LMv2_RESPONSE, &lm);
@@ -154,7 +152,7 @@ _PUBLIC_ void ndr_print_ntlmssp_lm_response(TALLOC_CTX *mem_ctx,
} else {
struct LM_RESPONSE lm;
if (lm_response->length == 24) {
- ndr_err = ndr_pull_struct_blob(lm_response, mem_ctx, ic, &lm,
+ ndr_err = ndr_pull_struct_blob(lm_response, mem_ctx, &lm,
(ndr_pull_flags_fn_t)ndr_pull_LM_RESPONSE);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NDR_PRINT_DEBUG(LM_RESPONSE, &lm);
diff --git a/librpc/ndr/ndr_ntlmssp.h b/librpc/ndr/ndr_ntlmssp.h
index b574f15495..e07ff15cf6 100644
--- a/librpc/ndr/ndr_ntlmssp.h
+++ b/librpc/ndr/ndr_ntlmssp.h
@@ -24,11 +24,9 @@ _PUBLIC_ uint32_t ndr_ntlmssp_negotiated_string_flags(uint32_t negotiate_flags);
_PUBLIC_ enum ndr_err_code ndr_push_AV_PAIR_LIST(struct ndr_push *ndr, int ndr_flags, const struct AV_PAIR_LIST *r);
_PUBLIC_ enum ndr_err_code ndr_pull_AV_PAIR_LIST(struct ndr_pull *ndr, int ndr_flags, struct AV_PAIR_LIST *r);
_PUBLIC_ void ndr_print_ntlmssp_nt_response(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const DATA_BLOB *nt_response,
bool ntlmv2);
_PUBLIC_ void ndr_print_ntlmssp_lm_response(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
const DATA_BLOB *lm_response,
bool ntlmv2);
_PUBLIC_ void ndr_print_ntlmssp_Version(struct ndr_print *ndr, const char *name, const union ntlmssp_Version *r);
diff --git a/librpc/ndr/ndr_schannel.c b/librpc/ndr/ndr_schannel.c
index b610429211..9bbc628a29 100644
--- a/librpc/ndr/ndr_schannel.c
+++ b/librpc/ndr/ndr_schannel.c
@@ -85,7 +85,7 @@ void dump_NL_AUTH_SIGNATURE(TALLOC_CTX *mem_ctx,
switch (signature_algorithm) {
case NL_SIGN_HMAC_MD5: {
struct NL_AUTH_SIGNATURE r;
- ndr_err = ndr_pull_struct_blob(blob, mem_ctx, NULL, &r,
+ ndr_err = ndr_pull_struct_blob(blob, mem_ctx, &r,
(ndr_pull_flags_fn_t)ndr_pull_NL_AUTH_SIGNATURE);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NDR_PRINT_DEBUG(NL_AUTH_SIGNATURE, &r);
@@ -94,7 +94,7 @@ void dump_NL_AUTH_SIGNATURE(TALLOC_CTX *mem_ctx,
}
case NL_SIGN_HMAC_SHA256: {
struct NL_AUTH_SHA2_SIGNATURE r;
- ndr_err = ndr_pull_struct_blob(blob, mem_ctx, NULL, &r,
+ ndr_err = ndr_pull_struct_blob(blob, mem_ctx, &r,
(ndr_pull_flags_fn_t)ndr_pull_NL_AUTH_SHA2_SIGNATURE);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NDR_PRINT_DEBUG(NL_AUTH_SHA2_SIGNATURE, &r);
diff --git a/librpc/ndr/ndr_sec_helper.c b/librpc/ndr/ndr_sec_helper.c
index abc805c8ef..af6ca0936f 100644
--- a/librpc/ndr/ndr_sec_helper.c
+++ b/librpc/ndr/ndr_sec_helper.c
@@ -30,13 +30,13 @@
/*
return the wire size of a security_ace
*/
-size_t ndr_size_security_ace(const struct security_ace *ace, struct smb_iconv_convenience *ic, int flags)
+size_t ndr_size_security_ace(const struct security_ace *ace, int flags)
{
size_t ret;
if (!ace) return 0;
- ret = 8 + ndr_size_dom_sid(&ace->trustee, ic, flags);
+ ret = 8 + ndr_size_dom_sid(&ace->trustee, flags);
switch (ace->type) {
case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
@@ -91,14 +91,14 @@ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, str
/*
return the wire size of a security_acl
*/
-size_t ndr_size_security_acl(const struct security_acl *theacl, struct smb_iconv_convenience *ic, int flags)
+size_t ndr_size_security_acl(const struct security_acl *theacl, int flags)
{
size_t ret;
int i;
if (!theacl) return 0;
ret = 8;
for (i=0;i<theacl->num_aces;i++) {
- ret += ndr_size_security_ace(&theacl->aces[i], ic, flags);
+ ret += ndr_size_security_ace(&theacl->aces[i], flags);
}
return ret;
}
@@ -106,23 +106,23 @@ size_t ndr_size_security_acl(const struct security_acl *theacl, struct smb_iconv
/*
return the wire size of a security descriptor
*/
-size_t ndr_size_security_descriptor(const struct security_descriptor *sd, struct smb_iconv_convenience *ic, int flags)
+size_t ndr_size_security_descriptor(const struct security_descriptor *sd, int flags)
{
size_t ret;
if (!sd) return 0;
ret = 20;
- ret += ndr_size_dom_sid(sd->owner_sid, ic, flags);
- ret += ndr_size_dom_sid(sd->group_sid, ic, flags);
- ret += ndr_size_security_acl(sd->dacl, ic, flags);
- ret += ndr_size_security_acl(sd->sacl, ic, flags);
+ ret += ndr_size_dom_sid(sd->owner_sid, flags);
+ ret += ndr_size_dom_sid(sd->group_sid, flags);
+ ret += ndr_size_security_acl(sd->dacl, flags);
+ ret += ndr_size_security_acl(sd->sacl, flags);
return ret;
}
/*
return the wire size of a dom_sid
*/
-size_t ndr_size_dom_sid(const struct dom_sid *sid, struct smb_iconv_convenience *ic, int flags)
+size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags)
{
if (!sid) return 0;
return 8 + 4*sid->num_auths;
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index e15591633d..2fd9d95d2b 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -60,7 +60,7 @@
}\
if (r->in.buffer) {\
DATA_BLOB _data_blob_info;\
- _ndr_info = ndr_push_init_ctx(ndr, ndr->iconv_convenience);\
+ _ndr_info = ndr_push_init_ctx(ndr);\
NDR_ERR_HAVE_NO_MEMORY(_ndr_info);\
_ndr_info->flags= ndr->flags;\
if (r->out.info) {\
@@ -137,7 +137,7 @@
if (_r.out.info) {\
struct ndr_pull *_ndr_info;\
NDR_PULL_ALLOC(ndr, *r->out.info);\
- _ndr_info = ndr_pull_init_blob(_r.out.info, *r->out.info, ndr->iconv_convenience);\
+ _ndr_info = ndr_pull_init_blob(_r.out.info, *r->out.info);\
NDR_ERR_HAVE_NO_MEMORY(_ndr_info);\
_ndr_info->flags= ndr->flags;\
if (r->in.offered != _ndr_info->data_size) {\
@@ -181,7 +181,7 @@
#define NDR_SPOOLSS_SIZE_ENUM_LEVEL(fn) do { \
struct __##fn __r;\
DATA_BLOB _data_blob_info;\
- struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx, iconv_convenience);\
+ struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx);\
if (!_ndr_info) return 0;\
_ndr_info->flags|=LIBNDR_FLAG_NO_NDR_SIZE;\
__r.in.level = level;\
@@ -196,7 +196,7 @@
#define NDR_SPOOLSS_SIZE_ENUM(fn) do { \
struct __##fn __r;\
DATA_BLOB _data_blob_info;\
- struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx, iconv_convenience);\
+ struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx);\
if (!_ndr_info) return 0;\
_ndr_info->flags|=LIBNDR_FLAG_NO_NDR_SIZE;\
__r.in.count = count;\
@@ -234,7 +234,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, int flags,
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_PrinterInfo *info)
+uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PrinterInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrinters);
}
@@ -270,7 +270,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumJobs(struct ndr_pull *ndr, int flags, str
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumJobs_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_JobInfo *info)
+uint32_t ndr_size_spoolss_EnumJobs_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_JobInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumJobs);
}
@@ -302,7 +302,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_DriverInfo *info)
+uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_DriverInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrinterDrivers);
}
@@ -330,7 +330,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumForms(struct ndr_pull *ndr, int flags, st
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_FormInfo *info)
+uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_FormInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumForms);
}
@@ -358,7 +358,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPorts(struct ndr_pull *ndr, int flags, st
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_PortInfo *info)
+uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PortInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPorts);
}
@@ -386,7 +386,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumMonitors(struct ndr_pull *ndr, int flags,
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_MonitorInfo *info)
+uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_MonitorInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumMonitors);
}
@@ -418,7 +418,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumPrintProcessors_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+uint32_t ndr_size_spoolss_EnumPrintProcessors_info(TALLOC_CTX *mem_ctx,
uint32_t level, uint32_t count, union spoolss_PrintProcessorInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessors);
@@ -451,7 +451,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr,
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx,
uint32_t level, uint32_t count, union spoolss_PrintProcDataTypesInfo *info)
{
NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes);
@@ -481,7 +481,7 @@ enum ndr_err_code ndr_push_spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int f
_r.out.info = data_blob(NULL, 0);
if (r->in.offered >= *r->out.needed) {
struct __spoolss_EnumPrinterDataEx __r;
- _ndr_info = ndr_push_init_ctx(ndr, ndr->iconv_convenience);
+ _ndr_info = ndr_push_init_ctx(ndr);
NDR_ERR_HAVE_NO_MEMORY(_ndr_info);
_ndr_info->flags= ndr->flags;
__r.in.count = *r->out.count;
@@ -531,7 +531,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int f
if (_r.out.info.length) {
struct ndr_pull *_ndr_info;
NDR_PULL_ALLOC(ndr, *r->out.info);
- _ndr_info = ndr_pull_init_blob(&_r.out.info, *r->out.info, ndr->iconv_convenience);
+ _ndr_info = ndr_pull_init_blob(&_r.out.info, *r->out.info);
NDR_ERR_HAVE_NO_MEMORY(_ndr_info);
_ndr_info->flags= ndr->flags;
if (r->in.offered != _ndr_info->data_size) {
@@ -551,25 +551,25 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int f
return NDR_ERR_SUCCESS;
}
-uint32_t ndr_size_spoolss_EnumPrinterDataEx_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+uint32_t ndr_size_spoolss_EnumPrinterDataEx_info(TALLOC_CTX *mem_ctx,
uint32_t count, struct spoolss_PrinterEnumValues *info)
{
NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPrinterDataEx);
}
-uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags)
+uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, uint32_t flags)
{
if (!devmode) return 0;
- return ndr_size_spoolss_DeviceMode(devmode,ic,flags);
+ return ndr_size_spoolss_DeviceMode(devmode, flags);
}
-_PUBLIC_ size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, struct smb_iconv_convenience *ic, int flags)
+_PUBLIC_ size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, int flags)
{
if (!r) {
return 4;
}
- return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_StringArray, ic);
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_StringArray);
}
/* hand marshall as pidl cannot (yet) generate a relative pointer to a fixed array of
@@ -1114,12 +1114,12 @@ void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const unio
}
}
-_PUBLIC_ size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
+_PUBLIC_ size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, int flags)
{
if (!r) {
return 0;
}
- return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData, ic);
+ return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData);
}
void ndr_print_spoolss_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r)
diff --git a/librpc/ndr/ndr_spoolss_buf.h b/librpc/ndr/ndr_spoolss_buf.h
index 89dcb4617c..9db187dc7d 100644
--- a/librpc/ndr/ndr_spoolss_buf.h
+++ b/librpc/ndr/ndr_spoolss_buf.h
@@ -14,40 +14,40 @@
enum ndr_err_code ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinters *r);
enum ndr_err_code ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinters *r);
-uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_PrinterInfo *info);
+uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PrinterInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumJobs(struct ndr_push *ndr, int flags, const struct spoolss_EnumJobs *r);
enum ndr_err_code ndr_pull_spoolss_EnumJobs(struct ndr_pull *ndr, int flags, struct spoolss_EnumJobs *r);
-uint32_t ndr_size_spoolss_EnumJobs_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_JobInfo *info);
+uint32_t ndr_size_spoolss_EnumJobs_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_JobInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumPrinterDrivers(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinterDrivers *r);
enum ndr_err_code ndr_pull_spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterDrivers *r);
-uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_DriverInfo *info);
+uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_DriverInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumForms(struct ndr_push *ndr, int flags, const struct spoolss_EnumForms *r);
enum ndr_err_code ndr_pull_spoolss_EnumForms(struct ndr_pull *ndr, int flags, struct spoolss_EnumForms *r);
-uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_FormInfo *info);
+uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_FormInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumPorts(struct ndr_push *ndr, int flags, const struct spoolss_EnumPorts *r);
enum ndr_err_code ndr_pull_spoolss_EnumPorts(struct ndr_pull *ndr, int flags, struct spoolss_EnumPorts *r);
-uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_PortInfo *info);
+uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PortInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumMonitors(struct ndr_push *ndr, int flags, const struct spoolss_EnumMonitors *r);
enum ndr_err_code ndr_pull_spoolss_EnumMonitors(struct ndr_pull *ndr, int flags, struct spoolss_EnumMonitors *r);
-uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union spoolss_MonitorInfo *info);
+uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_MonitorInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcessors *r);
enum ndr_err_code ndr_pull_spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcessors *r);
-uint32_t ndr_size_spoolss_EnumPrintProcessors_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+uint32_t ndr_size_spoolss_EnumPrintProcessors_info(TALLOC_CTX *mem_ctx,
uint32_t level, uint32_t count, union spoolss_PrintProcessorInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcDataTypes *r);
enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcDataTypes *r);
-uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx,
uint32_t level, uint32_t count, union spoolss_PrintProcDataTypesInfo *info);
enum ndr_err_code ndr_push_spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinterDataEx *r);
enum ndr_err_code ndr_pull_spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterDataEx *r);
-uint32_t ndr_size_spoolss_EnumPrinterDataEx_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+uint32_t ndr_size_spoolss_EnumPrinterDataEx_info(TALLOC_CTX *mem_ctx,
uint32_t count, struct spoolss_PrinterEnumValues *info);
-uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags);
-size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, struct smb_iconv_convenience *ic, int flags);
+uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, uint32_t flags);
+size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, int flags);
_PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo101 *r);
_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo101(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo101 *r);
void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const union spoolss_Field *r);
-size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, struct smb_iconv_convenience *ic, int flags);
+size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, int flags);
void ndr_print_spoolss_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r);
enum ndr_err_code ndr_pull_spoolss_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r);
enum ndr_err_code ndr_push_spoolss_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r);
diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c
index 1899afbbca..5b6053167a 100644
--- a/librpc/ndr/uuid.c
+++ b/librpc/ndr/uuid.c
@@ -31,7 +31,7 @@
_PUBLIC_ NTSTATUS GUID_to_ndr_blob(const struct GUID *guid, TALLOC_CTX *mem_ctx, DATA_BLOB *b)
{
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(b, mem_ctx, NULL, guid,
+ ndr_err = ndr_push_struct_blob(b, mem_ctx, guid,
(ndr_push_flags_fn_t)ndr_push_GUID);
return ndr_map_error2ntstatus(ndr_err);
}
@@ -48,7 +48,7 @@ _PUBLIC_ NTSTATUS GUID_from_ndr_blob(const DATA_BLOB *b, struct GUID *guid)
mem_ctx = talloc_new(NULL);
NT_STATUS_HAVE_NO_MEMORY(mem_ctx);
- ndr_err = ndr_pull_struct_blob_all(b, mem_ctx, NULL, guid,
+ ndr_err = ndr_pull_struct_blob_all(b, mem_ctx, guid,
(ndr_pull_flags_fn_t)ndr_pull_GUID);
talloc_free(mem_ctx);
return ndr_map_error2ntstatus(ndr_err);
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c
index e3edc67882..5e9bef8e7c 100644
--- a/librpc/rpc/binding.c
+++ b/librpc/rpc/binding.c
@@ -376,7 +376,7 @@ _PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(const struct epm_floor *epm_floor,
enum ndr_err_code ndr_err;
uint16_t if_version=0;
- ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
+ ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx);
if (ndr == NULL) {
talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
@@ -405,7 +405,7 @@ _PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(const struct epm_floor *epm_floor,
static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
{
DATA_BLOB blob;
- struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, NULL);
+ struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx);
ndr->flags |= LIBNDR_FLAG_NOALIGN;
@@ -421,7 +421,7 @@ static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct nd
static DATA_BLOB dcerpc_floor_pack_rhs_if_version_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
{
DATA_BLOB blob;
- struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, NULL);
+ struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx);
ndr->flags |= LIBNDR_FLAG_NOALIGN;
diff --git a/librpc/tools/ndrdump.c b/librpc/tools/ndrdump.c
index 9b4847e74a..6fc903fa32 100644
--- a/librpc/tools/ndrdump.c
+++ b/librpc/tools/ndrdump.c
@@ -294,7 +294,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
blob.data = data;
blob.length = size;
- ndr_pull = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(cmdline_lp_ctx));
+ ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
if (assume_ndr64) {
ndr_pull->flags |= LIBNDR_FLAG_NDR64;
@@ -330,7 +330,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
blob.data = data;
blob.length = size;
- ndr_pull = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(cmdline_lp_ctx));
+ ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
if (assume_ndr64) {
ndr_pull->flags |= LIBNDR_FLAG_NDR64;
@@ -372,7 +372,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
uint8_t byte_a, byte_b;
bool differ;
- ndr_v_push = ndr_push_init_ctx(mem_ctx, lp_iconv_convenience(cmdline_lp_ctx));
+ ndr_v_push = ndr_push_init_ctx(mem_ctx);
ndr_err = f->ndr_push(ndr_v_push, flags, st);
status = ndr_map_error2ntstatus(ndr_err);
@@ -389,7 +389,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
ndrdump_data(v_blob.data, v_blob.length, dumpdata);
}
- ndr_v_pull = ndr_pull_init_blob(&v_blob, mem_ctx, lp_iconv_convenience(cmdline_lp_ctx));
+ ndr_v_pull = ndr_pull_init_blob(&v_blob, mem_ctx);
ndr_v_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
ndr_err = f->ndr_pull(ndr_v_pull, flags, v_st);
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 4c23dfacd8..83bca288ed 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1618,7 +1618,7 @@ sub ParseStructNdrSize($$$$)
if (my $flags = has_property($t, "flag")) {
$self->pidl("flags |= $flags;");
}
- $self->pidl("return ndr_size_struct($varname, flags, (ndr_push_flags_fn_t)ndr_push_$name, ic);");
+ $self->pidl("return ndr_size_struct($varname, flags, (ndr_push_flags_fn_t)ndr_push_$name);");
}
sub DeclStruct($$$$)
@@ -1630,7 +1630,7 @@ sub DeclStruct($$$$)
sub ArgsStructNdrSize($$$)
{
my ($d, $name, $varname) = @_;
- return "const struct $name *$varname, struct smb_iconv_convenience *ic, int flags";
+ return "const struct $name *$varname, int flags";
}
$typefamily{STRUCT} = {
@@ -1653,7 +1653,7 @@ sub ParseUnionNdrSize($$$)
$self->pidl("flags |= $flags;");
}
- $self->pidl("return ndr_size_union($varname, flags, level, (ndr_push_flags_fn_t)ndr_push_$name, ic);");
+ $self->pidl("return ndr_size_union($varname, flags, level, (ndr_push_flags_fn_t)ndr_push_$name);");
}
sub ParseUnionPushPrimitives($$$$)
@@ -1941,7 +1941,7 @@ sub DeclUnion($$$$)
sub ArgsUnionNdrSize($$)
{
my ($d,$name) = @_;
- return "const union $name *r, uint32_t level, struct smb_iconv_convenience *ic, int flags";
+ return "const union $name *r, uint32_t level, int flags";
}
$typefamily{UNION} = {
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 226db078d6..390ee27510 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -253,7 +253,7 @@ sub PythonStruct($$$$$$)
$self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);");
$self->pidl("DATA_BLOB blob;");
$self->pidl("enum ndr_err_code err;");
- $self->pidl("err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_push_flags_fn_t)ndr_push_$name);");
+ $self->pidl("err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_$name);");
$self->pidl("if (err != NDR_ERR_SUCCESS) {");
$self->indent;
$self->pidl("PyErr_SetNdrError(err);");
@@ -275,7 +275,7 @@ sub PythonStruct($$$$$$)
$self->pidl("if (!PyArg_ParseTuple(args, \"s#:__ndr_unpack__\", &blob.data, &blob.length))");
$self->pidl("\treturn NULL;");
$self->pidl("");
- $self->pidl("err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
+ $self->pidl("err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
$self->pidl("if (err != NDR_ERR_SUCCESS) {");
$self->indent;
$self->pidl("PyErr_SetNdrError(err);");
diff --git a/pidl/tests/ndr_string.pl b/pidl/tests/ndr_string.pl
index e00dd01c8e..8e8b8ecbad 100755
--- a/pidl/tests/ndr_string.pl
+++ b/pidl/tests/ndr_string.pl
@@ -14,8 +14,7 @@ test_samba4_ndr("string-pull-empty",
'
uint8_t data[] = { 0x00, 0x00, 0x00, 0x00 };
DATA_BLOB b = { data, 4 };
- struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
- smb_iconv_convenience_reinit(NULL, "ASCII", "UTF8", true, NULL));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestString r;
r.in.data = NULL;
@@ -37,8 +36,7 @@ test_samba4_ndr("string-ascii-pull",
uint8_t data[] = { 0x03, 0x00, 0x00, 0x00,
\'f\', \'o\', \'o\', 0 };
DATA_BLOB b = { data, 8 };
- struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
- smb_iconv_convenience_reinit(NULL, "ASCII", "UTF8", true, NULL));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestString r;
r.in.data = NULL;
@@ -74,8 +72,7 @@ test_samba4_ndr("string-wchar-fixed-array-01",
0x02, 0x00, 0x00, 0x00
};
DATA_BLOB b = { data, sizeof(data) };
- struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
- smb_iconv_convenience_reinit(NULL, "ASCII", "UTF8", true, NULL));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestString r;
struct TestStringStruct str;
r.in.str = &str;
@@ -120,8 +117,7 @@ test_samba4_ndr("string-wchar-fixed-array-02",
0x02, 0x00, 0x00, 0x00
};
DATA_BLOB b = { data, sizeof(data) };
- struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
- smb_iconv_convenience_reinit(NULL, "ASCII", "UTF8", true, NULL));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestString r;
struct TestStringStruct str;
r.in.str = &str;
@@ -152,8 +148,7 @@ test_samba4_ndr("string-wchar-fixed-array-03",
0x02, 0x00, 0x00, 0x00
};
DATA_BLOB b = { data, sizeof(data) };
- struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
- smb_iconv_convenience_reinit(NULL, "ASCII", "UTF8", true, NULL));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestString r;
struct TestStringStruct str;
r.in.str = &str;
@@ -174,8 +169,7 @@ test_samba4_ndr("string-out",
uint8_t data[] = { 0x03, 0x00, 0x00, 0x00,
\'f\', \'o\', \'o\', 0 };
DATA_BLOB b = { data, 8 };
- struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL,
- smb_iconv_convenience_reinit(NULL, "ASCII", "UTF8", true, NULL));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&b, NULL);
struct TestString r;
char *str = NULL;
r.out.data = &str;
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 3e48d16805..132d37380f 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -601,7 +601,6 @@ typedef char fstring[FSTRING_LEN];
/* Samba 3 doesn't use iconv_convenience: */
extern void *cmdline_lp_ctx;
-struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
/* Lists, trees, caching, database... */
#include "../lib/util/util.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6099ecf0e9..eb9c63c5ac 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1294,14 +1294,10 @@ struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ;
/* The following definitions come from ..libcli/registry/util_reg.c */
const char *str_regtype(int type);
-bool push_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- DATA_BLOB *blob, const char *s);
-bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- DATA_BLOB *blob, const char **a);
-bool pull_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- const DATA_BLOB *blob, const char **s);
-bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- const DATA_BLOB *blob, const char ***a);
+bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
+bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
+bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
+bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a);
/* The following definitions come from lib/util_seaccess.c */
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/util.c
index 1318bd8e00..5966ca8679 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/util.c
@@ -209,10 +209,6 @@ _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name
}
void *cmdline_lp_ctx;
-struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx)
-{
- return NULL;
-}
const struct ndr_syntax_id null_ndr_syntax_id =
{ { 0, 0, 0, { 0, 0 }, { 0, 0, 0, 0, 0, 0 } }, 0 };
diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index 45e24f194f..886f8fb171 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -73,7 +73,6 @@ struct tevent_req;
struct gensec_settings {
struct loadparm_context *lp_ctx;
- struct smb_iconv_convenience *iconv_convenience;
const char *target_hostname;
};
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index c6901a7b5e..73c12a20ff 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -1268,7 +1268,6 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
*/
if (pac_blob.length) {
nt_status = kerberos_pac_blob_to_server_info(mem_ctx,
- gensec_security->settings->iconv_convenience,
pac_blob,
gensec_gssapi_state->smb_krb5_context->krb5_context,
&server_info);
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c
index d051b7f227..77b50cb41c 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -685,7 +685,6 @@ static NTSTATUS gensec_krb5_session_info(struct gensec_security *gensec_security
/* decode and verify the pac */
nt_status = kerberos_pac_logon_info(gensec_krb5_state,
- gensec_security->settings->iconv_convenience,
&logon_info, pac,
gensec_krb5_state->smb_krb5_context->krb5_context,
NULL, gensec_krb5_state->keyblock,
diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index 2b4963c843..3ae80ddaf3 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -70,7 +70,6 @@ static struct gensec_settings *settings_from_object(TALLOC_CTX *mem_ctx, PyObjec
s->target_hostname = PyString_AsString(py_hostname);
s->lp_ctx = lp_from_py_object(s, py_lp_ctx);
- s->iconv_convenience = py_iconv_convenience(s);
return s;
}
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c
index 7877ea461a..d4b29484f1 100644
--- a/source4/auth/gensec/schannel.c
+++ b/source4/auth/gensec/schannel.c
@@ -87,8 +87,7 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
bind_schannel.oem_netbios_computer.a = cli_credentials_get_workstation(gensec_security->credentials);
#endif
- ndr_err = ndr_push_struct_blob(out, out_mem_ctx,
- gensec_security->settings->iconv_convenience, &bind_schannel,
+ ndr_err = ndr_push_struct_blob(out, out_mem_ctx, &bind_schannel,
(ndr_push_flags_fn_t)ndr_push_NL_AUTH_MESSAGE);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -111,9 +110,7 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
}
/* parse the schannel startup blob */
- ndr_err = ndr_pull_struct_blob(&in, out_mem_ctx,
- gensec_security->settings->iconv_convenience,
- &bind_schannel,
+ ndr_err = ndr_pull_struct_blob(&in, out_mem_ctx, &bind_schannel,
(ndr_pull_flags_fn_t)ndr_pull_NL_AUTH_MESSAGE);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -137,7 +134,6 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
}
status = schannel_get_creds_state(out_mem_ctx,
- gensec_security->settings->iconv_convenience,
lp_private_dir(gensec_security->settings->lp_ctx),
workstation, &creds);
if (!NT_STATUS_IS_OK(status)) {
@@ -158,8 +154,7 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
* any meaning here
* - gd */
- ndr_err = ndr_push_struct_blob(out, out_mem_ctx,
- gensec_security->settings->iconv_convenience, &bind_schannel_ack,
+ ndr_err = ndr_push_struct_blob(out, out_mem_ctx, &bind_schannel_ack,
(ndr_push_flags_fn_t)ndr_push_NL_AUTH_MESSAGE);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index 1990343808..96c11a4ce1 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -105,7 +105,6 @@ void kerberos_free_data_contents(krb5_context context, krb5_data *pdata);
krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry);
char *smb_get_krb5_error_message(krb5_context context, krb5_error_code code, TALLOC_CTX *mem_ctx);
NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA **pac_data_out,
DATA_BLOB blob,
krb5_context context,
@@ -115,7 +114,6 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
time_t tgs_authtime,
krb5_error_code *k5ret);
NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct PAC_LOGON_INFO **logon_info,
DATA_BLOB blob,
krb5_context context,
@@ -125,14 +123,12 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
time_t tgs_authtime,
krb5_error_code *k5ret);
krb5_error_code kerberos_encode_pac(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA *pac_data,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
const krb5_keyblock *service_keyblock,
DATA_BLOB *pac);
krb5_error_code kerberos_create_pac(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct auth_serversupplied_info *server_info,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
diff --git a/source4/auth/kerberos/kerberos_pac.c b/source4/auth/kerberos/kerberos_pac.c
index ecd35f3dfa..aca807e78d 100644
--- a/source4/auth/kerberos/kerberos_pac.c
+++ b/source4/auth/kerberos/kerberos_pac.c
@@ -66,7 +66,6 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
}
NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA **pac_data_out,
DATA_BLOB blob,
krb5_context context,
@@ -114,8 +113,7 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
}
ndr_err = ndr_pull_struct_blob(&blob, pac_data,
- iconv_convenience, pac_data,
- (ndr_pull_flags_fn_t)ndr_pull_PAC_DATA);
+ pac_data, (ndr_pull_flags_fn_t)ndr_pull_PAC_DATA);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
DEBUG(0,("can't parse the PAC: %s\n",
@@ -130,7 +128,7 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
}
ndr_err = ndr_pull_struct_blob(&blob, pac_data_raw,
- iconv_convenience, pac_data_raw,
+ pac_data_raw,
(ndr_pull_flags_fn_t)ndr_pull_PAC_DATA_RAW);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -211,7 +209,7 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
/* We find the data blobs above, now we parse them to get at the exact portion we should zero */
ndr_err = ndr_pull_struct_blob(kdc_sig_blob, kdc_sig_wipe,
- iconv_convenience, kdc_sig_wipe,
+ kdc_sig_wipe,
(ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -221,7 +219,7 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
}
ndr_err = ndr_pull_struct_blob(srv_sig_blob, srv_sig_wipe,
- iconv_convenience, srv_sig_wipe,
+ srv_sig_wipe,
(ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -236,7 +234,6 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
/* and reencode, back into the same place it came from */
ndr_err = ndr_push_struct_blob(kdc_sig_blob, pac_data_raw,
- iconv_convenience,
kdc_sig_wipe,
(ndr_push_flags_fn_t)ndr_push_PAC_SIGNATURE_DATA);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -246,7 +243,6 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
return status;
}
ndr_err = ndr_push_struct_blob(srv_sig_blob, pac_data_raw,
- iconv_convenience,
srv_sig_wipe,
(ndr_push_flags_fn_t)ndr_push_PAC_SIGNATURE_DATA);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -258,7 +254,6 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
/* push out the whole structure, but now with zero'ed signatures */
ndr_err = ndr_push_struct_blob(&modified_pac_blob, pac_data_raw,
- iconv_convenience,
pac_data_raw,
(ndr_push_flags_fn_t)ndr_push_PAC_DATA_RAW);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -340,7 +335,6 @@ krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
}
_PUBLIC_ NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct PAC_LOGON_INFO **logon_info,
DATA_BLOB blob,
krb5_context context,
@@ -354,7 +348,6 @@ _PUBLIC_ NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
struct PAC_DATA *pac_data;
int i;
nt_status = kerberos_decode_pac(mem_ctx,
- iconv_convenience,
&pac_data,
blob,
context,
@@ -426,7 +419,6 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
}
krb5_error_code kerberos_encode_pac(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA *pac_data,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
@@ -489,7 +481,6 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
memset(srv_checksum->signature.data, '\0', srv_checksum->signature.length);
ndr_err = ndr_push_struct_blob(&tmp_blob, mem_ctx,
- iconv_convenience,
pac_data,
(ndr_push_flags_fn_t)ndr_push_PAC_DATA);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -514,7 +505,6 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
/* And push it out again, this time to the world. This relies on determanistic pointer values */
ndr_err = ndr_push_struct_blob(&tmp_blob, mem_ctx,
- iconv_convenience,
pac_data,
(ndr_push_flags_fn_t)ndr_push_PAC_DATA);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -531,7 +521,6 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
krb5_error_code kerberos_create_pac(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct auth_serversupplied_info *server_info,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
@@ -644,7 +633,6 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
unix_to_nt_time(&LOGON_NAME->logon_time, tgs_authtime);
ret = kerberos_encode_pac(mem_ctx,
- iconv_convenience,
pac_data,
context,
krbtgt_keyblock,
@@ -655,7 +643,6 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
}
krb5_error_code kerberos_pac_to_server_info(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
krb5_pac pac,
krb5_context context,
struct auth_serversupplied_info **server_info)
@@ -685,7 +672,7 @@ krb5_error_code kerberos_pac_to_server_info(TALLOC_CTX *mem_ctx,
pac_logon_info_in = data_blob_const(k5pac_logon_info_in.data, k5pac_logon_info_in.length);
- ndr_err = ndr_pull_union_blob(&pac_logon_info_in, tmp_ctx, iconv_convenience, &info,
+ ndr_err = ndr_pull_union_blob(&pac_logon_info_in, tmp_ctx, &info,
PAC_TYPE_LOGON_INFO,
(ndr_pull_flags_fn_t)ndr_pull_PAC_INFO);
krb5_data_free(&k5pac_logon_info_in);
@@ -716,7 +703,7 @@ krb5_error_code kerberos_pac_to_server_info(TALLOC_CTX *mem_ctx,
pac_srv_checksum_in = data_blob_const(k5pac_srv_checksum_in.data, k5pac_srv_checksum_in.length);
ndr_err = ndr_pull_struct_blob(&pac_srv_checksum_in, server_info_out,
- iconv_convenience, &server_info_out->pac_srv_sig,
+ &server_info_out->pac_srv_sig,
(ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
krb5_data_free(&k5pac_srv_checksum_in);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -735,7 +722,7 @@ krb5_error_code kerberos_pac_to_server_info(TALLOC_CTX *mem_ctx,
pac_kdc_checksum_in = data_blob_const(k5pac_kdc_checksum_in.data, k5pac_kdc_checksum_in.length);
ndr_err = ndr_pull_struct_blob(&pac_kdc_checksum_in, server_info_out,
- iconv_convenience, &server_info_out->pac_kdc_sig,
+ &server_info_out->pac_kdc_sig,
(ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
krb5_data_free(&k5pac_kdc_checksum_in);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -752,7 +739,6 @@ krb5_error_code kerberos_pac_to_server_info(TALLOC_CTX *mem_ctx,
NTSTATUS kerberos_pac_blob_to_server_info(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
DATA_BLOB pac_blob,
krb5_context context,
struct auth_serversupplied_info **server_info)
@@ -767,7 +753,7 @@ NTSTATUS kerberos_pac_blob_to_server_info(TALLOC_CTX *mem_ctx,
}
- ret = kerberos_pac_to_server_info(mem_ctx, iconv_convenience, pac, context, server_info);
+ ret = kerberos_pac_to_server_info(mem_ctx, pac, context, server_info);
krb5_pac_free(context, pac);
if (ret) {
return map_nt_error_from_unix(ret);
diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c
index 173a895390..7406a94275 100644
--- a/source4/auth/ntlm/auth_winbind.c
+++ b/source4/auth/ntlm/auth_winbind.c
@@ -33,7 +33,7 @@
#include "nsswitch/libwbclient/wbclient.h"
#include "libcli/security/dom_sid.h"
-static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, struct winbindd_response *response, struct netr_SamInfo3 *info3)
+static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response *response, struct netr_SamInfo3 *info3)
{
size_t len = response->length - sizeof(struct winbindd_response);
if (len > 4) {
@@ -43,7 +43,7 @@ static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct smb_iconv_conveni
blob.data = (uint8_t *)(((char *)response->extra_data.data) + 4);
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx,
- iconv_convenience, info3,
+ info3,
(ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
@@ -57,7 +57,6 @@ static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct smb_iconv_conveni
}
static NTSTATUS get_info3_from_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct wbcAuthUserInfo *info,
struct netr_SamInfo3 *info3)
{
@@ -197,7 +196,7 @@ static NTSTATUS winbind_check_password_samba3(struct auth_method_context *ctx,
if (result == NSS_STATUS_SUCCESS && response.extra_data.data) {
union netr_Validation validation;
- nt_status = get_info3_from_ndr(mem_ctx, lp_iconv_convenience(ctx->auth_ctx->lp_ctx), &response, &info3);
+ nt_status = get_info3_from_ndr(mem_ctx, &response, &info3);
SAFE_FREE(response.extra_data.data);
NT_STATUS_NOT_OK_RETURN(nt_status);
@@ -389,9 +388,7 @@ static NTSTATUS winbind_check_password_wbclient(struct auth_method_context *ctx,
wbcFreeMemory(err);
NT_STATUS_NOT_OK_RETURN(nt_status);
}
- nt_status = get_info3_from_wbcAuthUserInfo(mem_ctx,
- lp_iconv_convenience(ctx->auth_ctx->lp_ctx),
- info, &info3);
+ nt_status = get_info3_from_wbcAuthUserInfo(mem_ctx, info, &info3);
wbcFreeMemory(info);
NT_STATUS_NOT_OK_RETURN(nt_status);
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 414f08a6f6..7667d9bf3e 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -137,7 +137,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
enum ndr_err_code ndr_err;
/* Rather than go via the string, just push into the NDR form */
- ndr_err = ndr_push_struct_blob(&sid_val, mem_ctx, NULL, &sid,
+ ndr_err = ndr_push_struct_blob(&sid_val, mem_ctx, &sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return NT_STATUS_INVALID_PARAMETER;
@@ -427,8 +427,7 @@ void cldapd_netlogon_request(struct cldap_socket *cldap,
goto failed;
}
ndr_err = ndr_pull_struct_blob(&t->u.equality.value,
- domain_sid, NULL,
- domain_sid,
+ domain_sid, domain_sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(domain_sid);
@@ -472,10 +471,7 @@ void cldapd_netlogon_request(struct cldap_socket *cldap,
goto failed;
}
- status = cldap_netlogon_reply(cldap,
- lp_iconv_convenience(cldapd->task->lp_ctx),
- message_id, src, version,
- &netlogon);
+ status = cldap_netlogon_reply(cldap, message_id, src, version, &netlogon);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c
index 302d470afd..b804a15d1c 100644
--- a/source4/client/cifsdd.c
+++ b/source4/client/cifsdd.c
@@ -360,7 +360,6 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
struct smbcli_options *smb_options,
const char *socket_options,
struct smbcli_session_options *smb_session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
int options = 0;
@@ -385,7 +384,6 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
check_arg_numeric("ibs"), options,
socket_options,
smb_options, smb_session_options,
- iconv_convenience,
gensec_settings);
} else if (strcmp(which, "of") == 0) {
options |= DD_WRITE;
@@ -394,7 +392,6 @@ static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
check_arg_numeric("obs"), options,
socket_options,
smb_options, smb_session_options,
- iconv_convenience,
gensec_settings);
} else {
SMB_ASSERT(0);
@@ -450,7 +447,7 @@ static int copy_files(struct tevent_context *ev, struct loadparm_context *lp_ctx
if (!(ifile = open_file(lp_resolve_context(lp_ctx), ev, "if",
lp_smb_ports(lp_ctx), &options,
lp_socket_options(lp_ctx),
- &session_options, lp_iconv_convenience(lp_ctx),
+ &session_options,
lp_gensec_settings(lp_ctx, lp_ctx)))) {
return(FILESYS_EXIT_CODE);
}
@@ -459,7 +456,6 @@ static int copy_files(struct tevent_context *ev, struct loadparm_context *lp_ctx
lp_smb_ports(lp_ctx), &options,
lp_socket_options(lp_ctx),
&session_options,
- lp_iconv_convenience(lp_ctx),
lp_gensec_settings(lp_ctx, lp_ctx)))) {
return(FILESYS_EXIT_CODE);
}
diff --git a/source4/client/cifsdd.h b/source4/client/cifsdd.h
index e39c046fe8..4e9cb9dd9a 100644
--- a/source4/client/cifsdd.h
+++ b/source4/client/cifsdd.h
@@ -100,7 +100,6 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
const char *socket_options,
struct smbcli_options *smb_options,
struct smbcli_session_options *smb_session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings);
bool dd_fill_block(struct dd_iohandle * h, uint8_t * buf,
uint64_t * buf_size, uint64_t need_size, uint64_t block_size);
diff --git a/source4/client/cifsddio.c b/source4/client/cifsddio.c
index 47caf6b835..0ceb69e3b1 100644
--- a/source4/client/cifsddio.c
+++ b/source4/client/cifsddio.c
@@ -227,7 +227,6 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct
const char *socket_options,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
NTSTATUS ret;
@@ -242,7 +241,6 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct
cmdline_credentials, resolve_ctx,
ev, options,
session_options,
- iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(ret)) {
@@ -312,7 +310,6 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx
const char *socket_options,
struct smbcli_options *smb_options,
struct smbcli_session_options *smb_session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct cifs_handle * smbh;
@@ -336,7 +333,6 @@ static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx
if ((smbh->cli = init_smb_session(resolve_ctx, ev, host, ports, share,
socket_options,
smb_options, smb_session_options,
- iconv_convenience,
gensec_settings)) == NULL) {
return(NULL);
}
@@ -361,7 +357,6 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
const char *socket_options,
struct smbcli_options *smb_options,
struct smbcli_session_options *smb_session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
if (file_exist(path)) {
@@ -382,7 +377,6 @@ struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
io_size, options,
socket_options, smb_options,
smb_session_options,
- iconv_convenience,
gensec_settings));
}
diff --git a/source4/client/client.c b/source4/client/client.c
index 55a2d0c0d0..cf834b9e1f 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -3055,7 +3055,6 @@ static bool do_connect(struct smbclient_context *ctx,
struct cli_credentials *cred,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
NTSTATUS status;
@@ -3078,7 +3077,6 @@ static bool do_connect(struct smbclient_context *ctx,
socket_options,
cred, resolve_ctx,
ev_ctx, options, session_options,
- iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Connection to \\\\%s\\%s failed - %s\n",
@@ -3113,7 +3111,6 @@ static int do_message_op(const char *netbios_name, const char *desthost,
struct tevent_context *ev_ctx,
struct resolve_context *resolve_ctx,
struct smbcli_options *options,
- struct smb_iconv_convenience *iconv_convenience,
const char *socket_options)
{
struct nbt_name called, calling;
@@ -3129,7 +3126,6 @@ static int do_message_op(const char *netbios_name, const char *desthost,
if (!(cli = smbcli_state_init(NULL)) ||
!smbcli_socket_connect(cli, server_name, destports,
ev_ctx, resolve_ctx, options,
- iconv_convenience,
socket_options)) {
d_printf("Connection to %s failed\n", server_name);
return 1;
@@ -3283,7 +3279,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
lp_smb_ports(cmdline_lp_ctx), dest_ip,
name_type, ev_ctx,
lp_resolve_context(cmdline_lp_ctx),
- &smb_options, lp_iconv_convenience(cmdline_lp_ctx),
+ &smb_options,
lp_socket_options(cmdline_lp_ctx));
return rc;
}
@@ -3292,7 +3288,6 @@ static int do_message_op(const char *netbios_name, const char *desthost,
desthost, lp_smb_ports(cmdline_lp_ctx), service,
lp_socket_options(cmdline_lp_ctx),
cmdline_credentials, &smb_options, &smb_session_options,
- lp_iconv_convenience(cmdline_lp_ctx),
lp_gensec_settings(ctx, cmdline_lp_ctx)))
return 1;
diff --git a/source4/dsdb/common/dsdb_access.c b/source4/dsdb/common/dsdb_access.c
index 7857e1fa25..ac0c73643f 100644
--- a/source4/dsdb/common/dsdb_access.c
+++ b/source4/dsdb/common/dsdb_access.c
@@ -69,7 +69,7 @@ int dsdb_get_sd_from_ldb_message(TALLOC_CTX *mem_ctx,
if(!*sd) {
return LDB_ERR_OPERATIONS_ERROR;
}
- ndr_err = ndr_pull_struct_blob(&sd_element->values[0], *sd, NULL, *sd,
+ ndr_err = ndr_pull_struct_blob(&sd_element->values[0], *sd, *sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index df4e734252..da4d0b3940 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -385,7 +385,7 @@ struct dom_sid *samdb_result_dom_sid(TALLOC_CTX *mem_ctx, const struct ldb_messa
if (sid == NULL) {
return NULL;
}
- ndr_err = ndr_pull_struct_blob(v, sid, NULL, sid,
+ ndr_err = ndr_pull_struct_blob(v, sid, sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(sid);
@@ -816,7 +816,6 @@ int samdb_msg_add_dom_sid(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, stru
enum ndr_err_code ndr_err;
ndr_err = ndr_push_struct_blob(&v, mem_ctx,
- lp_iconv_convenience(ldb_get_opaque(sam_ldb, "loadparm")),
sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -2494,7 +2493,7 @@ WERROR dsdb_loadreps(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx, struct ld
for (i=0; i<(*count); i++) {
enum ndr_err_code ndr_err;
ndr_err = ndr_pull_struct_blob(&el->values[i],
- mem_ctx, lp_iconv_convenience(ldb_get_opaque(sam_ctx, "loadparm")),
+ mem_ctx,
&(*r)[i],
(ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -2535,7 +2534,7 @@ WERROR dsdb_savereps(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx, struct ld
struct ldb_val v;
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(&v, tmp_ctx, lp_iconv_convenience(ldb_get_opaque(sam_ctx, "loadparm")),
+ ndr_err = ndr_push_struct_blob(&v, tmp_ctx,
&r[i],
(ndr_push_flags_fn_t)ndr_push_repsFromToBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -2981,7 +2980,7 @@ NTSTATUS dsdb_get_extended_dn_sid(struct ldb_dn *dn, struct dom_sid *sid, const
tmp_ctx = talloc_new(NULL);
- ndr_err = ndr_pull_struct_blob_all(sid_blob, tmp_ctx, NULL, sid,
+ ndr_err = ndr_pull_struct_blob_all(sid_blob, tmp_ctx, sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
@@ -3243,8 +3242,7 @@ int dsdb_load_udv_v2(struct ldb_context *samdb, struct ldb_dn *dn, TALLOC_CTX *m
enum ndr_err_code ndr_err;
struct replUpToDateVectorBlob ouv;
- ndr_err = ndr_pull_struct_blob(ouv_value, r,
- lp_iconv_convenience(ldb_get_opaque(samdb, "loadparm")), &ouv,
+ ndr_err = ndr_pull_struct_blob(ouv_value, r, &ouv,
(ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(r);
diff --git a/source4/dsdb/kcc/kcc_drs_replica_info.c b/source4/dsdb/kcc/kcc_drs_replica_info.c
index 322ccc980c..170105642b 100644
--- a/source4/dsdb/kcc/kcc_drs_replica_info.c
+++ b/source4/dsdb/kcc/kcc_drs_replica_info.c
@@ -122,7 +122,7 @@ static WERROR get_repl_prop_metadata_ctr(TALLOC_CTX *mem_ctx,
}
ndr_err = ndr_pull_struct_blob(omd_value, mem_ctx,
- lp_iconv_convenience(ldb_get_opaque(samdb, "loadparm")), obj_metadata_ctr,
+ obj_metadata_ctr,
(ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0,(__location__ ": Failed to parse replPropertyMetaData for %s\n",
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c
index b17a17d5a3..cb45b41248 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -153,7 +153,7 @@ static WERROR dreplsrv_partition_add_source_dsa(struct dreplsrv_service *s,
W_ERROR_HAVE_NO_MEMORY(source);
ndr_err = ndr_pull_struct_blob(val, source,
- lp_iconv_convenience(s->task->lp_ctx), &source->_repsFromBlob,
+ &source->_repsFromBlob,
(ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index 8fc5e3a47b..6c9baaa13a 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -230,7 +230,7 @@ static DATA_BLOB *get_new_descriptor(struct ldb_module *module,
if (!user_descriptor) {
return NULL;
}
- ndr_err = ndr_pull_struct_blob(object, user_descriptor, NULL,
+ ndr_err = ndr_pull_struct_blob(object, user_descriptor,
user_descriptor,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
@@ -247,7 +247,7 @@ static DATA_BLOB *get_new_descriptor(struct ldb_module *module,
if (!old_descriptor) {
return NULL;
}
- ndr_err = ndr_pull_struct_blob(old_sd, old_descriptor, NULL,
+ ndr_err = ndr_pull_struct_blob(old_sd, old_descriptor,
old_descriptor,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
@@ -262,7 +262,7 @@ static DATA_BLOB *get_new_descriptor(struct ldb_module *module,
if (!parent_descriptor) {
return NULL;
}
- ndr_err = ndr_pull_struct_blob(parent, parent_descriptor, NULL,
+ ndr_err = ndr_pull_struct_blob(parent, parent_descriptor,
parent_descriptor,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
@@ -305,7 +305,6 @@ static DATA_BLOB *get_new_descriptor(struct ldb_module *module,
}
ndr_err = ndr_push_struct_blob(linear_sd, mem_ctx,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
final_sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -323,13 +322,12 @@ static DATA_BLOB *descr_get_descriptor_to_show(struct ldb_module *module,
struct security_descriptor *old_sd, *final_sd;
DATA_BLOB *linear_sd;
enum ndr_err_code ndr_err;
- struct ldb_context *ldb = ldb_module_get_ctx(module);
old_sd = talloc(mem_ctx, struct security_descriptor);
if (!old_sd) {
return NULL;
}
- ndr_err = ndr_pull_struct_blob(sd, old_sd, NULL,
+ ndr_err = ndr_pull_struct_blob(sd, old_sd,
old_sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
@@ -350,7 +348,6 @@ static DATA_BLOB *descr_get_descriptor_to_show(struct ldb_module *module,
}
ndr_err = ndr_push_struct_blob(linear_sd, mem_ctx,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
final_sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index 39af87091c..12adf16181 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -276,7 +276,7 @@ static int handle_dereference_fds(struct ldb_dn *dn,
return LDB_ERR_INVALID_DN_SYNTAX;
}
- ndr_err = ndr_push_struct_blob(&sid_blob, NULL, NULL, sid,
+ ndr_err = ndr_push_struct_blob(&sid_blob, NULL, sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
talloc_free(sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index f9e7f52cd9..de2c6da94c 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -519,7 +519,7 @@ static int setup_primary_kerberos(struct setup_password_fields_io *io,
}
/* TODO: use ndr_pull_struct_blob_all(), when the ndr layer handles it correct with relative pointers */
- ndr_err = ndr_pull_struct_blob(&blob, io->ac, lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")), &_old_pkb,
+ ndr_err = ndr_pull_struct_blob(&blob, io->ac, &_old_pkb,
(ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
@@ -636,7 +636,6 @@ static int setup_primary_kerberos_newer(struct setup_password_fields_io *io,
/* TODO: use ndr_pull_struct_blob_all(), when the ndr layer handles it correct with relative pointers */
ndr_err = ndr_pull_struct_blob(&blob, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&_old_pkb,
(ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1068,7 +1067,6 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
/* if there's an old supplementaCredentials blob then parse it */
if (io->o.supplemental) {
ndr_err = ndr_pull_struct_blob_all(io->o.supplemental, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&_old_scb,
(ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1148,7 +1146,6 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
}
ndr_err = ndr_push_struct_blob(&pknb_blob, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&pknb,
(ndr_push_flags_fn_t)ndr_push_package_PrimaryKerberosBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1180,7 +1177,6 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
}
ndr_err = ndr_push_struct_blob(&pkb_blob, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&pkb,
(ndr_push_flags_fn_t)ndr_push_package_PrimaryKerberosBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1211,7 +1207,6 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
}
ndr_err = ndr_push_struct_blob(&pdb_blob, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&pdb,
(ndr_push_flags_fn_t)ndr_push_package_PrimaryWDigestBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1240,7 +1235,6 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
pcb.cleartext = *io->n.cleartext_utf16;
ndr_err = ndr_push_struct_blob(&pcb_blob, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&pcb,
(ndr_push_flags_fn_t)ndr_push_package_PrimaryCLEARTEXTBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1266,7 +1260,6 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
*/
pb.names = names;
ndr_err = ndr_push_struct_blob(&pb_blob, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&pb,
(ndr_push_flags_fn_t)ndr_push_package_PackagesBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1294,7 +1287,6 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
scb.sub.packages = packages;
ndr_err = ndr_push_struct_blob(&io->g.supplemental, io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&scb,
(ndr_push_flags_fn_t)ndr_push_supplementalCredentialsBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1335,8 +1327,7 @@ static int setup_given_passwords(struct setup_password_fields_io *io,
ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
- if (!convert_string_talloc_convenience(io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
+ if (!convert_string_talloc(io->ac,
CH_UTF8, CH_UTF16,
g->cleartext_utf8->data,
g->cleartext_utf8->length,
@@ -1361,7 +1352,6 @@ static int setup_given_passwords(struct setup_password_fields_io *io,
return LDB_ERR_OPERATIONS_ERROR;
}
if (!convert_string_talloc_convenience(io->ac,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
CH_UTF16MUNGED, CH_UTF8,
g->cleartext_utf16->data,
g->cleartext_utf16->length,
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index a6aeb5e58f..72ffd0e21c 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -911,7 +911,6 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
/* generated NDR encoded values */
ndr_err = ndr_push_struct_blob(&nmd_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&nmd,
(ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1144,8 +1143,7 @@ static int replmd_update_rpmd(struct ldb_module *module,
return LDB_ERR_OPERATIONS_ERROR;
}
- ndr_err = ndr_pull_struct_blob(omd_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")), &omd,
+ ndr_err = ndr_pull_struct_blob(omd_value, msg, &omd,
(ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0,(__location__ ": Failed to parse replPropertyMetaData for %s\n",
@@ -1207,9 +1205,7 @@ static int replmd_update_rpmd(struct ldb_module *module,
return ret;
}
- ndr_err = ndr_push_struct_blob(md_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
- &omd,
+ ndr_err = ndr_push_struct_blob(md_value, msg, &omd,
(ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0,(__location__ ": Failed to marshall replPropertyMetaData for %s\n",
@@ -2749,9 +2745,7 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar)
for (i=0; i < md->ctr.ctr1.count; i++) {
md->ctr.ctr1.array[i].local_usn = ar->seq_num;
}
- ndr_err = ndr_push_struct_blob(&md_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
- md,
+ ndr_err = ndr_push_struct_blob(&md_value, msg, md,
(ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -2860,8 +2854,7 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
/* find existing meta data */
omd_value = ldb_msg_find_ldb_val(ar->search_msg, "replPropertyMetaData");
if (omd_value) {
- ndr_err = ndr_pull_struct_blob(omd_value, ar,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")), &omd,
+ ndr_err = ndr_pull_struct_blob(omd_value, ar, &omd,
(ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -2969,9 +2962,7 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
}
/* create the meta data value */
- ndr_err = ndr_push_struct_blob(&nmd_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
- &nmd,
+ ndr_err = ndr_push_struct_blob(&nmd_value, msg, &nmd,
(ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -3192,8 +3183,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
*/
ouv_value = ldb_msg_find_ldb_val(ar->search_msg, "replUpToDateVector");
if (ouv_value) {
- ndr_err = ndr_pull_struct_blob(ouv_value, ar,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")), &ouv,
+ ndr_err = ndr_pull_struct_blob(ouv_value, ar, &ouv,
(ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -3316,9 +3306,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
if (!msg) return replmd_replicated_request_werror(ar, WERR_NOMEM);
msg->dn = ar->search_msg->dn;
- ndr_err = ndr_push_struct_blob(&nuv_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
- &nuv,
+ ndr_err = ndr_push_struct_blob(&nuv_value, msg, &nuv,
(ndr_push_flags_fn_t)ndr_push_replUpToDateVectorBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -3355,7 +3343,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
trf = talloc(ar, struct repsFromToBlob);
if (!trf) return replmd_replicated_request_werror(ar, WERR_NOMEM);
- ndr_err = ndr_pull_struct_blob(&orf_el->values[i], trf, lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")), trf,
+ ndr_err = ndr_pull_struct_blob(&orf_el->values[i], trf, trf,
(ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -3406,7 +3394,6 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a
/* we now fill the value which is already attached to ldb_message */
ndr_err = ndr_push_struct_blob(nrf_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&nrf,
(ndr_push_flags_fn_t)ndr_push_repsFromToBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/dsdb/samdb/ldb_modules/ridalloc.c b/source4/dsdb/samdb/ldb_modules/ridalloc.c
index a64062fcdc..05aee77638 100644
--- a/source4/dsdb/samdb/ldb_modules/ridalloc.c
+++ b/source4/dsdb/samdb/ldb_modules/ridalloc.c
@@ -72,7 +72,6 @@ static void ridalloc_poke_rid_manager(struct ldb_module *module)
TALLOC_CTX *tmp_ctx = talloc_new(module);
msg = messaging_client_init(tmp_ctx, lp_messaging_path(tmp_ctx, lp_ctx),
- lp_iconv_convenience(lp_ctx),
ldb_get_event_context(ldb));
if (!msg) {
DEBUG(3,(__location__ ": Failed to create messaging context\n"));
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sam.c b/source4/dsdb/samdb/ldb_modules/samba3sam.c
index 61013d133e..42245ce491 100644
--- a/source4/dsdb/samdb/ldb_modules/samba3sam.c
+++ b/source4/dsdb/samdb/ldb_modules/samba3sam.c
@@ -94,7 +94,7 @@ static void generate_sambaPrimaryGroupSID(struct ldb_module *module, const char
return;
}
- ndr_err = ndr_pull_struct_blob(sidval, sid, NULL, sid, (ndr_pull_flags_fn_t)ndr_pull_dom_sid);
+ ndr_err = ndr_pull_struct_blob(sidval, sid, sid, (ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(sid);
return;
@@ -188,7 +188,6 @@ static struct ldb_val encode_sid(struct ldb_module *module, TALLOC_CTX *ctx, con
}
ndr_err = ndr_push_struct_blob(&out, ctx,
- NULL,
sid, (ndr_push_flags_fn_t)ndr_push_dom_sid);
talloc_free(sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -210,7 +209,7 @@ static struct ldb_val decode_sid(struct ldb_module *module, TALLOC_CTX *ctx, con
return out;
}
- ndr_err = ndr_pull_struct_blob(val, sid, NULL, sid,
+ ndr_err = ndr_pull_struct_blob(val, sid, sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
goto done;
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 4a50a3fa47..4d1659df0b 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -327,7 +327,7 @@ static bool samldb_msg_add_sid(struct ldb_message *msg,
struct ldb_val v;
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(&v, msg, NULL, sid,
+ ndr_err = ndr_push_struct_blob(&v, msg, sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
diff --git a/source4/dsdb/samdb/ldb_modules/schema_load.c b/source4/dsdb/samdb/ldb_modules/schema_load.c
index b4a68769e6..4df6f1e38a 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_load.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_load.c
@@ -215,7 +215,6 @@ static int dsdb_schema_from_db(struct ldb_module *module, struct ldb_dn *schema_
}
ret = dsdb_schema_from_ldb_results(tmp_ctx, ldb,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
schema_res, a_res, c_res, schema, &error_string);
if (ret != LDB_SUCCESS) {
ldb_asprintf_errstring(ldb,
diff --git a/source4/dsdb/schema/schema_info_attr.c b/source4/dsdb/schema/schema_info_attr.c
index ac22eb9b3f..a9c5e932a1 100644
--- a/source4/dsdb/schema/schema_info_attr.c
+++ b/source4/dsdb/schema/schema_info_attr.c
@@ -100,7 +100,7 @@ WERROR dsdb_schema_info_from_blob(const DATA_BLOB *blob,
W_ERROR_HAVE_NO_MEMORY(temp_ctx);
ndr_err = ndr_pull_struct_blob_all(blob, temp_ctx,
- lp_iconv_convenience(NULL), &schema_info_blob,
+ &schema_info_blob,
(ndr_pull_flags_fn_t)ndr_pull_schemaInfoBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -140,7 +140,7 @@ WERROR dsdb_blob_from_schema_info(const struct dsdb_schema_info *schema_info,
schema_info_blob.invocation_id = schema_info->invocation_id;
ndr_err = ndr_push_struct_blob(blob, mem_ctx,
- lp_iconv_convenience(NULL), &schema_info_blob,
+ &schema_info_blob,
(ndr_push_flags_fn_t)ndr_push_schemaInfoBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index cdd37f094b..55e78ebf3a 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -33,14 +33,13 @@
#include "../lib/util/asn1.h"
-struct dsdb_schema *dsdb_new_schema(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience)
+struct dsdb_schema *dsdb_new_schema(TALLOC_CTX *mem_ctx)
{
struct dsdb_schema *schema = talloc_zero(mem_ctx, struct dsdb_schema);
if (!schema) {
return NULL;
}
- schema->iconv_convenience = iconv_convenience;
return schema;
}
@@ -66,7 +65,6 @@ WERROR dsdb_load_prefixmap_from_drsuapi(struct dsdb_schema *schema,
}
static WERROR _dsdb_prefixmap_from_ldb_val(const struct ldb_val *pfm_ldb_val,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct dsdb_schema_prefixmap **_pfm)
{
@@ -78,7 +76,7 @@ static WERROR _dsdb_prefixmap_from_ldb_val(const struct ldb_val *pfm_ldb_val,
W_ERROR_HAVE_NO_MEMORY(temp_ctx);
ndr_err = ndr_pull_struct_blob(pfm_ldb_val, temp_ctx,
- iconv_convenience, &pfm_blob,
+ &pfm_blob,
(ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
@@ -119,7 +117,6 @@ WERROR dsdb_load_oid_mappings_ldb(struct dsdb_schema *schema,
/* fetch prefixMap */
werr = _dsdb_prefixmap_from_ldb_val(prefixMap,
- schema->iconv_convenience,
mem_ctx, &pfm);
W_ERROR_NOT_OK_GOTO(werr, DONE);
@@ -173,7 +170,7 @@ WERROR dsdb_get_oid_mappings_ldb(const struct dsdb_schema *schema,
pfm.reserved = 0;
pfm.ctr.dsdb = *ctr;
- ndr_err = ndr_push_struct_blob(prefixMap, mem_ctx, schema->iconv_convenience, &pfm,
+ ndr_err = ndr_push_struct_blob(prefixMap, mem_ctx, &pfm,
(ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
talloc_free(ctr);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -286,7 +283,6 @@ WERROR dsdb_write_prefixes_from_schema_to_ldb(TALLOC_CTX *mem_ctx, struct ldb_co
pfm_blob.ctr.dsdb = *ctr;
ndr_err = ndr_push_struct_blob(&ndr_blob, temp_ctx,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
&pfm_blob,
(ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -326,7 +322,6 @@ WERROR dsdb_read_prefixes_from_ldb(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
WERROR werr;
int ldb_ret;
const struct ldb_val *prefix_val;
- struct smb_iconv_convenience *iconv_convenience;
struct ldb_dn *schema_dn;
struct ldb_result *schema_res = NULL;
static const char *schema_attrs[] = {
@@ -358,10 +353,7 @@ WERROR dsdb_read_prefixes_from_ldb(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
return WERR_FOOBAR;
}
- iconv_convenience = lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm"));
-
werr = _dsdb_prefixmap_from_ldb_val(prefix_val,
- iconv_convenience,
mem_ctx,
_pfm);
talloc_free(schema_res);
@@ -704,7 +696,6 @@ WERROR dsdb_class_from_ldb(struct dsdb_schema *schema,
*/
int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
- struct smb_iconv_convenience *iconv_convenience,
struct ldb_result *schema_res,
struct ldb_result *attrs_res, struct ldb_result *objectclass_res,
struct dsdb_schema **schema_out,
@@ -717,7 +708,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
struct ldb_val info_val_default;
struct dsdb_schema *schema;
- schema = dsdb_new_schema(mem_ctx, iconv_convenience);
+ schema = dsdb_new_schema(mem_ctx);
if (!schema) {
dsdb_oom(error_string, mem_ctx);
return LDB_ERR_OPERATIONS_ERROR;
@@ -892,7 +883,7 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
} \
if (_a && _a->value_ctr.num_values >= 1) { \
size_t _ret; \
- if (!convert_string_talloc_convenience(mem_ctx, s->iconv_convenience, CH_UTF16, CH_UNIX, \
+ if (!convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX, \
_a->value_ctr.values[0].blob->data, \
_a->value_ctr.values[0].blob->length, \
(void **)discard_const(&(p)->elem), &_ret, false)) { \
@@ -1123,7 +1114,7 @@ WERROR dsdb_class_from_drsuapi(struct ldb_context *ldb,
}
status = dsdb_syntax_one_DN_drsuapi_to_ldb(mem_ctx, ldb, find_syntax_map_by_standard_oid(LDB_SYNTAX_DN),
- schema->iconv_convenience, attr->value_ctr.values[0].blob, &blob);
+ attr->value_ctr.values[0].blob, &blob);
if (!W_ERROR_IS_OK(status)) {
return status;
}
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index fe6ef42e8c..07d75c44a8 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -589,7 +589,7 @@ WERROR dsdb_set_schema_from_ldif(struct ldb_context *ldb, const char *pf, const
goto nomem;
}
- schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")));
+ schema = dsdb_new_schema(mem_ctx);
schema->fsmo.we_are_master = true;
schema->fsmo.master_dn = ldb_dn_new_fmt(schema, ldb, "@PROVISION_SCHEMA_MASTER");
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index a0eed3d7c0..2e6f411a7a 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -1352,8 +1352,7 @@ static WERROR dsdb_syntax_UNICODE_drsuapi_to_ldb(struct ldb_context *ldb,
return WERR_FOOBAR;
}
- if (!convert_string_talloc_convenience(out->values,
- schema->iconv_convenience,
+ if (!convert_string_talloc(out->values,
CH_UTF16, CH_UNIX,
in->value_ctr.values[i].blob->data,
in->value_ctr.values[i].blob->length,
@@ -1394,8 +1393,8 @@ static WERROR dsdb_syntax_UNICODE_ldb_to_drsuapi(struct ldb_context *ldb,
for (i=0; i < in->num_values; i++) {
out->value_ctr.values[i].blob = &blobs[i];
- if (!convert_string_talloc_convenience(blobs,
- schema->iconv_convenience, CH_UNIX, CH_UTF16,
+ if (!convert_string_talloc(blobs,
+ CH_UNIX, CH_UTF16,
in->values[i].data, in->values[i].length,
(void **)&blobs[i].data, &blobs[i].length, false)) {
return WERR_FOOBAR;
@@ -1476,7 +1475,6 @@ static WERROR dsdb_syntax_UNICODE_validate_ldb(struct ldb_context *ldb,
WERROR dsdb_syntax_one_DN_drsuapi_to_ldb(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
const struct dsdb_syntax *syntax,
- struct smb_iconv_convenience *iconv_convenience,
const DATA_BLOB *in, DATA_BLOB *out)
{
struct drsuapi_DsReplicaObjectIdentifier3 id3;
@@ -1504,7 +1502,7 @@ WERROR dsdb_syntax_one_DN_drsuapi_to_ldb(TALLOC_CTX *mem_ctx, struct ldb_context
/* windows sometimes sends an extra two pad bytes here */
ndr_err = ndr_pull_struct_blob(in,
- tmp_ctx, iconv_convenience, &id3,
+ tmp_ctx, &id3,
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -1536,7 +1534,7 @@ WERROR dsdb_syntax_one_DN_drsuapi_to_ldb(TALLOC_CTX *mem_ctx, struct ldb_context
if (id3.__ndr_size_sid) {
DATA_BLOB sid_blob;
- ndr_err = ndr_push_struct_blob(&sid_blob, tmp_ctx, iconv_convenience, &id3.sid,
+ ndr_err = ndr_push_struct_blob(&sid_blob, tmp_ctx, &id3.sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -1575,7 +1573,6 @@ static WERROR dsdb_syntax_DN_drsuapi_to_ldb(struct ldb_context *ldb,
for (i=0; i < out->num_values; i++) {
WERROR status = dsdb_syntax_one_DN_drsuapi_to_ldb(out->values, ldb, attr->syntax,
- schema->iconv_convenience,
in->value_ctr.values[i].blob,
&out->values[i]);
if (!W_ERROR_IS_OK(status)) {
@@ -1644,7 +1641,7 @@ static WERROR dsdb_syntax_DN_ldb_to_drsuapi(struct ldb_context *ldb,
id3.dn = ldb_dn_get_linearized(dn);
- ndr_err = ndr_push_struct_blob(&blobs[i], blobs, schema->iconv_convenience, &id3, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&blobs[i], blobs, &id3, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
talloc_free(tmp_ctx);
@@ -1712,7 +1709,6 @@ static WERROR dsdb_syntax_DN_validate_one_val(struct ldb_context *ldb,
num_components++;
ndr_err = ndr_pull_struct_blob_all(sid_blob,
tmp_ctx,
- schema->iconv_convenience,
&sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1838,7 +1834,7 @@ static WERROR dsdb_syntax_DN_BINARY_drsuapi_to_ldb(struct ldb_context *ldb,
/* windows sometimes sends an extra two pad bytes here */
ndr_err = ndr_pull_struct_blob(in->value_ctr.values[i].blob,
- tmp_ctx, schema->iconv_convenience, &id3,
+ tmp_ctx, &id3,
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -1869,7 +1865,7 @@ static WERROR dsdb_syntax_DN_BINARY_drsuapi_to_ldb(struct ldb_context *ldb,
if (id3.__ndr_size_sid) {
DATA_BLOB sid_blob;
- ndr_err = ndr_push_struct_blob(&sid_blob, tmp_ctx, schema->iconv_convenience, &id3.sid,
+ ndr_err = ndr_push_struct_blob(&sid_blob, tmp_ctx, &id3.sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -1954,7 +1950,7 @@ static WERROR dsdb_syntax_DN_BINARY_ldb_to_drsuapi(struct ldb_context *ldb,
if (sid_blob) {
ndr_err = ndr_pull_struct_blob_all(sid_blob,
- tmp_ctx, schema->iconv_convenience, &id3.sid,
+ tmp_ctx, &id3.sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -1968,7 +1964,7 @@ static WERROR dsdb_syntax_DN_BINARY_ldb_to_drsuapi(struct ldb_context *ldb,
/* get binary stuff */
id3.binary = dsdb_dn->extra_part;
- ndr_err = ndr_push_struct_blob(&blobs[i], blobs, schema->iconv_convenience, &id3, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
+ ndr_err = ndr_push_struct_blob(&blobs[i], blobs, &id3, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
talloc_free(tmp_ctx);
@@ -2139,7 +2135,7 @@ static WERROR dsdb_syntax_PRESENTATION_ADDRESS_drsuapi_to_ldb(struct ldb_context
return WERR_FOOBAR;
}
- if (!convert_string_talloc_convenience(out->values, schema->iconv_convenience, CH_UTF16, CH_UNIX,
+ if (!convert_string_talloc(out->values, CH_UTF16, CH_UNIX,
in->value_ctr.values[i].blob->data+4,
in->value_ctr.values[i].blob->length-4,
(void **)&str, NULL, false)) {
@@ -2182,7 +2178,7 @@ static WERROR dsdb_syntax_PRESENTATION_ADDRESS_ldb_to_drsuapi(struct ldb_context
out->value_ctr.values[i].blob = &blobs[i];
- if (!convert_string_talloc_convenience(blobs, schema->iconv_convenience, CH_UNIX, CH_UTF16,
+ if (!convert_string_talloc(blobs, CH_UNIX, CH_UTF16,
in->values[i].data,
in->values[i].length,
(void **)&data, &ret, false)) {
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index 33c4c8cdf6..97820c0c32 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -192,7 +192,6 @@ static void samba_kdc_free_entry(krb5_context context, hdb_entry_ex *entry_ex)
}
static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct ldb_message *msg,
unsigned int userAccountControl,
@@ -228,7 +227,7 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
/* supplementalCredentials if present */
if (sc_val) {
- ndr_err = ndr_pull_struct_blob_all(sc_val, mem_ctx, iconv_convenience, &scb,
+ ndr_err = ndr_pull_struct_blob_all(sc_val, mem_ctx, &scb,
(ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
dump_data(0, sc_val->data, sc_val->length);
@@ -277,7 +276,7 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
}
/* we cannot use ndr_pull_struct_blob_all() here, as w2k and w2k3 add padding bytes */
- ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, iconv_convenience, &_pkb,
+ ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &_pkb,
(ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
ret = EINVAL;
@@ -701,8 +700,8 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
entry_ex->entry.generation = NULL;
/* Get keys from the db */
- ret = samba_kdc_message2entry_keys(context, p->kdc_db_ctx->ic_ctx, p,
- msg, userAccountControl, entry_ex);
+ ret = samba_kdc_message2entry_keys(context, p, msg, userAccountControl,
+ entry_ex);
if (ret) {
/* Could be bougus data in the entry, or out of memory */
goto out;
@@ -808,7 +807,7 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
goto out;
}
- ndr_err = ndr_pull_struct_blob(password_val, mem_ctx, p->kdc_db_ctx->ic_ctx, &password_blob,
+ ndr_err = ndr_pull_struct_blob(password_val, mem_ctx, &password_blob,
(ndr_pull_flags_fn_t)ndr_pull_trustAuthInOutBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
ret = EINVAL;
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 984999b83c..b824bb86b0 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -589,9 +589,7 @@ static NTSTATUS kdc_check_generic_kerberos(struct irpc_message *msg,
/* There is no reply to this request */
r->out.generic_reply = data_blob(NULL, 0);
- ndr_err = ndr_pull_struct_blob(&r->in.generic_request, msg,
- lp_iconv_convenience(kdc->task->lp_ctx),
- &pac_validate,
+ ndr_err = ndr_pull_struct_blob(&r->in.generic_request, msg, &pac_validate,
(ndr_pull_flags_fn_t)ndr_pull_PAC_Validate);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return NT_STATUS_INVALID_PARAMETER;
diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index 2a932fa832..8c203e555d 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -34,7 +34,6 @@
static
NTSTATUS samba_get_logon_info_pac_blob(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct auth_serversupplied_info *info,
DATA_BLOB *pac_data)
{
@@ -59,7 +58,7 @@ NTSTATUS samba_get_logon_info_pac_blob(TALLOC_CTX *mem_ctx,
pac_info.logon_info.info->info3 = *info3;
- ndr_err = ndr_push_union_blob(pac_data, mem_ctx, ic, &pac_info,
+ ndr_err = ndr_push_union_blob(pac_data, mem_ctx, &pac_info,
PAC_TYPE_LOGON_INFO,
(ndr_push_flags_fn_t)ndr_push_PAC_INFO);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -154,9 +153,7 @@ NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
return nt_status;
}
- nt_status = samba_get_logon_info_pac_blob(mem_ctx,
- p->kdc_db_ctx->ic_ctx,
- server_info, pac_blob);
+ nt_status = samba_get_logon_info_pac_blob(mem_ctx, server_info, pac_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Building PAC failed: %s\n",
nt_errstr(nt_status)));
@@ -169,20 +166,19 @@ NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
krb5_context context,
- struct smb_iconv_convenience *ic,
krb5_pac *pac, DATA_BLOB *pac_blob)
{
struct auth_serversupplied_info *server_info;
krb5_error_code ret;
NTSTATUS nt_status;
- ret = kerberos_pac_to_server_info(mem_ctx, ic, *pac,
+ ret = kerberos_pac_to_server_info(mem_ctx, *pac,
context, &server_info);
if (ret) {
return NT_STATUS_UNSUCCESSFUL;
}
- nt_status = samba_get_logon_info_pac_blob(mem_ctx, ic,
+ nt_status = samba_get_logon_info_pac_blob(mem_ctx,
server_info, pac_blob);
return nt_status;
diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c
index 9ebb4bb5c3..5e21199488 100644
--- a/source4/lib/ldb-samba/ldif_handlers.c
+++ b/source4/lib/ldb-samba/ldif_handlers.c
@@ -57,7 +57,6 @@ static int ldif_write_NDR(struct ldb_context *ldb, void *mem_ctx,
}
p = talloc_size(mem_ctx, struct_size);
err = ndr_pull_struct_blob(in, mem_ctx,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
p, pull_fn);
if (err != NDR_ERR_SUCCESS) {
/* fail in not in mask_error mode */
@@ -90,7 +89,7 @@ static int ldif_read_objectSid(struct ldb_context *ldb, void *mem_ctx,
if (sid == NULL) {
return -1;
}
- ndr_err = ndr_push_struct_blob(out, mem_ctx, NULL, sid,
+ ndr_err = ndr_push_struct_blob(out, mem_ctx, sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
talloc_free(sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -112,7 +111,7 @@ int ldif_write_objectSid(struct ldb_context *ldb, void *mem_ctx,
if (sid == NULL) {
return -1;
}
- ndr_err = ndr_pull_struct_blob_all(in, sid, NULL, sid,
+ ndr_err = ndr_pull_struct_blob_all(in, sid, sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(sid);
@@ -209,7 +208,7 @@ static int extended_dn_read_SID(struct ldb_context *ldb, void *mem_ctx,
(const char *)in->data, in->length);
/* Check it looks like a SID */
- ndr_err = ndr_pull_struct_blob_all(out, mem_ctx, NULL, &sid,
+ ndr_err = ndr_pull_struct_blob_all(out, mem_ctx, &sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return -1;
@@ -365,7 +364,7 @@ static int ldif_read_ntSecurityDescriptor(struct ldb_context *ldb, void *mem_ctx
return -1;
}
- ndr_err = ndr_pull_struct_blob(in, sd, NULL, sd,
+ ndr_err = ndr_pull_struct_blob(in, sd, sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
/* If this does not parse, then it is probably SDDL, and we should try it that way */
@@ -378,7 +377,7 @@ static int ldif_read_ntSecurityDescriptor(struct ldb_context *ldb, void *mem_ctx
}
}
- ndr_err = ndr_push_struct_blob(out, mem_ctx, NULL, sd,
+ ndr_err = ndr_push_struct_blob(out, mem_ctx, sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
talloc_free(sd);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -411,7 +410,7 @@ static int ldif_write_ntSecurityDescriptor(struct ldb_context *ldb, void *mem_ct
return -1;
}
/* We can't use ndr_pull_struct_blob_all because this contains relative pointers */
- ndr_err = ndr_pull_struct_blob(in, sd, NULL, sd,
+ ndr_err = ndr_pull_struct_blob(in, sd, sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(sd);
@@ -588,7 +587,6 @@ static int ldif_read_prefixMap(struct ldb_context *ldb, void *mem_ctx,
}
ndr_err = ndr_push_struct_blob(out, mem_ctx,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
blob,
(ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
talloc_free(tmp_ctx);
@@ -633,7 +631,6 @@ static int ldif_write_prefixMap(struct ldb_context *ldb, void *mem_ctx,
return -1;
}
ndr_err = ndr_pull_struct_blob_all(in, blob,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
blob,
(ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h
index c82ad398ff..e7c0b874c1 100644
--- a/source4/lib/messaging/irpc.h
+++ b/source4/lib/messaging/irpc.h
@@ -97,11 +97,9 @@ NTSTATUS messaging_register_tmp(struct messaging_context *msg, void *private_dat
struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
const char *dir,
struct server_id server_id,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev);
struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx,
const char *dir,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev);
NTSTATUS messaging_send_ptr(struct messaging_context *msg, struct server_id server,
uint32_t msg_type, void *ptr);
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 3850bcbc49..19d6971088 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -47,7 +47,6 @@ struct messaging_context {
struct idr_context *dispatch_tree;
struct messaging_rec *pending;
struct messaging_rec *retry_queue;
- struct smb_iconv_convenience *iconv_convenience;
struct irpc_list *irpc;
struct idr_context *idr;
const char **names;
@@ -544,7 +543,6 @@ static int messaging_destructor(struct messaging_context *msg)
struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
const char *dir,
struct server_id server_id,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev)
{
struct messaging_context *msg;
@@ -573,7 +571,6 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
msg->base_path = talloc_reference(msg, dir);
msg->path = messaging_path(msg, server_id);
msg->server_id = server_id;
- msg->iconv_convenience = iconv_convenience;
msg->idr = idr_init(msg);
msg->dispatch_tree = idr_init(msg);
msg->start_time = timeval_current();
@@ -624,13 +621,12 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
*/
struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx,
const char *dir,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev)
{
struct server_id id;
ZERO_STRUCT(id);
id.id = random() % 0x10000000;
- return messaging_init(mem_ctx, dir, id, iconv_convenience, ev);
+ return messaging_init(mem_ctx, dir, id, ev);
}
/*
a list of registered irpc server functions
@@ -714,7 +710,7 @@ NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status)
m->header.status = status;
/* setup the reply */
- push = ndr_push_init_ctx(m->ndr, m->msg_ctx->iconv_convenience);
+ push = ndr_push_init_ctx(m->ndr);
if (push == NULL) {
status = NT_STATUS_NO_MEMORY;
goto failed;
@@ -814,7 +810,7 @@ static void irpc_handler(struct messaging_context *msg_ctx, void *private_data,
m->from = src;
- m->ndr = ndr_pull_init_blob(packet, m, msg_ctx->iconv_convenience);
+ m->ndr = ndr_pull_init_blob(packet, m);
if (m->ndr == NULL) goto failed;
m->ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
@@ -906,7 +902,7 @@ struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx,
header.status = NT_STATUS_OK;
/* construct the irpc packet */
- ndr = ndr_push_init_ctx(irpc, msg_ctx->iconv_convenience);
+ ndr = ndr_push_init_ctx(irpc);
if (ndr == NULL) goto failed;
ndr_err = ndr_push_irpc_header(ndr, NDR_SCALARS|NDR_BUFFERS, &header);
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index cea3accce0..ddcf945400 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -99,12 +99,10 @@ PyObject *py_messaging_connect(PyTypeObject *self, PyObject *args, PyObject *kwa
ret->msg_ctx = messaging_init(ret->mem_ctx,
messaging_path,
server_id,
- py_iconv_convenience(ret->mem_ctx),
ev);
} else {
ret->msg_ctx = messaging_client_init(ret->mem_ctx,
messaging_path,
- py_iconv_convenience(ret->mem_ctx),
ev);
}
@@ -355,12 +353,10 @@ PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
ret->msg_ctx = messaging_init(ret->mem_ctx,
messaging_path,
server_id,
- py_iconv_convenience(ret->mem_ctx),
ev);
} else {
ret->msg_ctx = messaging_client_init(ret->mem_ctx,
messaging_path,
- py_iconv_convenience(ret->mem_ctx),
ev);
}
diff --git a/source4/lib/messaging/tests/irpc.c b/source4/lib/messaging/tests/irpc.c
index 3eb23e0f7d..87a3c7a124 100644
--- a/source4/lib/messaging/tests/irpc.c
+++ b/source4/lib/messaging/tests/irpc.c
@@ -222,7 +222,6 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
messaging_init(tctx,
lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(0, MSG_ID1),
- lp_iconv_convenience(tctx->lp_ctx),
data->ev),
"Failed to init first messaging context");
@@ -230,7 +229,6 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
messaging_init(tctx,
lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(0, MSG_ID2),
- lp_iconv_convenience(tctx->lp_ctx),
data->ev),
"Failed to init second messaging context");
diff --git a/source4/lib/messaging/tests/messaging.c b/source4/lib/messaging/tests/messaging.c
index f61132caac..96cb180ff7 100644
--- a/source4/lib/messaging/tests/messaging.c
+++ b/source4/lib/messaging/tests/messaging.c
@@ -72,9 +72,7 @@ static bool test_ping_speed(struct torture_context *tctx)
ev = tctx->ev;
msg_server_ctx = messaging_init(tctx,
- lp_messaging_path(tctx, tctx->lp_ctx),
- cluster_id(0, 1),
- lp_iconv_convenience(tctx->lp_ctx),
+ lp_messaging_path(tctx, tctx->lp_ctx), cluster_id(0, 1),
ev);
torture_assert(tctx, msg_server_ctx != NULL, "Failed to init ping messaging context");
@@ -85,7 +83,6 @@ static bool test_ping_speed(struct torture_context *tctx)
msg_client_ctx = messaging_init(tctx,
lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(0, 2),
- lp_iconv_convenience(tctx->lp_ctx),
ev);
torture_assert(tctx, msg_client_ctx != NULL,
diff --git a/source4/lib/registry/hive.c b/source4/lib/registry/hive.c
index c9cb247071..5763dff0d2 100644
--- a/source4/lib/registry/hive.c
+++ b/source4/lib/registry/hive.c
@@ -54,7 +54,7 @@ _PUBLIC_ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location,
if (!strncmp(peek, "regf", 4)) {
close(fd);
- return reg_open_regf_file(parent_ctx, location, lp_iconv_convenience(lp_ctx), root);
+ return reg_open_regf_file(parent_ctx, location, root);
} else if (!strncmp(peek, "TDB file", 8)) {
close(fd);
return reg_open_ldb_file(parent_ctx, location, session_info,
diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c
index a01c3554c4..061d0fe52d 100644
--- a/source4/lib/registry/patchfile.c
+++ b/source4/lib/registry/patchfile.c
@@ -26,12 +26,10 @@
_PUBLIC_ WERROR reg_preg_diff_load(int fd,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
_PUBLIC_ WERROR reg_dotreg_diff_load(int fd,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
@@ -338,7 +336,6 @@ _PUBLIC_ WERROR reg_generate_diff(struct registry_context *ctx1,
* Load diff file
*/
_PUBLIC_ WERROR reg_diff_load(const char *filename,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data)
{
@@ -372,10 +369,10 @@ _PUBLIC_ WERROR reg_diff_load(const char *filename,
#endif
if (strncmp(hdr, "PReg", 4) == 0) {
/* Must be a GPO Registry.pol file */
- return reg_preg_diff_load(fd, iconv_convenience, callbacks, callback_data);
+ return reg_preg_diff_load(fd, callbacks, callback_data);
} else {
/* Must be a normal .REG file */
- return reg_dotreg_diff_load(fd, iconv_convenience, callbacks, callback_data);
+ return reg_dotreg_diff_load(fd, callbacks, callback_data);
}
}
@@ -531,7 +528,6 @@ static WERROR reg_diff_apply_del_all_values(void *_ctx, const char *key_name)
* Apply diff to a registry context
*/
_PUBLIC_ WERROR reg_diff_apply(struct registry_context *ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char *filename)
{
struct reg_diff_callbacks callbacks;
@@ -543,6 +539,5 @@ _PUBLIC_ WERROR reg_diff_apply(struct registry_context *ctx,
callbacks.del_all_values = reg_diff_apply_del_all_values;
callbacks.done = NULL;
- return reg_diff_load(filename, iconv_convenience,
- &callbacks, ctx);
+ return reg_diff_load(filename, &callbacks, ctx);
}
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c
index 5bb955ebc3..70437a1087 100644
--- a/source4/lib/registry/patchfile_dotreg.c
+++ b/source4/lib/registry/patchfile_dotreg.c
@@ -35,7 +35,6 @@
struct dotreg_data {
int fd;
- struct smb_iconv_convenience *iconv_convenience;
};
static WERROR reg_dotreg_diff_add_key(void *_data, const char *key_name)
@@ -61,7 +60,7 @@ static WERROR reg_dotreg_diff_set_value(void *_data, const char *path,
uint32_t value_type, DATA_BLOB value)
{
struct dotreg_data *data = (struct dotreg_data *)_data;
- char *data_string = reg_val_data_string(NULL, data->iconv_convenience,
+ char *data_string = reg_val_data_string(NULL,
value_type, value);
W_ERROR_HAVE_NO_MEMORY(data_string);
fdprintf(data->fd, "\"%s\"=%s:%s\n",
@@ -101,7 +100,6 @@ static WERROR reg_dotreg_diff_del_all_values(void *callback_data,
* Save registry diff
*/
_PUBLIC_ WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
- struct smb_iconv_convenience *iconv_convenience,
struct reg_diff_callbacks **callbacks,
void **callback_data)
{
@@ -110,8 +108,6 @@ _PUBLIC_ WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
data = talloc_zero(ctx, struct dotreg_data);
*callback_data = data;
- data->iconv_convenience = iconv_convenience;
-
if (filename) {
data->fd = open(filename, O_CREAT|O_WRONLY, 0755);
if (data->fd < 0) {
@@ -140,7 +136,6 @@ _PUBLIC_ WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
* Load diff file
*/
_PUBLIC_ WERROR reg_dotreg_diff_load(int fd,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data)
{
@@ -248,7 +243,7 @@ _PUBLIC_ WERROR reg_dotreg_diff_load(int fd,
q++;
}
- reg_string_to_val(line, iconv_convenience,
+ reg_string_to_val(line,
q?p:"REG_SZ", q?q:p,
&value_type, &value);
diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c
index 625904bd52..28b56dd7e9 100644
--- a/source4/lib/registry/patchfile_preg.c
+++ b/source4/lib/registry/patchfile_preg.c
@@ -164,7 +164,6 @@ static WERROR reg_preg_diff_done(void *_data)
* Save registry diff
*/
_PUBLIC_ WERROR reg_preg_diff_save(TALLOC_CTX *ctx, const char *filename,
- struct smb_iconv_convenience *ic,
struct reg_diff_callbacks **callbacks,
void **callback_data)
{
@@ -209,7 +208,6 @@ _PUBLIC_ WERROR reg_preg_diff_save(TALLOC_CTX *ctx, const char *filename,
* Load diff file
*/
_PUBLIC_ WERROR reg_preg_diff_load(int fd,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data)
{
diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c
index d4cdd895af..58894feb3a 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -22,7 +22,6 @@
#include <tevent.h>
#include "libcli/util/pyerrors.h"
#include "lib/registry/registry.h"
-#include "scripting/python/modules.h" /* for py_iconv_convenience() */
#include "lib/talloc/pytalloc.h"
#include "auth/credentials/pycredentials.h"
#include "param/pyparam.h"
@@ -91,7 +90,7 @@ static PyObject *py_diff_apply(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "s", &filename))
return NULL;
- result = reg_diff_apply(ctx, py_iconv_convenience(NULL), filename);
+ result = reg_diff_apply(ctx, filename);
PyErr_WERROR_IS_ERR_RAISE(result);
Py_RETURN_NONE;
diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index 3888b8e3ab..176b256c87 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -49,7 +49,6 @@ struct regf_data {
int fd;
struct hbin_block **hbins;
struct regf_hdr *header;
- struct smb_iconv_convenience *iconv_convenience;
};
static WERROR regf_save_hbin(struct regf_data *data);
@@ -134,7 +133,7 @@ static DATA_BLOB hbin_get(const struct regf_data *data, uint32_t offset)
static bool hbin_get_tdr(struct regf_data *regf, uint32_t offset,
TALLOC_CTX *ctx, tdr_pull_fn_t pull_fn, void *p)
{
- struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(regf);
pull->data = hbin_get(regf, offset);
if (!pull->data.data) {
@@ -272,7 +271,7 @@ static uint32_t hbin_store (struct regf_data *data, DATA_BLOB blob)
static uint32_t hbin_store_tdr(struct regf_data *data,
tdr_push_fn_t push_fn, void *p)
{
- struct tdr_push *push = tdr_push_init(data, data->iconv_convenience);
+ struct tdr_push *push = tdr_push_init(data);
uint32_t ret;
if (NT_STATUS_IS_ERR(push_fn(push, p))) {
@@ -399,7 +398,7 @@ static uint32_t hbin_store_tdr_resize(struct regf_data *regf,
tdr_push_fn_t push_fn,
uint32_t orig_offset, void *p)
{
- struct tdr_push *push = tdr_push_init(regf, regf->iconv_convenience);
+ struct tdr_push *push = tdr_push_init(regf);
uint32_t ret;
if (NT_STATUS_IS_ERR(push_fn(push, p))) {
@@ -615,7 +614,7 @@ static WERROR regf_get_subkey_by_index(TALLOC_CTX *ctx,
if (!strncmp((char *)data.data, "li", 2)) {
struct li_block li;
- struct tdr_pull *pull = tdr_pull_init(private_data->hive, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(private_data->hive);
DEBUG(10, ("Subkeys in LI list\n"));
pull->data = data;
@@ -636,7 +635,7 @@ static WERROR regf_get_subkey_by_index(TALLOC_CTX *ctx,
} else if (!strncmp((char *)data.data, "lf", 2)) {
struct lf_block lf;
- struct tdr_pull *pull = tdr_pull_init(private_data->hive, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(private_data->hive);
DEBUG(10, ("Subkeys in LF list\n"));
pull->data = data;
@@ -657,7 +656,7 @@ static WERROR regf_get_subkey_by_index(TALLOC_CTX *ctx,
key_off = lf.hr[idx].nk_offset;
} else if (!strncmp((char *)data.data, "lh", 2)) {
struct lh_block lh;
- struct tdr_pull *pull = tdr_pull_init(private_data->hive, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(private_data->hive);
DEBUG(10, ("Subkeys in LH list\n"));
pull->data = data;
@@ -677,7 +676,7 @@ static WERROR regf_get_subkey_by_index(TALLOC_CTX *ctx,
key_off = lh.hr[idx].nk_offset;
} else if (!strncmp((char *)data.data, "ri", 2)) {
struct ri_block ri;
- struct tdr_pull *pull = tdr_pull_init(ctx, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(ctx);
uint16_t i;
uint16_t sublist_count = 0;
@@ -811,7 +810,7 @@ static WERROR regf_match_subkey_by_name(TALLOC_CTX *ctx,
return WERR_GENERAL_FAILURE;
}
- pull = tdr_pull_init(ctx, private_data->hive->iconv_convenience);
+ pull = tdr_pull_init(ctx);
pull->data = subkey_data;
@@ -854,7 +853,7 @@ static WERROR regf_get_subkey_by_name(TALLOC_CTX *ctx,
if (!strncmp((char *)data.data, "li", 2)) {
struct li_block li;
- struct tdr_pull *pull = tdr_pull_init(ctx, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(ctx);
uint16_t i;
DEBUG(10, ("Subkeys in LI list\n"));
@@ -885,7 +884,7 @@ static WERROR regf_get_subkey_by_name(TALLOC_CTX *ctx,
return WERR_BADFILE;
} else if (!strncmp((char *)data.data, "lf", 2)) {
struct lf_block lf;
- struct tdr_pull *pull = tdr_pull_init(ctx, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(ctx);
uint16_t i;
DEBUG(10, ("Subkeys in LF list\n"));
@@ -920,7 +919,7 @@ static WERROR regf_get_subkey_by_name(TALLOC_CTX *ctx,
return WERR_BADFILE;
} else if (!strncmp((char *)data.data, "lh", 2)) {
struct lh_block lh;
- struct tdr_pull *pull = tdr_pull_init(ctx, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(ctx);
uint16_t i;
uint32_t hash;
@@ -957,7 +956,7 @@ static WERROR regf_get_subkey_by_name(TALLOC_CTX *ctx,
return WERR_BADFILE;
} else if (!strncmp((char *)data.data, "ri", 2)) {
struct ri_block ri;
- struct tdr_pull *pull = tdr_pull_init(ctx, private_data->hive->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(ctx);
uint16_t i, j;
DEBUG(10, ("Subkeys in RI list\n"));
@@ -1062,7 +1061,7 @@ static WERROR regf_set_sec_desc(struct hive_key *key,
(tdr_pull_fn_t) tdr_pull_nk_block, &root);
/* Push the security descriptor to a blob */
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_struct_blob(&data, regf, NULL,
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_struct_blob(&data, regf,
sec_desc, (ndr_push_flags_fn_t)ndr_push_security_descriptor))) {
DEBUG(0, ("Unable to push security descriptor\n"));
return WERR_GENERAL_FAILURE;
@@ -1215,7 +1214,7 @@ static WERROR regf_get_sec_desc(TALLOC_CTX *ctx, const struct hive_key *key,
data.data = sk.sec_desc;
data.length = sk.rec_size;
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_struct_blob(&data, ctx, NULL, *sd,
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_pull_struct_blob(&data, ctx, *sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor))) {
DEBUG(0, ("Error parsing security descriptor\n"));
return WERR_GENERAL_FAILURE;
@@ -1299,7 +1298,7 @@ static WERROR regf_sl_add_entry(struct regf_data *regf, uint32_t list_offset,
}
if (!strncmp((char *)data.data, "li", 2)) {
- struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(regf);
struct li_block li;
pull->data = data;
@@ -1328,7 +1327,7 @@ static WERROR regf_sl_add_entry(struct regf_data *regf, uint32_t list_offset,
talloc_free(li.nk_offset);
} else if (!strncmp((char *)data.data, "lf", 2)) {
- struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(regf);
struct lf_block lf;
pull->data = data;
@@ -1354,7 +1353,7 @@ static WERROR regf_sl_add_entry(struct regf_data *regf, uint32_t list_offset,
talloc_free(lf.hr);
} else if (!strncmp((char *)data.data, "lh", 2)) {
- struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(regf);
struct lh_block lh;
pull->data = data;
@@ -1403,7 +1402,7 @@ static WERROR regf_sl_del_entry(struct regf_data *regf, uint32_t list_offset,
if (strncmp((char *)data.data, "li", 2) == 0) {
struct li_block li;
- struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(regf);
uint16_t i;
bool found_offset = false;
@@ -1447,7 +1446,7 @@ static WERROR regf_sl_del_entry(struct regf_data *regf, uint32_t list_offset,
list_offset, &li);
} else if (strncmp((char *)data.data, "lf", 2) == 0) {
struct lf_block lf;
- struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(regf);
uint16_t i;
bool found_offset = false;
@@ -1493,7 +1492,7 @@ static WERROR regf_sl_del_entry(struct regf_data *regf, uint32_t list_offset,
list_offset, &lf);
} else if (strncmp((char *)data.data, "lh", 2) == 0) {
struct lh_block lh;
- struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
+ struct tdr_pull *pull = tdr_pull_init(regf);
uint16_t i;
bool found_offset = false;
@@ -1889,7 +1888,7 @@ static WERROR regf_set_value(struct hive_key *key, const char *name,
static WERROR regf_save_hbin(struct regf_data *regf)
{
- struct tdr_push *push = tdr_push_init(regf, regf->iconv_convenience);
+ struct tdr_push *push = tdr_push_init(regf);
unsigned int i;
W_ERROR_HAVE_NO_MEMORY(push);
@@ -1907,7 +1906,7 @@ static WERROR regf_save_hbin(struct regf_data *regf)
regf->header->chksum = regf_hdr_checksum(push->data.data);
talloc_free(push);
- if (NT_STATUS_IS_ERR(tdr_push_to_fd(regf->fd, regf->iconv_convenience,
+ if (NT_STATUS_IS_ERR(tdr_push_to_fd(regf->fd,
(tdr_push_fn_t)tdr_push_regf_hdr,
regf->header))) {
DEBUG(0, ("Error writing registry file header\n"));
@@ -1920,7 +1919,7 @@ static WERROR regf_save_hbin(struct regf_data *regf)
}
for (i = 0; regf->hbins[i]; i++) {
- if (NT_STATUS_IS_ERR(tdr_push_to_fd(regf->fd, regf->iconv_convenience,
+ if (NT_STATUS_IS_ERR(tdr_push_to_fd(regf->fd,
(tdr_push_fn_t)tdr_push_hbin_block,
regf->hbins[i]))) {
DEBUG(0, ("Error writing HBIN block\n"));
@@ -1932,7 +1931,6 @@ static WERROR regf_save_hbin(struct regf_data *regf)
}
WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char *location,
int minor_version, struct hive_key **key)
{
@@ -1947,8 +1945,6 @@ WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
regf = (struct regf_data *)talloc_zero(NULL, struct regf_data);
- regf->iconv_convenience = iconv_convenience;
-
W_ERROR_HAVE_NO_MEMORY(regf);
DEBUG(5, ("Attempting to create registry file\n"));
@@ -2017,7 +2013,7 @@ WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
NULL);
/* Push the security descriptor to a blob */
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_struct_blob(&data, regf, NULL,
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_struct_blob(&data, regf,
sd, (ndr_push_flags_fn_t)ndr_push_security_descriptor))) {
DEBUG(0, ("Unable to push security descriptor\n"));
return WERR_GENERAL_FAILURE;
@@ -2060,7 +2056,7 @@ WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
}
WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
- struct smb_iconv_convenience *iconv_convenience, struct hive_key **key)
+ struct hive_key **key)
{
struct regf_data *regf;
struct regf_hdr *regf_hdr;
@@ -2069,8 +2065,6 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
regf = (struct regf_data *)talloc_zero(parent_ctx, struct regf_data);
- regf->iconv_convenience = iconv_convenience;
-
W_ERROR_HAVE_NO_MEMORY(regf);
DEBUG(5, ("Attempting to load registry file\n"));
@@ -2085,7 +2079,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
return WERR_GENERAL_FAILURE;
}
- pull = tdr_pull_init(regf, regf->iconv_convenience);
+ pull = tdr_pull_init(regf);
pull->data.data = (uint8_t*)fd_load(regf->fd, &pull->data.length, 0, regf);
diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h
index e43b0b054c..76247528b2 100644
--- a/source4/lib/registry/registry.h
+++ b/source4/lib/registry/registry.h
@@ -23,7 +23,6 @@
struct registry_context;
struct loadparm_context;
-struct smb_iconv_convenience;
#include <talloc.h>
#include "libcli/util/werror.h"
@@ -206,8 +205,7 @@ WERROR hive_key_flush(struct hive_key *key);
WERROR reg_open_directory(TALLOC_CTX *parent_ctx,
const char *location, struct hive_key **key);
WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx,
- const char *location, struct smb_iconv_convenience *iconv_convenience,
- struct hive_key **key);
+ const char *location, struct hive_key **key);
WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
@@ -219,7 +217,6 @@ WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
WERROR reg_create_directory(TALLOC_CTX *parent_ctx,
const char *location, struct hive_key **key);
WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char *location,
int major_version,
struct hive_key **key);
@@ -453,19 +450,15 @@ WERROR reg_create_key(TALLOC_CTX *mem_ctx,
/* Utility functions */
const char *str_regtype(int type);
-bool push_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- DATA_BLOB *blob, const char *s);
-bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- DATA_BLOB *blob, const char **a);
-bool pull_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- const DATA_BLOB *blob, const char **s);
-bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
- const DATA_BLOB *blob, const char ***a);
+bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
+bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
+bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
+bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a);
int regtype_by_string(const char *str);
-char *reg_val_data_string(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint32_t type, const DATA_BLOB data);
-char *reg_val_description(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, const char *name,
+char *reg_val_data_string(TALLOC_CTX *mem_ctx, uint32_t type, const DATA_BLOB data);
+char *reg_val_description(TALLOC_CTX *mem_ctx, const char *name,
uint32_t type, const DATA_BLOB data);
-bool reg_string_to_val(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, const char *type_str,
+bool reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str,
const char *data_str, uint32_t *type, DATA_BLOB *data);
WERROR reg_open_key_abs(TALLOC_CTX *mem_ctx, struct registry_context *handle,
const char *name, struct registry_key **result);
@@ -502,18 +495,16 @@ struct reg_diff_callbacks {
};
WERROR reg_diff_apply(struct registry_context *ctx,
- struct smb_iconv_convenience *ic, const char *filename);
+ const char *filename);
WERROR reg_generate_diff(struct registry_context *ctx1,
struct registry_context *ctx2,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
- struct smb_iconv_convenience *iconv_convenience,
struct reg_diff_callbacks **callbacks,
void **callback_data);
WERROR reg_preg_diff_save(TALLOC_CTX *ctx, const char *filename,
- struct smb_iconv_convenience *ic,
struct reg_diff_callbacks **callbacks,
void **callback_data);
WERROR reg_generate_diff_key(struct registry_key *oldkey,
@@ -522,17 +513,14 @@ WERROR reg_generate_diff_key(struct registry_key *oldkey,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
WERROR reg_diff_load(const char *filename,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
WERROR reg_dotreg_diff_load(int fd,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
WERROR reg_preg_diff_load(int fd,
- struct smb_iconv_convenience *iconv_convenience,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
diff --git a/source4/lib/registry/tests/diff.c b/source4/lib/registry/tests/diff.c
index 4241ab5ee2..d6a5bd53f2 100644
--- a/source4/lib/registry/tests/diff.c
+++ b/source4/lib/registry/tests/diff.c
@@ -52,14 +52,11 @@ static bool test_generate_diff(struct torture_context *tctx, void *tcase_data)
static bool test_diff_load(struct torture_context *tctx, void *tcase_data)
{
struct diff_tcase_data *td = tcase_data;
- struct smb_iconv_convenience *ic;
struct reg_diff_callbacks *callbacks;
void *data;
WERROR error;
- ic = lp_iconv_convenience(tctx->lp_ctx);
-
- error = reg_diff_load(td->filename, iconv_convenience, callbacks, data);
+ error = reg_diff_load(td->filename, callbacks, data);
torture_assert_werr_ok(tctx, error, "reg_diff_load");
return true;
@@ -71,7 +68,7 @@ static bool test_diff_apply(struct torture_context *tctx, void *tcase_data)
struct registry_key *key;
WERROR error;
- error = reg_diff_apply(td->r1_ctx, lp_iconv_convenience(tctx->lp_ctx), td->filename);
+ error = reg_diff_apply(td->r1_ctx, td->filename);
torture_assert_werr_ok(tctx, error, "reg_diff_apply");
error = td->r1_ctx->ops->get_predefined_key(td->r1_ctx, HKEY_LOCAL_MACHINE, &key);
@@ -247,16 +244,14 @@ static bool diff_setup_tcase(struct torture_context *tctx, void **data)
static bool diff_setup_preg_tcase (struct torture_context *tctx, void **data)
{
struct diff_tcase_data *td;
- struct smb_iconv_convenience *ic;
WERROR error;
diff_setup_tcase(tctx, data);
td = *data;
- ic = lp_iconv_convenience(tctx->lp_ctx);
-
td->filename = talloc_asprintf(tctx, "%s/test.pol", td->tempdir);
- error = reg_preg_diff_save(tctx, td->filename, ic, &td->callbacks, &td->callback_data);
+ error = reg_preg_diff_save(tctx, td->filename, &td->callbacks,
+ &td->callback_data);
torture_assert_werr_ok(tctx, error, "reg_preg_diff_save");
return true;
@@ -265,16 +260,14 @@ static bool diff_setup_preg_tcase (struct torture_context *tctx, void **data)
static bool diff_setup_dotreg_tcase (struct torture_context *tctx, void **data)
{
struct diff_tcase_data *td;
- struct smb_iconv_convenience *ic;
WERROR error;
diff_setup_tcase(tctx, data);
td = *data;
- ic = lp_iconv_convenience(tctx->lp_ctx);
-
td->filename = talloc_asprintf(tctx, "%s/test.reg", td->tempdir);
- error = reg_dotreg_diff_save(tctx, td->filename, ic, &td->callbacks, &td->callback_data);
+ error = reg_dotreg_diff_save(tctx, td->filename, &td->callbacks,
+ &td->callback_data);
torture_assert_werr_ok(tctx, error, "reg_dotreg_diff_save");
return true;
diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c
index 75b6c7ff26..a69a6148d5 100644
--- a/source4/lib/registry/tests/generic.c
+++ b/source4/lib/registry/tests/generic.c
@@ -65,7 +65,7 @@ static bool test_reg_val_data_string_dword(struct torture_context *ctx)
uint8_t d[] = { 0x20, 0x00, 0x00, 0x00 };
DATA_BLOB db = { d, 4 };
torture_assert_str_equal(ctx, "0x00000020",
- reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_DWORD, db),
+ reg_val_data_string(ctx, REG_DWORD, db),
"dword failed");
return true;
}
@@ -75,7 +75,7 @@ static bool test_reg_val_data_string_dword_big_endian(struct torture_context *ct
uint8_t d[] = { 0x20, 0x00, 0x00, 0x00 };
DATA_BLOB db = { d, 4 };
torture_assert_str_equal(ctx, "0x00000020",
- reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_DWORD_BIG_ENDIAN, db),
+ reg_val_data_string(ctx, REG_DWORD_BIG_ENDIAN, db),
"dword failed");
return true;
}
@@ -85,7 +85,7 @@ static bool test_reg_val_data_string_qword(struct torture_context *ctx)
uint8_t d[] = { 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
DATA_BLOB db = { d, 8 };
torture_assert_str_equal(ctx, "0x0000000000000020",
- reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_QWORD, db),
+ reg_val_data_string(ctx, REG_QWORD, db),
"qword failed");
return true;
}
@@ -93,14 +93,14 @@ static bool test_reg_val_data_string_qword(struct torture_context *ctx)
static bool test_reg_val_data_string_sz(struct torture_context *ctx)
{
DATA_BLOB db;
- convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
+ convert_string_talloc(ctx, CH_UTF8, CH_UTF16,
"bla", 3, (void **)&db.data, &db.length, false);
torture_assert_str_equal(ctx, "bla",
- reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_SZ, db),
+ reg_val_data_string(ctx, REG_SZ, db),
"sz failed");
db.length = 4;
torture_assert_str_equal(ctx, "bl",
- reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_SZ, db),
+ reg_val_data_string(ctx, REG_SZ, db),
"sz failed");
return true;
}
@@ -110,7 +110,7 @@ static bool test_reg_val_data_string_binary(struct torture_context *ctx)
uint8_t x[] = { 0x1, 0x2, 0x3, 0x4 };
DATA_BLOB db = { x, 4 };
torture_assert_str_equal(ctx, "01020304",
- reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_BINARY, db),
+ reg_val_data_string(ctx, REG_BINARY, db),
"binary failed");
return true;
}
@@ -120,7 +120,7 @@ static bool test_reg_val_data_string_empty(struct torture_context *ctx)
{
DATA_BLOB db = { NULL, 0 };
torture_assert_str_equal(ctx, "",
- reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_BINARY, db),
+ reg_val_data_string(ctx, REG_BINARY, db),
"empty failed");
return true;
}
@@ -128,12 +128,12 @@ static bool test_reg_val_data_string_empty(struct torture_context *ctx)
static bool test_reg_val_description(struct torture_context *ctx)
{
DATA_BLOB data;
- convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
+ convert_string_talloc(ctx, CH_UTF8, CH_UTF16,
"stationary traveller",
strlen("stationary traveller"),
(void **)&data.data, &data.length, false);
torture_assert_str_equal(ctx, "camel = REG_SZ : stationary traveller",
- reg_val_description(ctx, lp_iconv_convenience(ctx->lp_ctx), "camel", REG_SZ, data),
+ reg_val_description(ctx, "camel", REG_SZ, data),
"reg_val_description failed");
return true;
}
@@ -142,12 +142,12 @@ static bool test_reg_val_description(struct torture_context *ctx)
static bool test_reg_val_description_nullname(struct torture_context *ctx)
{
DATA_BLOB data;
- convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
+ convert_string_talloc(ctx, CH_UTF8, CH_UTF16,
"west berlin",
strlen("west berlin"),
(void **)&data.data, &data.length, false);
torture_assert_str_equal(ctx, "<No Name> = REG_SZ : west berlin",
- reg_val_description(ctx, lp_iconv_convenience(ctx->lp_ctx), NULL, REG_SZ, data),
+ reg_val_description(ctx, NULL, REG_SZ, data),
"description with null name failed");
return true;
}
diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c
index 905b9a97ef..4ae9a5bcbf 100644
--- a/source4/lib/registry/tests/hive.c
+++ b/source4/lib/registry/tests/hive.c
@@ -435,8 +435,7 @@ static bool hive_setup_regf(struct torture_context *tctx, void **data)
rmdir(dirname);
- error = reg_create_regf_file(tctx, lp_iconv_convenience(tctx->lp_ctx),
- dirname, 5, &key);
+ error = reg_create_regf_file(tctx, dirname, 5, &key);
if (!W_ERROR_IS_OK(error)) {
fprintf(stderr, "Unable to create new regf file\n");
return false;
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index 945b472903..bd58f7748f 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -130,8 +130,7 @@ int main(int argc, const char **argv)
poptFreeContext(pc);
- error = reg_dotreg_diff_save(ctx, outputfile, lp_iconv_convenience(cmdline_lp_ctx), &callbacks,
- &callback_data);
+ error = reg_dotreg_diff_save(ctx, outputfile, &callbacks, &callback_data);
if (!W_ERROR_IS_OK(error)) {
fprintf(stderr, "Problem saving registry diff to '%s': %s\n",
outputfile, win_errstr(error));
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index 3f550e517e..a8c1843116 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
poptFreeContext(pc);
- reg_diff_apply(h, lp_iconv_convenience(cmdline_lp_ctx), patch);
+ reg_diff_apply(h, patch);
return 0;
}
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index b72b07574e..3a8c62d1ce 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -195,9 +195,7 @@ static WERROR cmd_set(struct regshell_context *ctx, int argc, char **argv)
return WERR_INVALID_PARAM;
}
- if (!reg_string_to_val(ctx, lp_iconv_convenience(cmdline_lp_ctx),
- argv[2], argv[3], &val.data_type,
- &val.data)) {
+ if (!reg_string_to_val(ctx, argv[2], argv[3], &val.data_type, &val.data)) {
fprintf(stderr, "Unable to interpret data\n");
return WERR_INVALID_PARAM;
}
@@ -259,7 +257,7 @@ static WERROR cmd_print(struct regshell_context *ctx, int argc, char **argv)
}
printf("%s\n%s\n", str_regtype(value_type),
- reg_val_data_string(ctx, lp_iconv_convenience(cmdline_lp_ctx), value_type, value_data));
+ reg_val_data_string(ctx, value_type, value_data));
return WERR_OK;
}
@@ -290,7 +288,7 @@ static WERROR cmd_ls(struct regshell_context *ctx, int argc, char **argv)
for (i = 0; W_ERROR_IS_OK(error = reg_key_get_value_by_index(ctx,
ctx->current, i, &name, &valuetype, &valuedata)); i++)
printf("V \"%s\" %s %s\n", name, str_regtype(valuetype),
- reg_val_data_string(ctx, lp_iconv_convenience(cmdline_lp_ctx), valuetype, valuedata));
+ reg_val_data_string(ctx, valuetype, valuedata));
return WERR_OK;
}
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 3a7026b4a4..6857940672 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -81,8 +81,7 @@ static void print_tree(unsigned int level, struct registry_key *p,
unsigned int j;
for(j = 0; j < level+1; j++) putchar(' ');
printf("%s\n", reg_val_description(mem_ctx,
- lp_iconv_convenience(cmdline_lp_ctx), valuename,
- valuetype, valuedata));
+ valuename, valuetype, valuedata));
}
talloc_free(mem_ctx);
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index 62a94dfcc7..fce420e625 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -21,9 +21,7 @@
#include "lib/registry/registry.h"
#include "librpc/gen_ndr/winreg.h"
-_PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
- uint32_t type,
+_PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, uint32_t type,
const DATA_BLOB data)
{
char *ret = NULL;
@@ -34,13 +32,9 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx,
switch (type) {
case REG_EXPAND_SZ:
case REG_SZ:
- convert_string_talloc_convenience(mem_ctx,
- iconv_convenience,
- CH_UTF16, CH_UNIX,
- data.data,
- data.length,
- (void **)&ret,
- NULL, false);
+ convert_string_talloc(mem_ctx,
+ CH_UTF16, CH_UNIX, data.data, data.length,
+ (void **)&ret, NULL, false);
break;
case REG_DWORD:
case REG_DWORD_BIG_ENDIAN:
@@ -73,21 +67,17 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx,
/** Generate a string that describes a registry value */
_PUBLIC_ char *reg_val_description(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char *name,
uint32_t data_type,
const DATA_BLOB data)
{
return talloc_asprintf(mem_ctx, "%s = %s : %s", name?name:"<No Name>",
str_regtype(data_type),
- reg_val_data_string(mem_ctx, iconv_convenience, data_type, data));
+ reg_val_data_string(mem_ctx, data_type, data));
}
-_PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
- const char *type_str,
- const char *data_str, uint32_t *type,
- DATA_BLOB *data)
+_PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str,
+ const char *data_str, uint32_t *type, DATA_BLOB *data)
{
*type = regtype_by_string(type_str);
@@ -99,10 +89,8 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
switch (*type) {
case REG_SZ:
case REG_EXPAND_SZ:
- return convert_string_talloc_convenience(mem_ctx,
- iconv_convenience,
- CH_UNIX, CH_UTF16,
- data_str,
+ return convert_string_talloc(mem_ctx,
+ CH_UNIX, CH_UTF16, data_str,
strlen(data_str)+1,
(void **)&data->data,
&data->length, false);
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 1a5bd607b4..d670324c88 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -35,7 +35,6 @@ bool smbcli_socket_connect(struct smbcli_state *cli, const char *server,
struct tevent_context *ev_ctx,
struct resolve_context *resolve_ctx,
struct smbcli_options *options,
- struct smb_iconv_convenience *iconv_convenience,
const char *socket_options)
{
struct smbcli_socket *sock;
@@ -46,8 +45,7 @@ bool smbcli_socket_connect(struct smbcli_state *cli, const char *server,
if (sock == NULL) return false;
- cli->transport = smbcli_transport_init(sock, cli, true, options,
- iconv_convenience);
+ cli->transport = smbcli_transport_init(sock, cli, true, options);
if (!cli->transport) {
return false;
}
@@ -154,7 +152,6 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
struct tevent_context *ev,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct smbcli_tree *tree;
@@ -169,7 +166,6 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
credentials, resolve_ctx, ev,
options,
session_options,
- iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(status)) {
goto done;
diff --git a/source4/libcli/dgram/browse.c b/source4/libcli/dgram/browse.c
index 14d8278635..ab831df8cc 100644
--- a/source4/libcli/dgram/browse.c
+++ b/source4/libcli/dgram/browse.c
@@ -38,7 +38,7 @@ NTSTATUS dgram_mailslot_browse_send(struct nbt_dgram_socket *dgmsock,
DATA_BLOB blob;
TALLOC_CTX *tmp_ctx = talloc_new(dgmsock);
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, dgmsock->iconv_convenience, request,
+ ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, request,
(ndr_push_flags_fn_t)ndr_push_nbt_browse_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(tmp_ctx);
@@ -66,7 +66,7 @@ NTSTATUS dgram_mailslot_browse_reply(struct nbt_dgram_socket *dgmsock,
struct nbt_name myname;
struct socket_address *dest;
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, dgmsock->iconv_convenience, reply,
+ ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, reply,
(ndr_push_flags_fn_t)ndr_push_nbt_browse_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(tmp_ctx);
@@ -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, dgmslot->dgmsock->iconv_convenience, pkt,
+ ndr_err = ndr_pull_struct_blob(&data, mem_ctx, 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 365960edb6..4dd17412af 100644
--- a/source4/libcli/dgram/dgramsocket.c
+++ b/source4/libcli/dgram/dgramsocket.c
@@ -71,7 +71,7 @@ static void dgm_socket_recv(struct nbt_dgram_socket *dgmsock)
}
/* parse the request */
- ndr_err = ndr_pull_struct_blob(&blob, packet, dgmsock->iconv_convenience, packet,
+ ndr_err = ndr_pull_struct_blob(&blob, packet, 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);
@@ -157,8 +157,7 @@ static void dgm_socket_handler(struct tevent_context *ev, struct tevent_fd *fde,
then operations will use that event context
*/
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *event_ctx,
- struct smb_iconv_convenience *iconv_convenience)
+ struct tevent_context *event_ctx)
{
struct nbt_dgram_socket *dgmsock;
NTSTATUS status;
@@ -183,7 +182,6 @@ struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
dgmsock->send_queue = NULL;
dgmsock->incoming.handler = NULL;
dgmsock->mailslot_handlers = NULL;
- dgmsock->iconv_convenience = iconv_convenience;
return dgmsock;
@@ -226,7 +224,7 @@ NTSTATUS nbt_dgram_send(struct nbt_dgram_socket *dgmsock,
req->dest = dest;
if (talloc_reference(req, dest) == NULL) goto failed;
- ndr_err = ndr_push_struct_blob(&req->encoded, req, dgmsock->iconv_convenience, packet,
+ ndr_err = ndr_push_struct_blob(&req->encoded, req, packet,
(ndr_push_flags_fn_t)ndr_push_nbt_dgram_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/libcli/dgram/libdgram.h b/source4/libcli/dgram/libdgram.h
index a17a6042d9..d122281909 100644
--- a/source4/libcli/dgram/libdgram.h
+++ b/source4/libcli/dgram/libdgram.h
@@ -93,8 +93,7 @@ NTSTATUS dgram_set_incoming_handler(struct nbt_dgram_socket *dgmsock,
struct socket_address *),
void *private_data);
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *event_ctx,
- struct smb_iconv_convenience *);
+ struct tevent_context *event_ctx);
const char *dgram_mailslot_name(struct nbt_dgram_packet *packet);
struct dgram_mailslot_handler *dgram_mailslot_find(struct nbt_dgram_socket *dgmsock,
diff --git a/source4/libcli/dgram/netlogon.c b/source4/libcli/dgram/netlogon.c
index 26b00bdafd..0aa6864248 100644
--- a/source4/libcli/dgram/netlogon.c
+++ b/source4/libcli/dgram/netlogon.c
@@ -40,9 +40,7 @@ NTSTATUS dgram_mailslot_netlogon_send(struct nbt_dgram_socket *dgmsock,
DATA_BLOB blob;
TALLOC_CTX *tmp_ctx = talloc_new(dgmsock);
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx,
- dgmsock->iconv_convenience,
- request,
+ ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, request,
(ndr_push_flags_fn_t)ndr_push_nbt_netlogon_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(tmp_ctx);
@@ -74,8 +72,7 @@ NTSTATUS dgram_mailslot_netlogon_reply(struct nbt_dgram_socket *dgmsock,
struct nbt_name myname;
struct socket_address *dest;
- status = push_nbt_netlogon_response(&blob, tmp_ctx, dgmsock->iconv_convenience,
- reply);
+ status = push_nbt_netlogon_response(&blob, tmp_ctx, reply);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -110,8 +107,8 @@ NTSTATUS dgram_mailslot_netlogon_parse_request(struct dgram_mailslot_handler *dg
DATA_BLOB data = dgram_mailslot_data(dgram);
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_struct_blob(&data, mem_ctx, dgmslot->dgmsock->iconv_convenience, netlogon,
- (ndr_pull_flags_fn_t)ndr_pull_nbt_netlogon_packet);
+ ndr_err = ndr_pull_struct_blob(&data, mem_ctx, 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);
DEBUG(0,("Failed to parse netlogon packet of length %d: %s\n",
@@ -135,7 +132,7 @@ NTSTATUS dgram_mailslot_netlogon_parse_response(struct dgram_mailslot_handler *d
NTSTATUS status;
DATA_BLOB data = dgram_mailslot_data(dgram);
- status = pull_nbt_netlogon_response(&data, mem_ctx, dgmslot->dgmsock->iconv_convenience, netlogon);
+ status = pull_nbt_netlogon_response(&data, mem_ctx, netlogon);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
diff --git a/source4/libcli/finddcs.c b/source4/libcli/finddcs.c
index 04b25d37ef..bb4c77dab0 100644
--- a/source4/libcli/finddcs.c
+++ b/source4/libcli/finddcs.c
@@ -40,8 +40,6 @@ struct finddcs_state {
struct nbtd_getdcname r;
struct nbt_name_status node_status;
- struct smb_iconv_convenience *iconv_convenience;
-
int num_dcs;
struct nbt_dc_name *dcs;
uint16_t nbt_port;
@@ -68,7 +66,6 @@ struct composite_context *finddcs_send(TALLOC_CTX *mem_ctx,
const char *domain_name,
int name_type,
struct dom_sid *domain_sid,
- struct smb_iconv_convenience *iconv_convenience,
struct resolve_context *resolve_ctx,
struct tevent_context *event_ctx,
struct messaging_context *msg_ctx)
@@ -89,7 +86,6 @@ struct composite_context *finddcs_send(TALLOC_CTX *mem_ctx,
state->nbt_port = nbt_port;
state->my_netbios_name = talloc_strdup(state, my_netbios_name);
state->domain_name = talloc_strdup(state, domain_name);
- state->iconv_convenience = iconv_convenience;
if (composite_nomem(state->domain_name, c)) return c;
if (domain_sid) {
@@ -202,8 +198,7 @@ static void fallback_node_status(struct finddcs_state *state)
state->node_status.in.timeout = 1;
state->node_status.in.retries = 2;
- nbtsock = nbt_name_socket_init(state, state->ctx->event_ctx,
- state->iconv_convenience);
+ nbtsock = nbt_name_socket_init(state, state->ctx->event_ctx);
if (composite_nomem(nbtsock, state->ctx)) return;
name_req = nbt_name_status_send(nbtsock, &state->node_status);
@@ -261,7 +256,6 @@ NTSTATUS finddcs(TALLOC_CTX *mem_ctx,
uint16_t nbt_port,
const char *domain_name, int name_type,
struct dom_sid *domain_sid,
- struct smb_iconv_convenience *iconv_convenience,
struct resolve_context *resolve_ctx,
struct tevent_context *event_ctx,
struct messaging_context *msg_ctx,
@@ -272,7 +266,6 @@ NTSTATUS finddcs(TALLOC_CTX *mem_ctx,
nbt_port,
domain_name, name_type,
domain_sid,
- iconv_convenience,
resolve_ctx,
event_ctx, msg_ctx);
return finddcs_recv(c, mem_ctx, num_dcs, dcs);
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index f5e81cd6f6..7a3993c79b 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -75,8 +75,7 @@ static NTSTATUS smbcli_transport_finish_recv(void *private_data, DATA_BLOB blob)
struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
TALLOC_CTX *parent_ctx,
bool primary,
- struct smbcli_options *options,
- struct smb_iconv_convenience *iconv_convenience)
+ struct smbcli_options *options)
{
struct smbcli_transport *transport;
@@ -91,7 +90,6 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
transport->negotiate.protocol = PROTOCOL_NT1;
transport->options = *options;
transport->negotiate.max_xmit = transport->options.max_xmit;
- transport->iconv_convenience = iconv_convenience;
/* setup the stream -> packet parser */
transport->packet = packet_init(transport);
@@ -172,10 +170,10 @@ struct smbcli_request *smbcli_transport_connect_send(struct smbcli_transport *tr
status = nbt_name_dup(transport, called, &transport->called);
if (!NT_STATUS_IS_OK(status)) goto failed;
- status = nbt_name_to_blob(tmp_ctx, transport->iconv_convenience, &calling_blob, calling);
+ status = nbt_name_to_blob(tmp_ctx, &calling_blob, calling);
if (!NT_STATUS_IS_OK(status)) goto failed;
- status = nbt_name_to_blob(tmp_ctx, transport->iconv_convenience, &called_blob, called);
+ status = nbt_name_to_blob(tmp_ctx, &called_blob, called);
if (!NT_STATUS_IS_OK(status)) goto failed;
/* allocate output buffer */
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index a083396f35..cee1cd0bf0 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -179,7 +179,6 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
struct tevent_context *ev,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct smb_composite_connect io;
@@ -205,7 +204,6 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
io.in.workgroup = "";
io.in.options = *options;
io.in.session_options = *session_options;
- io.in.iconv_convenience = iconv_convenience;
status = smb_composite_connect(&io, parent_ctx, resolve_ctx, ev);
if (NT_STATUS_IS_OK(status)) {
diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c
index e13ba85361..c2de2cc7d2 100644
--- a/source4/libcli/raw/rawacl.c
+++ b/source4/libcli/raw/rawacl.c
@@ -77,7 +77,7 @@ NTSTATUS smb_raw_query_secdesc_recv(struct smbcli_request *req,
nt.out.data.length = IVAL(nt.out.params.data, 0);
- ndr = ndr_pull_init_blob(&nt.out.data, mem_ctx, NULL);
+ ndr = ndr_pull_init_blob(&nt.out.data, mem_ctx);
if (!ndr) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -135,7 +135,7 @@ struct smbcli_request *smb_raw_set_secdesc_send(struct smbcli_tree *tree,
nt.in.params.data = params;
nt.in.params.length = 8;
- ndr = ndr_push_init_ctx(NULL, NULL);
+ ndr = ndr_push_init_ctx(NULL);
if (!ndr) return NULL;
ndr_err = ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, io->set_secdesc.in.sd);
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 1509c83e00..5797540edd 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -348,7 +348,7 @@ static struct smbcli_request *smb_raw_nttrans_create_send(struct smbcli_tree *tr
if (parms->ntcreatex.in.sec_desc) {
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(&sd_blob, mem_ctx, NULL,
+ ndr_err = ndr_push_struct_blob(&sd_blob, mem_ctx,
parms->ntcreatex.in.sec_desc,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index f81a8071d1..08598a2d64 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -253,9 +253,9 @@ 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, NULL,
- parms->query_secdesc.out.sd,
- (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
+ ndr_err = ndr_pull_struct_blob(blob, mem_ctx,
+ parms->query_secdesc.out.sd,
+ (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
}
diff --git a/source4/libcli/raw/rawsetfileinfo.c b/source4/libcli/raw/rawsetfileinfo.c
index 892d5e483b..6ad3e9ee8d 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -99,8 +99,7 @@ bool smb_raw_setfileinfo_passthru(TALLOC_CTX *mem_ctx,
case RAW_FILEINFO_SEC_DESC: {
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(blob, mem_ctx, NULL,
- parms->set_secdesc.in.sd,
+ ndr_err = ndr_push_struct_blob(blob, mem_ctx, parms->set_secdesc.in.sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c
index 73085b87cb..64d72bcc51 100644
--- a/source4/libcli/resolve/nbtlist.c
+++ b/source4/libcli/resolve/nbtlist.c
@@ -163,8 +163,7 @@ struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx,
return c;
}
- state->nbtsock = nbt_name_socket_init(state, event_ctx,
- global_iconv_convenience);
+ state->nbtsock = nbt_name_socket_init(state, event_ctx);
if (composite_nomem(state->nbtsock, c)) return c;
/* count the address_list size */
diff --git a/source4/libcli/smb2/create.c b/source4/libcli/smb2/create.c
index c9fb4ea4e0..4e15064185 100644
--- a/source4/libcli/smb2/create.c
+++ b/source4/libcli/smb2/create.c
@@ -131,8 +131,7 @@ struct smb2_request *smb2_create_send(struct smb2_tree *tree, struct smb2_create
if (io->in.sec_desc) {
enum ndr_err_code ndr_err;
DATA_BLOB sd_blob;
- ndr_err = ndr_push_struct_blob(&sd_blob, req, NULL,
- io->in.sec_desc,
+ ndr_err = ndr_push_struct_blob(&sd_blob, req, io->in.sec_desc,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(req);
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index 16f2af9b3d..d36bf26914 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -323,7 +323,7 @@ static NTSTATUS connect_socket(struct composite_context *c,
/* the socket is up - we can initialise the smbcli transport layer */
state->transport = smbcli_transport_init(state->sock, state, true,
- &io->in.options, io->in.iconv_convenience);
+ &io->in.options);
NT_STATUS_HAVE_NO_MEMORY(state->transport);
if (is_ipaddress(state->sock->hostname) &&
diff --git a/source4/libcli/util/clilsa.c b/source4/libcli/util/clilsa.c
index 50435cf000..4cfdf93725 100644
--- a/source4/libcli/util/clilsa.c
+++ b/source4/libcli/util/clilsa.c
@@ -79,8 +79,7 @@ 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,
- cli->transport->iconv_convenience);
+ lsa->pipe = dcerpc_pipe_init(lsa, cli->transport->socket->event.ctx);
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 ec7e3798dc..75cb34f632 100644
--- a/source4/libcli/wrepl/winsrepl.c
+++ b/source4/libcli/wrepl/winsrepl.c
@@ -45,8 +45,6 @@ struct wrepl_socket {
#define WREPL_SOCKET_REQUEST_TIMEOUT (60)
uint32_t request_timeout;
- struct smb_iconv_convenience *iconv_convenience;
-
struct tevent_queue *request_queue;
struct tstream_context *stream;
@@ -70,8 +68,7 @@ bool wrepl_socket_is_connected(struct wrepl_socket *wrepl_sock)
operations will use that event context
*/
struct wrepl_socket *wrepl_socket_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *event_ctx,
- struct smb_iconv_convenience *iconv_convenience)
+ struct tevent_context *event_ctx)
{
struct wrepl_socket *wrepl_socket;
@@ -91,8 +88,6 @@ struct wrepl_socket *wrepl_socket_init(TALLOC_CTX *mem_ctx,
goto failed;
}
- wrepl_socket->iconv_convenience = iconv_convenience;
-
wrepl_socket->request_timeout = WREPL_SOCKET_REQUEST_TIMEOUT;
return wrepl_socket;
@@ -370,7 +365,6 @@ struct tevent_req *wrepl_request_send(TALLOC_CTX *mem_ctx,
state->req.wrap.packet = *packet;
ndr_err = ndr_push_struct_blob(&state->req.blob, state,
- wrepl_socket->iconv_convenience,
&state->req.wrap,
(ndr_push_flags_fn_t)ndr_push_wrepl_wrap);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -540,7 +534,6 @@ static void wrepl_request_read_pdu_done(struct tevent_req *subreq)
/* we have a full request - parse it */
ndr_err = ndr_pull_struct_blob(&blob,
state->rep.packet,
- state->caller.wrepl_socket->iconv_convenience,
state->rep.packet,
(ndr_pull_flags_fn_t)ndr_pull_wrepl_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index a284b33e6f..6af52069d4 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -797,9 +797,7 @@ static void becomeDC_recv_cldap(struct tevent_req *req)
struct libnet_BecomeDC_state);
struct composite_context *c = s->creq;
- c->status = cldap_netlogon_recv(req,
- lp_iconv_convenience(s->libnet->lp_ctx),
- s, &s->cldap.io);
+ c->status = cldap_netlogon_recv(req, s, &s->cldap.io);
talloc_free(req);
if (!composite_is_ok(c)) {
DEBUG(0,("Failed to send, receive or parse CLDAP reply from server %s for our host %s: %s\n",
@@ -1754,7 +1752,6 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
struct drsuapi_DsReplicaObjectIdentifier *identifier;
uint32_t num_attrs, i = 0;
struct drsuapi_DsReplicaAttribute *attrs;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(s->libnet->lp_ctx);
enum ndr_err_code ndr_err;
bool w2k3;
struct tevent_req *subreq;
@@ -1854,7 +1851,8 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
NULL);
if (composite_nomem(v, c)) return;
- ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, v,(ndr_push_flags_fn_t)ndr_push_security_descriptor);
+ ndr_err = ndr_push_struct_blob(&vd[0], vd, v,
+ (ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
@@ -1919,8 +1917,8 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
}
if (composite_nomem(v[0].dn, c)) return;
- ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[0], vd, &v[0],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
@@ -1985,22 +1983,22 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
v[2].sid = s->zero_sid;
v[2].dn = s->forest.schema_dn_str;
- ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[0], vd, &v[0],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
}
- ndr_err = ndr_push_struct_blob(&vd[1], vd, iconv_convenience, &v[1],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[1], vd, &v[1],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
}
- ndr_err = ndr_push_struct_blob(&vd[2], vd, iconv_convenience, &v[2],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[2], vd, &v[2],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
@@ -2041,22 +2039,22 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
v[2].sid = s->zero_sid;
v[2].dn = s->forest.schema_dn_str;
- ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[0], vd, &v[0],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
}
- ndr_err = ndr_push_struct_blob(&vd[1], vd, iconv_convenience, &v[1],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[1], vd, &v[1],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
}
- ndr_err = ndr_push_struct_blob(&vd[2], vd, iconv_convenience, &v[2],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[2], vd, &v[2],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
@@ -2089,8 +2087,8 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
v[0].sid = s->zero_sid;
v[0].dn = s->forest.schema_dn_str;
- ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[0], vd, &v[0],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
@@ -2121,8 +2119,8 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
v[0].sid = s->zero_sid;
v[0].dn = s->domain.dn_str;
- ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[0], vd, &v[0],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
@@ -2207,8 +2205,8 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
v[0].sid = s->zero_sid;
v[0].dn = s->dest_dsa.computer_dn_str;
- ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
- (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+ ndr_err = ndr_push_struct_blob(&vd[0], vd, &v[0],
+ (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
c->status = ndr_map_error2ntstatus(ndr_err);
if (!composite_is_ok(c)) return;
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c
index 0a8edef311..21851d5ae8 100644
--- a/source4/libnet/libnet_lookup.c
+++ b/source4/libnet/libnet_lookup.c
@@ -192,13 +192,14 @@ struct composite_context* libnet_LookupDCs_send(struct libnet_context *ctx,
{
struct composite_context *c;
struct messaging_context *msg_ctx =
- messaging_client_init(mem_ctx, lp_messaging_path(mem_ctx, ctx->lp_ctx),
- lp_iconv_convenience(ctx->lp_ctx), ctx->event_ctx);
-
- c = finddcs_send(mem_ctx, lp_netbios_name(ctx->lp_ctx), lp_nbt_port(ctx->lp_ctx),
- io->in.domain_name, io->in.name_type,
- NULL, lp_iconv_convenience(ctx->lp_ctx),
- ctx->resolve_ctx, ctx->event_ctx, msg_ctx);
+ messaging_client_init(mem_ctx,
+ lp_messaging_path(mem_ctx, ctx->lp_ctx),
+ ctx->event_ctx);
+
+ c = finddcs_send(mem_ctx, lp_netbios_name(ctx->lp_ctx),
+ lp_nbt_port(ctx->lp_ctx), io->in.domain_name,
+ io->in.name_type, NULL, ctx->resolve_ctx,
+ ctx->event_ctx, msg_ctx);
return c;
}
diff --git a/source4/libnet/libnet_site.c b/source4/libnet/libnet_site.c
index 3147cbb0f9..bd6dfbf421 100644
--- a/source4/libnet/libnet_site.c
+++ b/source4/libnet/libnet_site.c
@@ -75,7 +75,7 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_context *lctx, struct li
r->out.error_string = NULL;
return status;
}
- status = cldap_netlogon(cldap, lp_iconv_convenience(lctx->lp_ctx), tmp_ctx, &search);
+ status = cldap_netlogon(cldap, tmp_ctx, &search);
if (!NT_STATUS_IS_OK(status)
|| !search.out.netlogon.data.nt5_ex.client_site) {
/*
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index b584c75be6..66f73d594f 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -298,9 +298,7 @@ static void unbecomeDC_recv_cldap(struct tevent_req *req)
struct libnet_UnbecomeDC_state);
struct composite_context *c = s->creq;
- c->status = cldap_netlogon_recv(req,
- lp_iconv_convenience(s->libnet->lp_ctx),
- s, &s->cldap.io);
+ c->status = cldap_netlogon_recv(req, s, &s->cldap.io);
talloc_free(req);
if (!composite_is_ok(c)) return;
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 6d4481f977..d7ffcd79aa 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -423,7 +423,7 @@ static NTSTATUS vampire_schema_chunk(void *private_data,
}
if (!s->schema) {
- s->self_made_schema = dsdb_new_schema(s, lp_iconv_convenience(s->lp_ctx));
+ s->self_made_schema = dsdb_new_schema(s);
NT_STATUS_HAVE_NO_MEMORY(s->self_made_schema);
diff --git a/source4/librpc/idl/winsrepl.idl b/source4/librpc/idl/winsrepl.idl
index cedc70bb03..01b8e32bea 100644
--- a/source4/librpc/idl/winsrepl.idl
+++ b/source4/librpc/idl/winsrepl.idl
@@ -167,7 +167,7 @@ import "nbt.idl";
} wrepl_packet;
typedef [flag(NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
- [value(ndr_size_wrepl_packet(&packet, ndr->iconv_convenience, ndr->flags))] uint32 size;
+ [value(ndr_size_wrepl_packet(&packet, ndr->flags))] uint32 size;
wrepl_packet packet;
} wrepl_wrap;
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c
index dfa72b5262..08c3c7fc6e 100644
--- a/source4/librpc/ndr/ndr_string.c
+++ b/source4/librpc/ndr/ndr_string.c
@@ -81,8 +81,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
if (len2 == 0) {
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience, chset, CH_UNIX,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
+ chset, CH_UNIX,
ndr->data+ndr->offset,
(len2 + c_len_term)*byte_mul,
(void **)&as, &ret, false)) {
@@ -117,8 +117,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
if (len1 == 0) {
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
chset, CH_UNIX,
ndr->data+ndr->offset,
(len1 + c_len_term)*byte_mul,
@@ -155,8 +154,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
if (len1 == 0) {
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
chset, CH_UNIX,
ndr->data+ndr->offset,
(len1 + c_len_term)*byte_mul,
@@ -189,8 +187,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
if (len3 == 0) {
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
chset, CH_UNIX,
ndr->data+ndr->offset,
(len3 + c_len_term)*byte_mul,
@@ -221,8 +218,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
if (len3 == 0) {
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
chset, CH_UNIX,
ndr->data+ndr->offset,
len3,
@@ -241,8 +237,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
} else {
len1 = utf16_len_n(ndr->data+ndr->offset, ndr->data_size - ndr->offset);
}
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience, chset, CH_UNIX,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
+ chset, CH_UNIX,
ndr->data+ndr->offset,
len1,
(void **)&as, &ret, false)) {
@@ -265,8 +261,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
if (len1 == 0) {
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
chset, CH_UNIX,
ndr->data+ndr->offset,
len1,
@@ -327,7 +322,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
if (!(flags & LIBNDR_FLAG_STR_NOTERM)) {
s_len++;
}
- if (!convert_string_talloc_convenience(ndr, ndr->iconv_convenience, CH_UNIX, chset, s, s_len, (void **)&dest, &d_len, false)) {
+ if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len, (void **)&dest, &d_len, false)) {
return ndr_push_error(ndr, NDR_ERR_CHARCNV,
"Bad character push conversion with flags 0x%x", flags);
}
@@ -660,8 +655,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags,
NDR_PULL_NEED_BYTES(ndr, length*byte_mul);
- if (!convert_string_talloc_convenience(ndr->current_mem_ctx,
- ndr->iconv_convenience,
+ if (!convert_string_talloc(ndr->current_mem_ctx,
chset, CH_UNIX,
ndr->data+ndr->offset,
length*byte_mul,
@@ -685,9 +679,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags,
required = byte_mul * length;
NDR_PUSH_NEED_BYTES(ndr, required);
- if (!convert_string_convenience(ndr->iconv_convenience, CH_UNIX, chset,
- var, strlen(var),
- ndr->data+ndr->offset, required, &ret, false)) {
+ ret = convert_string(CH_UNIX, chset, var, strlen(var),
+ ndr->data+ndr->offset, required, false);
+ if (ret == -1) {
return ndr_push_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion");
}
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 95f83465fc..7265105525 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -55,8 +55,7 @@ static int dcerpc_connection_destructor(struct dcerpc_connection *conn)
the event context is optional
*/
static struct dcerpc_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct smb_iconv_convenience *ic)
+ struct tevent_context *ev)
{
struct dcerpc_connection *c;
@@ -65,8 +64,6 @@ static struct dcerpc_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx,
return NULL;
}
- c->iconv_convenience = talloc_reference(c, ic);
-
c->event_ctx = ev;
if (c->event_ctx == NULL) {
@@ -90,8 +87,7 @@ static struct dcerpc_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx,
}
/* initialise a dcerpc pipe. */
-_PUBLIC_ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct smb_iconv_convenience *ic)
+_PUBLIC_ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev)
{
struct dcerpc_pipe *p;
@@ -100,7 +96,7 @@ _PUBLIC_ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent
return NULL;
}
- p->conn = dcerpc_connection_init(p, ev, ic);
+ p->conn = dcerpc_connection_init(p, ev);
if (p->conn == NULL) {
talloc_free(p);
return NULL;
@@ -177,7 +173,7 @@ void dcerpc_set_auth_length(DATA_BLOB *blob, uint16_t v)
static struct ndr_pull *ndr_pull_init_flags(struct dcerpc_connection *c,
DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
{
- struct ndr_pull *ndr = ndr_pull_init_blob(blob, mem_ctx, c->iconv_convenience);
+ struct ndr_pull *ndr = ndr_pull_init_blob(blob, mem_ctx);
if (ndr == NULL) return ndr;
@@ -328,7 +324,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c,
/* non-signed packets are simpler */
if (sig_size == 0) {
- return ncacn_push_auth(blob, mem_ctx, c->iconv_convenience, pkt, NULL);
+ return ncacn_push_auth(blob, mem_ctx, pkt, NULL);
}
switch (c->security_state.auth_info->auth_level) {
@@ -338,16 +334,16 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c,
case DCERPC_AUTH_LEVEL_CONNECT:
/* TODO: let the gensec mech decide if it wants to generate a signature */
- return ncacn_push_auth(blob, mem_ctx, c->iconv_convenience, pkt, NULL);
+ return ncacn_push_auth(blob, mem_ctx, pkt, NULL);
case DCERPC_AUTH_LEVEL_NONE:
- return ncacn_push_auth(blob, mem_ctx, c->iconv_convenience, pkt, NULL);
+ return ncacn_push_auth(blob, mem_ctx, pkt, NULL);
default:
return NT_STATUS_INVALID_LEVEL;
}
- ndr = ndr_push_init_ctx(mem_ctx, c->iconv_convenience);
+ ndr = ndr_push_init_ctx(mem_ctx);
if (!ndr) {
return NT_STATUS_NO_MEMORY;
}
@@ -718,7 +714,7 @@ struct composite_context *dcerpc_bind_send(struct dcerpc_pipe *p,
pkt.u.bind.auth_info = data_blob(NULL, 0);
/* construct the NDR form of the packet */
- c->status = ncacn_push_auth(&blob, c, p->conn->iconv_convenience, &pkt,
+ c->status = ncacn_push_auth(&blob, c, &pkt,
p->conn->security_state.auth_info);
if (!composite_is_ok(c)) return c;
@@ -789,7 +785,6 @@ NTSTATUS dcerpc_auth3(struct dcerpc_pipe *p,
/* construct the NDR form of the packet */
status = ncacn_push_auth(&blob, mem_ctx,
- p->conn->iconv_convenience,
&pkt,
p->conn->security_state.auth_info);
if (!NT_STATUS_IS_OK(status)) {
@@ -1049,7 +1044,7 @@ static void dcerpc_ship_next_request(struct dcerpc_connection *c)
if (req->object) {
pkt.u.request.object.object = *req->object;
pkt.pfc_flags |= DCERPC_PFC_FLAG_OBJECT_UUID;
- chunk_size -= ndr_size_GUID(req->object,NULL,0);
+ chunk_size -= ndr_size_GUID(req->object,0);
}
/* we send a series of pdus without waiting for a reply */
@@ -1202,7 +1197,7 @@ static NTSTATUS dcerpc_ndr_validate_in(struct dcerpc_connection *c,
return ndr_map_error2ntstatus(ndr_err);
}
- push = ndr_push_init_ctx(mem_ctx, c->iconv_convenience);
+ push = ndr_push_init_ctx(mem_ctx);
if (!push) {
return NT_STATUS_NO_MEMORY;
}
@@ -1260,7 +1255,7 @@ static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_connection *c,
}
memcpy(st, struct_ptr, struct_size);
- push = ndr_push_init_ctx(mem_ctx, c->iconv_convenience);
+ push = ndr_push_init_ctx(mem_ctx);
if (!push) {
return NT_STATUS_NO_MEMORY;
}
@@ -1291,7 +1286,7 @@ static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_connection *c,
return ndr_map_error2ntstatus(ndr_err);
}
- push = ndr_push_init_ctx(mem_ctx, c->iconv_convenience);
+ push = ndr_push_init_ctx(mem_ctx);
if (!push) {
return NT_STATUS_NO_MEMORY;
}
@@ -1363,7 +1358,7 @@ struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
call = &table->calls[opnum];
/* setup for a ndr_push_* call */
- push = ndr_push_init_ctx(mem_ctx, p->conn->iconv_convenience);
+ push = ndr_push_init_ctx(mem_ctx);
if (!push) {
return NULL;
}
@@ -1666,7 +1661,7 @@ struct composite_context *dcerpc_alter_context_send(struct dcerpc_pipe *p,
pkt.u.alter.auth_info = data_blob(NULL, 0);
/* construct the NDR form of the packet */
- c->status = ncacn_push_auth(&blob, mem_ctx, p->conn->iconv_convenience, &pkt,
+ c->status = ncacn_push_auth(&blob, mem_ctx, &pkt,
p->conn->security_state.auth_info);
if (!composite_is_ok(c)) return c;
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index 69de8c5467..b1875045bd 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -64,7 +64,6 @@ struct dcerpc_connection {
struct dcerpc_security security_state;
const char *binding_string;
struct tevent_context *event_ctx;
- struct smb_iconv_convenience *iconv_convenience;
/** Directory in which to save ndrdump-parseable files */
const char *packet_log_dir;
@@ -271,8 +270,7 @@ struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
void *r);
const char *dcerpc_server_name(struct dcerpc_pipe *p);
-struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct smb_iconv_convenience *ic);
+struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev);
NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe *p,
struct smbcli_tree *tree,
const char *pipe_name);
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c
index 1b1f039004..bd371be2d3 100644
--- a/source4/librpc/rpc/dcerpc_connect.c
+++ b/source4/librpc/rpc/dcerpc_connect.c
@@ -121,7 +121,6 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb_send(TALLOC_CT
conn->in.service_type = NULL;
conn->in.workgroup = lp_workgroup(lp_ctx);
conn->in.gensec_settings = lp_gensec_settings(conn, lp_ctx);
- conn->in.iconv_convenience = lp_iconv_convenience(lp_ctx);
lp_smbcli_options(lp_ctx, &conn->in.options);
lp_smbcli_session_options(lp_ctx, &conn->in.session_options);
@@ -743,7 +742,7 @@ _PUBLIC_ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent
c->private_data = s;
/* initialise dcerpc pipe structure */
- s->pipe = dcerpc_pipe_init(c, ev, lp_iconv_convenience(lp_ctx));
+ s->pipe = dcerpc_pipe_init(c, ev);
if (composite_nomem(s->pipe, c)) return c;
if (DEBUGLEVEL >= 10)
diff --git a/source4/librpc/rpc/dcerpc_secondary.c b/source4/librpc/rpc/dcerpc_secondary.c
index 1d76c65f40..5f355a5937 100644
--- a/source4/librpc/rpc/dcerpc_secondary.c
+++ b/source4/librpc/rpc/dcerpc_secondary.c
@@ -73,7 +73,7 @@ _PUBLIC_ struct composite_context* dcerpc_secondary_connection_send(struct dcerp
s->binding = b;
/* initialise second dcerpc pipe based on primary pipe's event context */
- s->pipe2 = dcerpc_pipe_init(c, s->pipe->conn->event_ctx, s->pipe->conn->iconv_convenience);
+ s->pipe2 = dcerpc_pipe_init(c, s->pipe->conn->event_ctx);
if (composite_nomem(s->pipe2, c)) return c;
if (DEBUGLEVEL >= 10)
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index b71e3060e1..5873e9dd95 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -51,14 +51,13 @@ const struct ndr_interface_call *dcerpc_iface_find_call(const struct ndr_interfa
push a ncacn_packet into a blob, potentially with auth info
*/
NTSTATUS ncacn_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
struct ncacn_packet *pkt,
struct dcerpc_auth *auth_info)
{
struct ndr_push *ndr;
enum ndr_err_code ndr_err;
- ndr = ndr_push_init_ctx(mem_ctx, iconv_convenience);
+ ndr = ndr_push_init_ctx(mem_ctx);
if (!ndr) {
return NT_STATUS_NO_MEMORY;
}
@@ -827,7 +826,7 @@ NTSTATUS dcerpc_pull_auth_trailer(struct ncacn_packet *pkt,
*auth_length = pkt_auth_blob->length - pad;
- ndr = ndr_pull_init_blob(pkt_auth_blob, mem_ctx, NULL);
+ ndr = ndr_pull_init_blob(pkt_auth_blob, mem_ctx);
if (!ndr) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/nbt_server/dgram/request.c b/source4/nbt_server/dgram/request.c
index 277b64741d..4a3bd13368 100644
--- a/source4/nbt_server/dgram/request.c
+++ b/source4/nbt_server/dgram/request.c
@@ -75,9 +75,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
if (strcmp("0.0.0.0", iface->netmask) != 0) {
/* listen for broadcasts on port 138 */
- bcast_dgmsock = nbt_dgram_socket_init(iface,
- nbtsrv->task->event_ctx,
- lp_iconv_convenience(nbtsrv->task->lp_ctx));
+ bcast_dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx);
if (!bcast_dgmsock) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
@@ -104,8 +102,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
}
/* listen for unicasts on port 138 */
- iface->dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx,
- lp_iconv_convenience(nbtsrv->task->lp_ctx));
+ iface->dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx);
if (!iface->dgmsock) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c
index 99c5886fd9..19639dd167 100644
--- a/source4/nbt_server/interfaces.c
+++ b/source4/nbt_server/interfaces.c
@@ -186,7 +186,7 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
struct nbt_name_socket *bcast_nbtsock;
/* listen for broadcasts on port 137 */
- bcast_nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx, lp_iconv_convenience(nbtsrv->task->lp_ctx));
+ bcast_nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx);
if (!bcast_nbtsock) {
talloc_free(iface);
return NT_STATUS_NO_MEMORY;
@@ -212,8 +212,7 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
}
/* listen for unicasts on port 137 */
- iface->nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx,
- lp_iconv_convenience(nbtsrv->task->lp_ctx));
+ iface->nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx);
if (!iface->nbtsock) {
talloc_free(iface);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c
index cc135397bb..6a628e491a 100644
--- a/source4/ntp_signd/ntp_signd.c
+++ b/source4/ntp_signd/ntp_signd.c
@@ -80,9 +80,7 @@ static NTSTATUS signing_failure(struct ntp_signd_connection *ntp_signdconn,
signed_reply.packet_id = packet_id;
signed_reply.signed_packet = data_blob(NULL, 0);
- ndr_err = ndr_push_struct_blob(output, mem_ctx,
- lp_iconv_convenience(ntp_signdconn->ntp_signd->task->lp_ctx),
- &signed_reply,
+ ndr_err = ndr_push_struct_blob(output, mem_ctx, &signed_reply,
(ndr_push_flags_fn_t)ndr_push_signed_reply);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -114,7 +112,6 @@ static NTSTATUS ntp_signd_process(struct ntp_signd_connection *ntp_signd_conn,
int ret;
ndr_err = ndr_pull_struct_blob_all(input, mem_ctx,
- lp_iconv_convenience(ntp_signd_conn->ntp_signd->task->lp_ctx),
&sign_request,
(ndr_pull_flags_fn_t)ndr_pull_sign_request);
@@ -244,9 +241,7 @@ static NTSTATUS ntp_signd_process(struct ntp_signd_connection *ntp_signd_conn,
/* Place it into the packet for the wire */
- ndr_err = ndr_push_struct_blob(output, mem_ctx,
- lp_iconv_convenience(ntp_signd_conn->ntp_signd->task->lp_ctx),
- &signed_reply,
+ ndr_err = ndr_push_struct_blob(output, mem_ctx, &signed_reply,
(ndr_push_flags_fn_t)ndr_push_signed_reply);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index 32d1332cce..ef456f05df 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -180,7 +180,7 @@ static WERROR sptr_PrintServerData(struct ntptr_GenericHandle *server,
os.build = server_info->version_build;
os.extra_string = "";
- ndr_err = ndr_push_struct_blob(&blob, mem_ctx, lp_iconv_convenience(server->ntptr->lp_ctx), &os, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion);
+ ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_GENERAL_FAILURE;
}
@@ -203,7 +203,7 @@ static WERROR sptr_PrintServerData(struct ntptr_GenericHandle *server,
os_ex.product_type = 0;
os_ex.reserved = 0;
- ndr_err = ndr_push_struct_blob(&blob, mem_ctx, lp_iconv_convenience(server->ntptr->lp_ctx), &os_ex, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersionEx);
+ ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os_ex, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersionEx);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_GENERAL_FAILURE;
}
@@ -240,7 +240,7 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
return result;
}
- ndr_err = ndr_push_union_blob(&blob, mem_ctx, lp_iconv_convenience(server->ntptr->lp_ctx),
+ ndr_err = ndr_push_union_blob(&blob, mem_ctx,
&data, *r->out.type, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_GENERAL_FAILURE;
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 7c6615e3a6..fdf3aeb305 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -46,7 +46,6 @@ struct notify_context {
struct notify_array *array;
int seqnum;
struct sys_notify_context *sys_notify_ctx;
- struct smb_iconv_convenience *iconv_convenience;
};
@@ -113,7 +112,6 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
notify->messaging_ctx = messaging_ctx;
notify->list = NULL;
notify->array = NULL;
- notify->iconv_convenience = lp_iconv_convenience(lp_ctx);
notify->seqnum = tdb_get_seqnum(notify->w->tdb);
talloc_set_destructor(notify, notify_destructor);
@@ -178,8 +176,7 @@ static NTSTATUS notify_load(struct notify_context *notify)
blob.data = dbuf.dptr;
blob.length = dbuf.dsize;
- ndr_err = ndr_pull_struct_blob(&blob, notify->array, notify->iconv_convenience,
- notify->array,
+ ndr_err = ndr_pull_struct_blob(&blob, notify->array, notify->array,
(ndr_pull_flags_fn_t)ndr_pull_notify_array);
free(dbuf.dptr);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -227,7 +224,7 @@ static NTSTATUS notify_save(struct notify_context *notify)
tmp_ctx = talloc_new(notify);
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, notify->iconv_convenience, notify->array,
+ ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, notify->array,
(ndr_push_flags_fn_t)ndr_push_notify_array);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(tmp_ctx);
@@ -263,7 +260,7 @@ static void notify_handler(struct messaging_context *msg_ctx, void *private_data
return;
}
- ndr_err = ndr_pull_struct_blob(data, tmp_ctx, notify->iconv_convenience, &ev,
+ ndr_err = ndr_pull_struct_blob(data, tmp_ctx, &ev,
(ndr_pull_flags_fn_t)ndr_pull_notify_event);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(tmp_ctx);
@@ -560,7 +557,7 @@ static void notify_send(struct notify_context *notify, struct notify_entry *e,
tmp_ctx = talloc_new(notify);
- ndr_err = ndr_push_struct_blob(&data, tmp_ctx, notify->iconv_convenience, &ev, (ndr_push_flags_fn_t)ndr_push_notify_event);
+ ndr_err = ndr_push_struct_blob(&data, tmp_ctx, &ev, (ndr_push_flags_fn_t)ndr_push_notify_event);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(tmp_ctx);
return;
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index 8f5d10f902..944ec86631 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -246,7 +246,7 @@ static NTSTATUS odb_pull_record(struct odb_lock *lck, struct opendb_file *file)
blob.data = dbuf.dptr;
blob.length = dbuf.dsize;
- ndr_err = ndr_pull_struct_blob(&blob, lck, lp_iconv_convenience(lck->odb->ntvfs_ctx->lp_ctx), file, (ndr_pull_flags_fn_t)ndr_pull_opendb_file);
+ ndr_err = ndr_pull_struct_blob(&blob, lck, file, (ndr_pull_flags_fn_t)ndr_pull_opendb_file);
free(dbuf.dptr);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
@@ -274,7 +274,7 @@ static NTSTATUS odb_push_record(struct odb_lock *lck, struct opendb_file *file)
return NT_STATUS_OK;
}
- ndr_err = ndr_push_struct_blob(&blob, lck, lp_iconv_convenience(lck->odb->ntvfs_ctx->lp_ctx), file, (ndr_push_flags_fn_t)ndr_push_opendb_file);
+ ndr_err = ndr_push_struct_blob(&blob, lck, file, (ndr_push_flags_fn_t)ndr_push_opendb_file);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
}
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c
index a40fb54e9a..259dcccb71 100644
--- a/source4/ntvfs/ipc/ipc_rap.c
+++ b/source4/ntvfs/ipc/ipc_rap.c
@@ -124,10 +124,10 @@ static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
call->mem_ctx = mem_ctx;
- call->ndr_pull_param = ndr_pull_init_blob(&trans->in.params, mem_ctx, lp_iconv_convenience(lp_ctx));
+ call->ndr_pull_param = ndr_pull_init_blob(&trans->in.params, mem_ctx);
call->ndr_pull_param->flags = RAPNDR_FLAGS;
- call->ndr_pull_data = ndr_pull_init_blob(&trans->in.data, mem_ctx, lp_iconv_convenience(lp_ctx));
+ call->ndr_pull_data = ndr_pull_init_blob(&trans->in.data, mem_ctx);
call->ndr_pull_data->flags = RAPNDR_FLAGS;
call->heap = talloc(mem_ctx, struct rap_string_heap);
@@ -454,8 +454,8 @@ NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct tevent_context *event_ctx, str
NDR_RETURN(ndr_pull_string(call->ndr_pull_param, NDR_SCALARS,
&call->datadesc));
- call->ndr_push_param = ndr_push_init_ctx(call, lp_iconv_convenience(lp_ctx));
- call->ndr_push_data = ndr_push_init_ctx(call, lp_iconv_convenience(lp_ctx));
+ call->ndr_push_param = ndr_push_init_ctx(call);
+ call->ndr_push_data = ndr_push_init_ctx(call);
if ((call->ndr_push_param == NULL) || (call->ndr_push_data == NULL))
return NT_STATUS_NO_MEMORY;
@@ -480,8 +480,8 @@ NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct tevent_context *event_ctx, str
result_param = ndr_push_blob(call->ndr_push_param);
result_data = ndr_push_blob(call->ndr_push_data);
- final_param = ndr_push_init_ctx(call, lp_iconv_convenience(lp_ctx));
- final_data = ndr_push_init_ctx(call, lp_iconv_convenience(lp_ctx));
+ final_param = ndr_push_init_ctx(call);
+ final_data = ndr_push_init_ctx(call);
if ((final_param == NULL) || (final_data == NULL))
return NT_STATUS_NO_MEMORY;
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 8c9e8e91ce..1455424abe 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -244,8 +244,6 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
struct pipe_state *p;
struct ipc_private *ipriv = talloc_get_type_abort(ntvfs->private_data,
struct ipc_private);
- struct smb_iconv_convenience *smb_ic
- = lp_iconv_convenience(ipriv->ntvfs->ctx->lp_ctx);
struct ntvfs_handle *h;
struct ipc_open_state *state;
struct tevent_req *subreq;
@@ -352,7 +350,6 @@ skip:
subreq = tstream_npa_connect_send(p,
ipriv->ntvfs->ctx->event_ctx,
- smb_ic,
directory,
fname,
client_addr,
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c
index e4448d3442..5296811f02 100644
--- a/source4/ntvfs/posix/pvfs_rename.c
+++ b/source4/ntvfs/posix/pvfs_rename.c
@@ -95,7 +95,6 @@ NTSTATUS pvfs_do_rename(struct pvfs_state *pvfs,
resolve a wildcard rename pattern. This works on one component of the name
*/
static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char *fname,
const char *pattern)
{
@@ -115,16 +114,16 @@ static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx,
while (*p2) {
codepoint_t c1, c2;
size_t c_size1, c_size2;
- c1 = next_codepoint_convenience(iconv_convenience, p1, &c_size1);
- c2 = next_codepoint_convenience(iconv_convenience, p2, &c_size2);
+ c1 = next_codepoint(p1, &c_size1);
+ c2 = next_codepoint(p2, &c_size2);
if (c2 == '?') {
- d += push_codepoint_convenience(iconv_convenience, d, c1);
+ d += push_codepoint(d, c1);
} else if (c2 == '*') {
memcpy(d, p1, strlen(p1));
d += strlen(p1);
break;
} else {
- d += push_codepoint_convenience(iconv_convenience, d, c2);
+ d += push_codepoint(d, c2);
}
p1 += c_size1;
@@ -142,7 +141,6 @@ static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx,
resolve a wildcard rename pattern.
*/
static const char *pvfs_resolve_wildcard(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char *fname,
const char *pattern)
{
@@ -175,8 +173,8 @@ static const char *pvfs_resolve_wildcard(TALLOC_CTX *mem_ctx,
return NULL;
}
- base1 = pvfs_resolve_wildcard_component(mem_ctx, iconv_convenience, base1, base2);
- ext1 = pvfs_resolve_wildcard_component(mem_ctx, iconv_convenience, ext1, ext2);
+ base1 = pvfs_resolve_wildcard_component(mem_ctx, base1, base2);
+ ext1 = pvfs_resolve_wildcard_component(mem_ctx, ext1, ext2);
if (base1 == NULL || ext1 == NULL) {
return NULL;
}
@@ -283,7 +281,7 @@ static NTSTATUS pvfs_rename_one(struct pvfs_state *pvfs,
NTSTATUS status;
/* resolve the wildcard pattern for this name */
- fname2 = pvfs_resolve_wildcard(mem_ctx, lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx), fname1, fname2);
+ fname2 = pvfs_resolve_wildcard(mem_ctx, fname1, fname2);
if (fname2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index 9613b7078a..0da64a790d 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -186,8 +186,7 @@ static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs,
/*
parse a alternate data stream name
*/
-static NTSTATUS parse_stream_name(struct smb_iconv_convenience *ic,
- struct pvfs_filename *name,
+static NTSTATUS parse_stream_name(struct pvfs_filename *name,
const char *s)
{
char *p, *stream_name;
@@ -203,7 +202,7 @@ static NTSTATUS parse_stream_name(struct smb_iconv_convenience *ic,
while (*p) {
size_t c_size;
- codepoint_t c = next_codepoint_convenience(ic, p, &c_size);
+ codepoint_t c = next_codepoint(p, &c_size);
switch (c) {
case '/':
@@ -259,7 +258,6 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name,
unsigned int flags, struct pvfs_filename *name)
{
char *ret, *p, *p_start;
- struct smb_iconv_convenience *ic = NULL;
NTSTATUS status;
name->original_name = talloc_strdup(name, cifs_name);
@@ -300,10 +298,9 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name,
for legal characters */
p_start = p;
- ic = lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx);
while (*p) {
size_t c_size;
- codepoint_t c = next_codepoint_convenience(ic, p, &c_size);
+ codepoint_t c = next_codepoint(p, &c_size);
if (c <= 0x1F) {
return NT_STATUS_OBJECT_NAME_INVALID;
@@ -336,7 +333,7 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name,
if (name->has_wildcard) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
- status = parse_stream_name(ic, name, p);
+ status = parse_stream_name(name, p);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -388,7 +385,6 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name,
return NULL if it can't be reduced
*/
static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char **fname, unsigned int flags)
{
codepoint_t c;
@@ -401,7 +397,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
if (s == NULL) return NT_STATUS_NO_MEMORY;
for (num_components=1, p=s; *p; p += c_size) {
- c = next_codepoint_convenience(iconv_convenience, p, &c_size);
+ c = next_codepoint(p, &c_size);
if (c == '\\') num_components++;
}
@@ -413,7 +409,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
components[0] = s;
for (i=0, p=s; *p; p += c_size) {
- c = next_codepoint_convenience(iconv_convenience, p, &c_size);
+ c = next_codepoint(p, &c_size);
if (c == '\\') {
*p = 0;
components[++i] = p+1;
@@ -539,7 +535,7 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs,
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD)) {
/* it might contain .. components which need to be reduced */
- status = pvfs_reduce_name(*name, lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx), &cifs_name, flags);
+ status = pvfs_reduce_name(*name, &cifs_name, flags);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index 530def9163..fc1cad1894 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -104,8 +104,6 @@ struct pvfs_mangle_context {
/* this is used to reverse the base 36 mapping */
unsigned char base_reverse[256];
-
- struct smb_iconv_convenience *iconv_convenience;
};
@@ -390,7 +388,7 @@ static bool is_legal_name(struct pvfs_mangle_context *ctx, const char *name)
{
while (*name) {
size_t c_size;
- codepoint_t c = next_codepoint_convenience(ctx->iconv_convenience, name, &c_size);
+ codepoint_t c = next_codepoint(name, &c_size);
if (c == INVALID_CODEPOINT) {
return false;
}
@@ -615,8 +613,6 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
return NT_STATUS_NO_MEMORY;
}
- ctx->iconv_convenience = lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx);
-
/* by default have a max of 512 entries in the cache. */
ctx->cache_size = lp_parm_int(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "cachesize", 512);
diff --git a/source4/ntvfs/posix/pvfs_xattr.c b/source4/ntvfs/posix/pvfs_xattr.c
index 1ca09402a3..1eb7c31868 100644
--- a/source4/ntvfs/posix/pvfs_xattr.c
+++ b/source4/ntvfs/posix/pvfs_xattr.c
@@ -117,8 +117,8 @@ NTSTATUS pvfs_xattr_ndr_load(struct pvfs_state *pvfs,
}
/* pull the blob */
- ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx),
- p, (ndr_pull_flags_fn_t)pull_fn);
+ ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, p,
+ (ndr_pull_flags_fn_t)pull_fn);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
}
@@ -140,7 +140,7 @@ NTSTATUS pvfs_xattr_ndr_save(struct pvfs_state *pvfs,
NTSTATUS status;
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(&blob, mem_ctx, lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx), p, (ndr_push_flags_fn_t)push_fn);
+ ndr_err = ndr_push_struct_blob(&blob, mem_ctx, p, (ndr_push_flags_fn_t)push_fn);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(mem_ctx);
return ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index a9ce470e92..1264106a60 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -520,6 +520,7 @@ struct loadparm_context {
struct loadparm_global *globals;
struct loadparm_service **services;
struct loadparm_service *sDefault;
+ struct smb_iconv_convenience *iconv_convenience;
int iNumServices;
struct loadparm_service *currentService;
bool bInGlobalSection;
@@ -530,7 +531,6 @@ struct loadparm_context {
time_t modtime;
} *file_lists;
unsigned int flags[NUMPARAMETERS];
- struct smb_iconv_convenience *iconv_convenience;
};
@@ -2782,7 +2782,6 @@ struct gensec_settings *lp_gensec_settings(TALLOC_CTX *mem_ctx, struct loadparm_
return NULL;
SMB_ASSERT(lp_ctx != NULL);
settings->lp_ctx = talloc_reference(settings, lp_ctx);
- settings->iconv_convenience = lp_iconv_convenience(lp_ctx);
settings->target_hostname = lp_parm_string(lp_ctx, NULL, "gensec", "target_hostname");
return settings;
}
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index 2962bcdc1f..47a3f6b842 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -182,7 +182,7 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
return NULL;
}
- ndr_err = ndr_pull_struct_blob(v, result, NULL, result,
+ ndr_err = ndr_pull_struct_blob(v, result, result,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
*errstring = talloc_asprintf(mem_ctx, "Failed to parse SID on record for %s in %s",
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 0b0e3f22b6..774309996d 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -486,7 +486,7 @@ static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32_t fault_code
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, NULL);
+ status = ncacn_push_auth(&rep->blob, call, &pkt, NULL);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -531,7 +531,7 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32_t reason)
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, NULL);
+ status = ncacn_push_auth(&rep->blob, call, &pkt, NULL);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -732,7 +732,8 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, call->conn->auth_state.auth_info);
+ status = ncacn_push_auth(&rep->blob, call, &pkt,
+ call->conn->auth_state.auth_info);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(call->context);
call->context = NULL;
@@ -923,7 +924,7 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, call->conn->auth_state.auth_info);
+ status = ncacn_push_auth(&rep->blob, call, &pkt, call->conn->auth_state.auth_info);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -962,8 +963,7 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
return dcesrv_fault(call, DCERPC_FAULT_UNK_IF);
}
- pull = ndr_pull_init_blob(&call->pkt.u.request.stub_and_verifier, call,
- lp_iconv_convenience(call->conn->dce_ctx->lp_ctx));
+ pull = ndr_pull_init_blob(&call->pkt.u.request.stub_and_verifier, call);
NT_STATUS_HAVE_NO_MEMORY(pull);
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
@@ -1023,7 +1023,7 @@ _PUBLIC_ NTSTATUS dcesrv_reply(struct dcesrv_call_state *call)
}
/* form the reply NDR */
- push = ndr_push_init_ctx(call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx));
+ push = ndr_push_init_ctx(call);
NT_STATUS_HAVE_NO_MEMORY(push);
/* carry over the pointer count to the reply in case we are
diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c
index 59d8be3e24..4915c3ccbc 100644
--- a/source4/rpc_server/dcesrv_auth.c
+++ b/source4/rpc_server/dcesrv_auth.c
@@ -383,7 +383,7 @@ bool dcesrv_auth_response(struct dcesrv_call_state *call,
/* non-signed packets are simple */
if (sig_size == 0) {
- status = ncacn_push_auth(blob, call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx), pkt, NULL);
+ status = ncacn_push_auth(blob, call, pkt, NULL);
return NT_STATUS_IS_OK(status);
}
@@ -397,18 +397,18 @@ bool dcesrv_auth_response(struct dcesrv_call_state *call,
* TODO: let the gensec mech decide if it wants to generate a signature
* that might be needed for schannel...
*/
- status = ncacn_push_auth(blob, call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx), pkt, NULL);
+ status = ncacn_push_auth(blob, call, pkt, NULL);
return NT_STATUS_IS_OK(status);
case DCERPC_AUTH_LEVEL_NONE:
- status = ncacn_push_auth(blob, call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx), pkt, NULL);
+ status = ncacn_push_auth(blob, call, pkt, NULL);
return NT_STATUS_IS_OK(status);
default:
return false;
}
- ndr = ndr_push_init_ctx(call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx));
+ ndr = ndr_push_init_ctx(call);
if (!ndr) {
return false;
}
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 354ebf0f85..a9bb1c0b4e 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -136,8 +136,7 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
return WERR_OK;
}
- ndr_err = ndr_pull_struct_blob(md_value, obj,
- lp_iconv_convenience(ldb_get_opaque(sam_ctx, "loadparm")), &md,
+ ndr_err = ndr_pull_struct_blob(md_value, obj, &md,
(ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_DS_DRA_INTERNAL_ERROR;
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 8ab3cbfe6b..2483d680e0 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -749,7 +749,6 @@ static NTSTATUS get_trustdom_auth_blob(struct dcesrv_call_state *dce_call,
arcfour_crypt_blob(auth_blob->data, auth_blob->length, &session_key);
ndr_err = ndr_pull_struct_blob(auth_blob, mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
auth_struct,
(ndr_pull_flags_fn_t)ndr_pull_trustDomainPasswords);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -797,7 +796,6 @@ static NTSTATUS get_trustauth_inout_blob(struct dcesrv_call_state *dce_call,
ioblob.previous->array[i].AuthType = 0;
}
ndr_err = ndr_push_struct_blob(trustauth_blob, mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
&ioblob,
(ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -3920,7 +3918,6 @@ static int dns_cmp(const char *s1, size_t l1,
/* decode all TDOs forest trust info blobs */
static NTSTATUS get_ft_info(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct ldb_message *msg,
struct ForestTrustInfo *info)
{
@@ -3932,8 +3929,7 @@ static NTSTATUS get_ft_info(TALLOC_CTX *mem_ctx,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
/* ldb_val is equivalent to DATA_BLOB */
- ndr_err = ndr_pull_struct_blob_all(ft_blob, mem_ctx, ic,
- info,
+ ndr_err = ndr_pull_struct_blob_all(ft_blob, mem_ctx, info,
(ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfo);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return NT_STATUS_INVALID_DOMAIN_STATE;
@@ -4242,8 +4238,6 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
{
struct dcesrv_handle *h;
struct lsa_policy_state *p_state;
- struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(lp_ctx);
const char *trust_attrs[] = { "trustPartner", "trustAttributes",
"msDS-TrustForestTrustInfo", NULL };
struct ldb_message **dom_res = NULL;
@@ -4356,7 +4350,7 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
return NT_STATUS_NO_MEMORY;
}
- nt_status = get_ft_info(mem_ctx, ic, dom_res[i], fti);
+ nt_status = get_ft_info(mem_ctx, dom_res[i], fti);
if (!NT_STATUS_IS_OK(nt_status)) {
if (NT_STATUS_EQUAL(nt_status,
NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
@@ -4385,8 +4379,7 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
/* not just a check, write info back */
- ndr_err = ndr_push_struct_blob(&ft_blob, mem_ctx, ic,
- nfti,
+ ndr_err = ndr_push_struct_blob(&ft_blob, mem_ctx, nfti,
(ndr_push_flags_fn_t)ndr_push_ForestTrustInfo);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return NT_STATUS_INVALID_PARAMETER;
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 3842429b8e..011341641a 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -249,7 +249,6 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca
creds->sid = samdb_result_dom_sid(creds, msgs[0], "objectSid");
nt_status = schannel_save_creds_state(mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
lp_private_dir(dce_call->conn->dce_ctx->lp_ctx),
creds);
@@ -362,7 +361,6 @@ static NTSTATUS dcesrv_netr_creds_server_step_check(struct dcesrv_call_state *dc
}
nt_status = schannel_check_creds_state(mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
lp_private_dir(dce_call->conn->dce_ctx->lp_ctx),
computer_name,
received_authenticator,
@@ -714,7 +712,6 @@ static NTSTATUS dcesrv_netr_LogonSamLogonEx(struct dcesrv_call_state *dce_call,
struct netlogon_creds_CredentialState *creds;
nt_status = schannel_get_creds_state(mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
lp_private_dir(dce_call->conn->dce_ctx->lp_ctx),
r->in.computer_name, &creds);
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c
index 6f4df00f9d..05e45d8529 100644
--- a/source4/rpc_server/service_rpc.c
+++ b/source4/rpc_server/service_rpc.c
@@ -135,7 +135,6 @@ static void dcesrv_sock_reply_done(struct tevent_req *subreq)
struct dcerpc_read_ncacn_packet_state {
struct {
- struct smb_iconv_convenience *smb_iconv_c;
} caller;
DATA_BLOB buffer;
struct ncacn_packet *pkt;
@@ -150,8 +149,7 @@ static void dcerpc_read_ncacn_packet_done(struct tevent_req *subreq);
static struct tevent_req *dcerpc_read_ncacn_packet_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct tstream_context *stream,
- struct smb_iconv_convenience *ic)
+ struct tstream_context *stream)
{
struct tevent_req *req;
struct dcerpc_read_ncacn_packet_state *state;
@@ -163,7 +161,6 @@ static struct tevent_req *dcerpc_read_ncacn_packet_send(TALLOC_CTX *mem_ctx,
return NULL;
}
- state->caller.smb_iconv_c = ic;
state->buffer = data_blob_const(NULL, 0);
state->pkt = talloc(state, struct ncacn_packet);
if (tevent_req_nomem(state->pkt, req)) {
@@ -260,9 +257,7 @@ static void dcerpc_read_ncacn_packet_done(struct tevent_req *subreq)
return;
}
- ndr = ndr_pull_init_blob(&state->buffer,
- state->pkt,
- state->caller.smb_iconv_c);
+ ndr = ndr_pull_init_blob(&state->buffer, state->pkt);
if (tevent_req_nomem(ndr, req)) {
return;
}
@@ -392,8 +387,7 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn)
subreq = dcerpc_read_ncacn_packet_send(dcesrv_conn,
dcesrv_conn->event_ctx,
- dcesrv_conn->stream,
- lp_iconv_convenience(lp_ctx));
+ dcesrv_conn->stream);
if (!subreq) {
status = NT_STATUS_NO_MEMORY;
DEBUG(0,("dcesrv_sock_accept: dcerpc_read_fragment_buffer_send(%s)\n",
@@ -413,7 +407,6 @@ static void dcesrv_read_fragment_done(struct tevent_req *subreq)
struct ncacn_packet *pkt;
DATA_BLOB buffer;
NTSTATUS status;
- struct loadparm_context *lp_ctx = dce_conn->dce_ctx->lp_ctx;
status = dcerpc_read_ncacn_packet_recv(subreq, dce_conn,
&pkt, &buffer);
@@ -431,8 +424,7 @@ static void dcesrv_read_fragment_done(struct tevent_req *subreq)
subreq = dcerpc_read_ncacn_packet_send(dce_conn,
dce_conn->event_ctx,
- dce_conn->stream,
- lp_iconv_convenience(lp_ctx));
+ dce_conn->stream);
if (!subreq) {
status = NT_STATUS_NO_MEMORY;
dcesrv_terminate_connection(dce_conn, nt_errstr(status));
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 0fe8e0eb9b..f6212da250 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -33,11 +33,11 @@ enum spoolss_handle {
SPOOLSS_NOTIFY
};
-#define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
- ((info)?ndr_size_##fn(info, level, ic, 0):0)
+#define SPOOLSS_BUFFER_UNION(fn,info,level) \
+ ((info)?ndr_size_##fn(info, level, 0):0)
-#define SPOOLSS_BUFFER_UNION_ARRAY(fn,ic,info,level,count) \
- ((info)?ndr_size_##fn##_info(dce_call, ic, level, count, info):0)
+#define SPOOLSS_BUFFER_UNION_ARRAY(fn,info,level,count) \
+ ((info)?ndr_size_##fn##_info(dce_call, level, count, info):0)
#define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= *r->out.needed)?val_true:val_false)
@@ -238,7 +238,6 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -246,7 +245,7 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumPrinters(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -374,7 +373,6 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -382,7 +380,7 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
status = ntptr_EnumPrinterDrivers(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -407,7 +405,6 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -415,7 +412,7 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
status = ntptr_GetPrinterDriverDirectory(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, ic, r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -459,7 +456,6 @@ static WERROR dcesrv_spoolss_GetPrintProcessorDirectory(struct dcesrv_call_state
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -467,7 +463,7 @@ static WERROR dcesrv_spoolss_GetPrintProcessorDirectory(struct dcesrv_call_state
status = ntptr_GetPrintProcessorDirectory(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo, ic, r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -721,7 +717,6 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
struct ntptr_GenericHandle *handle;
struct dcesrv_handle *h;
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -742,7 +737,7 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_FOOBAR;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, ic, r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -789,7 +784,6 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
struct ntptr_GenericHandle *handle;
struct dcesrv_handle *h;
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -809,7 +803,7 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
return WERR_FOOBAR;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -824,7 +818,6 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
W_ERROR_NOT_OK_RETURN(status);
@@ -832,7 +825,7 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
status = ntptr_EnumPorts(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -847,7 +840,6 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
W_ERROR_NOT_OK_RETURN(status);
@@ -855,7 +847,7 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumMonitors(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index c639c634d1..575902a164 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -141,7 +141,7 @@ static WERROR dcesrv_winreg_CreateKey(struct dcesrv_call_state *dce_call,
if (sdblob.data == NULL) {
return WERR_INVALID_PARAM;
}
- ndr_err = ndr_pull_struct_blob_all(&sdblob, mem_ctx, NULL, &sd,
+ ndr_err = ndr_pull_struct_blob_all(&sdblob, mem_ctx, &sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_INVALID_PARAM;
diff --git a/source4/scripting/python/modules.h b/source4/scripting/python/modules.h
index c73cfff19c..8e3c0a21c2 100644
--- a/source4/scripting/python/modules.h
+++ b/source4/scripting/python/modules.h
@@ -23,7 +23,4 @@
void py_load_samba_modules(void);
bool py_update_path(const char *bindir);
-#define py_iconv_convenience(mem_ctx) smb_iconv_convenience_reinit(mem_ctx, "ASCII", \
- PyUnicode_GetDefaultEncoding(), true, NULL)
-
#endif /* __SAMBA_PYTHON_MODULES_H__ */
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index 5fba041e1e..cfef9d18a4 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -159,7 +159,7 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req,
if (io->ntcreatex.in.sec_desc == NULL) {
return NT_STATUS_NO_MEMORY;
}
- ndr_err = ndr_pull_struct_blob(&blob, io, NULL,
+ ndr_err = ndr_pull_struct_blob(&blob, io,
io->ntcreatex.in.sec_desc,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -206,7 +206,7 @@ static NTSTATUS nttrans_query_sec_desc_send(struct nttrans_op *op)
NT_STATUS_NOT_OK_RETURN(status);
params = op->trans->out.params.data;
- ndr_err = ndr_push_struct_blob(&op->trans->out.data, op, NULL,
+ ndr_err = ndr_push_struct_blob(&op->trans->out.data, op,
io->query_secdesc.out.sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -272,7 +272,7 @@ static NTSTATUS nttrans_set_sec_desc(struct smbsrv_request *req,
io->set_secdesc.in.sd = talloc(io, struct security_descriptor);
NT_STATUS_HAVE_NO_MEMORY(io->set_secdesc.in.sd);
- ndr_err = ndr_pull_struct_blob(&trans->in.data, req, NULL,
+ ndr_err = ndr_pull_struct_blob(&trans->in.data, req,
io->set_secdesc.in.sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/smb_server/smb2/fileinfo.c b/source4/smb_server/smb2/fileinfo.c
index 3084236355..5e4f35e02b 100644
--- a/source4/smb_server/smb2/fileinfo.c
+++ b/source4/smb_server/smb2/fileinfo.c
@@ -150,7 +150,7 @@ static NTSTATUS smb2srv_getinfo_security_send(struct smb2srv_getinfo_op *op)
union smb_fileinfo *io = talloc_get_type(op->io_ptr, union smb_fileinfo);
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(&op->info->out.blob, op->req, NULL,
+ ndr_err = ndr_push_struct_blob(&op->info->out.blob, op->req,
io->query_secdesc.out.sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -316,7 +316,7 @@ static NTSTATUS smb2srv_setinfo_security(struct smb2srv_setinfo_op *op, uint8_t
io->set_secdesc.in.sd = talloc(io, struct security_descriptor);
NT_STATUS_HAVE_NO_MEMORY(io->set_secdesc.in.sd);
- ndr_err = ndr_pull_struct_blob(&op->info->in.blob, io, NULL,
+ ndr_err = ndr_pull_struct_blob(&op->info->in.blob, io,
io->set_secdesc.in.sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/smb_server/smb2/fileio.c b/source4/smb_server/smb2/fileio.c
index 26d0a3e8e0..f6460e0ee7 100644
--- a/source4/smb_server/smb2/fileio.c
+++ b/source4/smb_server/smb2/fileio.c
@@ -109,7 +109,7 @@ void smb2srv_create_recv(struct smb2srv_request *req)
smb2srv_send_error(req, NT_STATUS_NO_MEMORY);
return;
}
- ndr_err = ndr_pull_struct_blob(&io->smb2.in.blobs.blobs[i].data, io, NULL,
+ ndr_err = ndr_pull_struct_blob(&io->smb2.in.blobs.blobs[i].data, io,
io->smb2.in.sec_desc,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 149421532f..88917c4f38 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -219,9 +219,7 @@ static NTSTATUS setup_parent_messaging(struct tevent_context *event_ctx,
msg = messaging_init(talloc_autofree_context(),
lp_messaging_path(event_ctx, lp_ctx),
- cluster_id(0, SAMBA_PARENT_TASKID),
- lp_iconv_convenience(lp_ctx),
- event_ctx);
+ cluster_id(0, SAMBA_PARENT_TASKID), event_ctx);
NT_STATUS_HAVE_NO_MEMORY(msg);
irpc_add_name(msg, "samba");
diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c
index bce663ba8e..d78fd72cc2 100644
--- a/source4/smbd/service_named_pipe.c
+++ b/source4/smbd/service_named_pipe.c
@@ -211,7 +211,6 @@ static void named_pipe_auth_request(struct tevent_req *subreq)
ndr_err = ndr_pull_struct_blob_all(
&call->in,
pipe_conn,
- lp_iconv_convenience(conn->lp_ctx),
&pipe_request,
(ndr_pull_flags_fn_t) ndr_pull_named_pipe_auth_req);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -480,7 +479,6 @@ static void named_pipe_auth_request(struct tevent_req *subreq)
reply:
/* create the output */
ndr_err = ndr_push_struct_blob(&call->out, pipe_conn,
- lp_iconv_convenience(conn->lp_ctx),
&pipe_reply,
(ndr_push_flags_fn_t)ndr_push_named_pipe_auth_rep);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index 043720597c..8c38f27d74 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -188,9 +188,7 @@ static void stream_new_connection(struct tevent_context *ev,
/* setup to receive internal messages on this connection */
srv_conn->msg_ctx = messaging_init(srv_conn,
lp_messaging_path(srv_conn, lp_ctx),
- srv_conn->server_id,
- lp_iconv_convenience(lp_ctx),
- ev);
+ srv_conn->server_id, ev);
if (!srv_conn->msg_ctx) {
stream_terminate_connection(srv_conn, "messaging_init() failed");
return;
diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c
index d5d3eef59c..55f2fa24b8 100644
--- a/source4/smbd/service_task.c
+++ b/source4/smbd/service_task.c
@@ -81,7 +81,6 @@ static void task_server_callback(struct tevent_context *event_ctx,
task->msg_ctx = messaging_init(task,
lp_messaging_path(task, task->lp_ctx),
task->server_id,
- lp_iconv_convenience(task->lp_ctx),
task->event_ctx);
if (!task->msg_ctx) {
task_server_terminate(task, "messaging_init() failed", true);
diff --git a/source4/torture/auth/pac.c b/source4/torture/auth/pac.c
index 182478a465..2223f39161 100644
--- a/source4/torture/auth/pac.c
+++ b/source4/torture/auth/pac.c
@@ -114,7 +114,6 @@ static bool torture_pac_self_check(struct torture_context *tctx)
/* OK, go ahead and make a PAC */
ret = kerberos_create_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
server_info,
smb_krb5_context->krb5_context,
&krbtgt_keyblock,
@@ -141,7 +140,6 @@ static bool torture_pac_self_check(struct torture_context *tctx)
/* Now check that we can read it back (using full decode and validate) */
nt_status = kerberos_decode_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&pac_data,
tmp_blob,
smb_krb5_context->krb5_context,
@@ -165,7 +163,6 @@ static bool torture_pac_self_check(struct torture_context *tctx)
/* Now check we can read it back (using Heimdal's pac parsing) */
nt_status = kerberos_pac_blob_to_server_info(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
tmp_blob,
smb_krb5_context->krb5_context,
&server_info_out);
@@ -189,7 +186,6 @@ static bool torture_pac_self_check(struct torture_context *tctx)
/* Now check that we can read it back (yet again) */
nt_status = kerberos_pac_logon_info(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&logon_info,
tmp_blob,
smb_krb5_context->krb5_context,
@@ -409,7 +405,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
/* Decode and verify the signaure on the PAC */
nt_status = kerberos_decode_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&pac_data,
tmp_blob,
smb_krb5_context->krb5_context,
@@ -430,7 +425,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
/* Now check we can read it back (using Heimdal's pac parsing) */
nt_status = kerberos_pac_blob_to_server_info(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
tmp_blob,
smb_krb5_context->krb5_context,
&server_info_out);
@@ -468,7 +462,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
/* Parse the PAC again, for the logon info this time (using Samba4's parsing) */
nt_status = kerberos_pac_logon_info(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&logon_info,
tmp_blob,
smb_krb5_context->krb5_context,
@@ -533,7 +526,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
}
ret = kerberos_encode_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
pac_data,
smb_krb5_context->krb5_context,
krbtgt_keyblock_p,
@@ -585,7 +577,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
}
ret = kerberos_create_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
server_info_out,
smb_krb5_context->krb5_context,
krbtgt_keyblock_p,
@@ -611,7 +602,7 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
*/
if (tmp_blob.length != validate_blob.length) {
ndr_err = ndr_pull_struct_blob(&validate_blob, mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx), &pac_data2,
+ &pac_data2,
(ndr_pull_flags_fn_t)ndr_pull_PAC_DATA);
nt_status = ndr_map_error2ntstatus(ndr_err);
torture_assert_ntstatus_ok(tctx, nt_status, "can't parse the PAC");
@@ -633,7 +624,7 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
if (memcmp(tmp_blob.data, validate_blob.data, tmp_blob.length) != 0) {
ndr_err = ndr_pull_struct_blob(&validate_blob, mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx), &pac_data2,
+ &pac_data2,
(ndr_pull_flags_fn_t)ndr_pull_PAC_DATA);
nt_status = ndr_map_error2ntstatus(ndr_err);
torture_assert_ntstatus_ok(tctx, nt_status, "can't parse the PAC");
@@ -659,7 +650,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
/* Break the auth time, to ensure we check this vital detail (not setting this caused all the pain in the first place... */
nt_status = kerberos_decode_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&pac_data,
tmp_blob,
smb_krb5_context->krb5_context,
@@ -697,7 +687,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
}
nt_status = kerberos_decode_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&pac_data,
tmp_blob,
smb_krb5_context->krb5_context,
@@ -717,7 +706,6 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
tmp_blob.data[tmp_blob.length - 2]++;
nt_status = kerberos_decode_pac(mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&pac_data,
tmp_blob,
smb_krb5_context->krb5_context,
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 309a394476..b2d523283a 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -55,7 +55,6 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx)
if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), tctx->ev,
lp_resolve_context(tctx->lp_ctx), &options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_socket_options(tctx->lp_ctx))) {
torture_comment(tctx, "Failed to connect with %s\n", host);
goto failed;
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index 37c1f43c39..a4d8674db9 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -435,8 +435,7 @@ static NTSTATUS try_nttrans_len(struct smbcli_state *cli,
/****************************************************************************
check for existance of a nttrans call
****************************************************************************/
-static bool scan_nttrans(struct smb_iconv_convenience *iconv_convenience,
- struct smbcli_state *cli, int op, int level,
+static bool scan_nttrans(struct smbcli_state *cli, int op, int level,
int fnum, int dnum, const char *fname)
{
int data_len = 0;
@@ -546,7 +545,6 @@ bool torture_nttrans_scan(struct torture_context *torture,
{
int op, level;
const char *fname = "\\scanner.dat";
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(torture->lp_ctx);
int fnum, dnum;
fnum = smbcli_open(cli->tree, fname, O_RDWR | O_CREAT | O_TRUNC,
@@ -556,18 +554,15 @@ bool torture_nttrans_scan(struct torture_context *torture,
for (op=OP_MIN; op<=OP_MAX; op++) {
printf("Scanning op=%d\n", op);
for (level = 0; level <= 50; level++) {
- scan_nttrans(iconv_convenience,
- cli, op, level, fnum, dnum, fname);
+ scan_nttrans(cli, op, level, fnum, dnum, fname);
}
for (level = 0x100; level <= 0x130; level++) {
- scan_nttrans(iconv_convenience,
- cli, op, level, fnum, dnum, fname);
+ scan_nttrans(cli, op, level, fnum, dnum, fname);
}
for (level = 1000; level < 1050; level++) {
- scan_nttrans(iconv_convenience,
- cli, op, level, fnum, dnum, fname);
+ scan_nttrans(cli, op, level, fnum, dnum, fname);
}
}
diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c
index 158418a284..682bc0963e 100644
--- a/source4/torture/basic/utable.c
+++ b/source4/torture/basic/utable.c
@@ -49,9 +49,9 @@ bool torture_utable(struct torture_context *tctx,
SSVAL(c2, 0, c);
strncpy(fname, "\\utable\\x", sizeof(fname)-1);
p = fname+strlen(fname);
- convert_string_convenience(lp_iconv_convenience(tctx->lp_ctx), CH_UTF16, CH_UNIX,
+ len = convert_string(CH_UTF16, CH_UNIX,
c2, 2,
- p, sizeof(fname)-strlen(fname), &len, false);
+ p, sizeof(fname)-strlen(fname), false);
p[len] = 0;
strncat(fname,"_a_long_extension",sizeof(fname)-1);
@@ -97,7 +97,7 @@ bool torture_utable(struct torture_context *tctx,
}
-static char *form_name(struct smb_iconv_convenience *iconv_convenience, int c)
+static char *form_name(int c)
{
static char fname[256];
uint8_t c2[4];
@@ -108,9 +108,11 @@ static char *form_name(struct smb_iconv_convenience *iconv_convenience, int c)
p = fname+strlen(fname);
SSVAL(c2, 0, c);
- convert_string_convenience(iconv_convenience, CH_UTF16, CH_UNIX,
+ len = convert_string(CH_UTF16, CH_UNIX,
c2, 2,
- p, sizeof(fname)-strlen(fname), &len, false);
+ p, sizeof(fname)-strlen(fname), false);
+ if (len == -1)
+ return NULL;
p[len] = 0;
return fname;
}
@@ -138,7 +140,7 @@ bool torture_casetable(struct torture_context *tctx,
torture_comment(tctx, "%04x (%c)\n", c, isprint(c)?c:'.');
- fname = form_name(lp_iconv_convenience(tctx->lp_ctx), c);
+ fname = form_name(c);
fnum = smbcli_nt_create_full(cli->tree, fname, 0,
#if 0
SEC_RIGHT_MAXIMUM_ALLOWED,
diff --git a/source4/torture/drs/unit/prefixmap_tests.c b/source4/torture/drs/unit/prefixmap_tests.c
index 4282e26a6c..a4521eb675 100644
--- a/source4/torture/drs/unit/prefixmap_tests.c
+++ b/source4/torture/drs/unit/prefixmap_tests.c
@@ -500,7 +500,7 @@ static bool torture_drs_unit_pfm_to_from_ldb_val(struct torture_context *tctx, s
mem_ctx = talloc_new(tctx);
torture_assert(tctx, mem_ctx, "Unexpected: Have no memory!");
- schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
+ schema = dsdb_new_schema(mem_ctx);
torture_assert(tctx, schema, "Unexpected: failed to allocate schema object");
/* set priv->pfm_full as prefixMap for new schema object */
@@ -552,7 +552,7 @@ static bool torture_drs_unit_pfm_read_write_ldb(struct torture_context *tctx, st
torture_assert(tctx, mem_ctx, "Unexpected: Have no memory!");
/* makeup a dsdb_schema to test with */
- schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
+ schema = dsdb_new_schema(mem_ctx);
torture_assert(tctx, schema, "Unexpected: failed to allocate schema object");
/* set priv->pfm_full as prefixMap for new schema object */
schema->prefixmap = priv->pfm_full;
@@ -606,7 +606,7 @@ static bool torture_drs_unit_dsdb_create_prefix_mapping(struct torture_context *
torture_assert(tctx, mem_ctx, "Unexpected: Have no memory!");
/* makeup a dsdb_schema to test with */
- schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
+ schema = dsdb_new_schema(mem_ctx);
torture_assert(tctx, schema, "Unexpected: failed to allocate schema object");
/* set priv->pfm_full as prefixMap for new schema object */
schema->schema_info = priv->schi_default_str;
diff --git a/source4/torture/drs/unit/schemainfo_tests.c b/source4/torture/drs/unit/schemainfo_tests.c
index f197b479e9..a69e8a80cc 100644
--- a/source4/torture/drs/unit/schemainfo_tests.c
+++ b/source4/torture/drs/unit/schemainfo_tests.c
@@ -513,7 +513,7 @@ static bool torture_drs_unit_schemainfo_setup(struct torture_context *tctx,
torture_assert(tctx, priv->ldb_module, "Not enough memory!");
/* create schema mockup object */
- priv->schema = dsdb_new_schema(priv, lp_iconv_convenience(tctx->lp_ctx));
+ priv->schema = dsdb_new_schema(priv);
/* pre-cache invocationId for samdb_ntds_invocation_id()
* to work with our mock ldb */
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 4b7128f3ab..10a1370b9d 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -247,7 +247,6 @@ static bool connect_servers(struct tevent_context *ev,
lp_resolve_context(lp_ctx), ev,
&smb_options,
&smb_session_options,
- lp_iconv_convenience(lp_ctx),
lp_gensec_settings(lp_ctx, lp_ctx));
}
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 05af0a6403..73bbcd15cb 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -45,7 +45,6 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
struct netlogon_samlogon_response n1;
struct GUID guid;
int i;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
struct tsocket_address *dest_addr;
int ret;
@@ -69,7 +68,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying without any attributes\n");
search = empty_search;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
n1 = search.out.netlogon;
@@ -82,7 +81,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
for (i=0;i<256;i++) {
search.in.version = i;
printf("Trying netlogon level %d\n", i);
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
}
@@ -90,42 +89,42 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
for (i=0;i<31;i++) {
search.in.version = (1<<i);
printf("Trying netlogon level 0x%x\n", i);
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
}
search.in.version = NETLOGON_NT_VERSION_5|NETLOGON_NT_VERSION_5EX|NETLOGON_NT_VERSION_IP;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
printf("Trying with User=NULL\n");
search.in.user = NULL;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
printf("Trying with User=Administrator\n");
search.in.user = "Administrator";
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
search.in.version = NETLOGON_NT_VERSION_5;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
printf("Trying with User=NULL\n");
search.in.user = NULL;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
printf("Trying with User=Administrator\n");
search.in.user = "Administrator";
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
@@ -135,7 +134,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying with a GUID\n");
search.in.realm = NULL;
search.in.domain_guid = GUID_string(tctx, &n1.data.nt5_ex.domain_uuid);
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
CHECK_STRING(GUID_string(tctx, &search.out.netlogon.data.nt5_ex.domain_uuid), search.in.domain_guid);
@@ -144,13 +143,13 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
guid = GUID_random();
search.in.user = NULL;
search.in.domain_guid = GUID_string(tctx, &guid);
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_NOT_FOUND);
printf("Trying with a AAC\n");
search.in.acct_control = ACB_WSTRUST|ACB_SVRTRUST;
search.in.realm = n1.data.nt5_ex.dns_domain;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
@@ -158,7 +157,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying with a zero AAC\n");
search.in.acct_control = 0x0;
search.in.realm = n1.data.nt5_ex.dns_domain;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
@@ -167,7 +166,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
search.in.acct_control = 0x0;
search.in.user = "Administrator";
search.in.realm = n1.data.nt5_ex.dns_domain;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "Administrator");
@@ -176,7 +175,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
search.in.user = NULL;
search.in.acct_control = 0xFF00FF00;
search.in.realm = n1.data.nt5_ex.dns_domain;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
@@ -184,7 +183,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying with a user only\n");
search = empty_search;
search.in.user = "Administrator";
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
@@ -196,7 +195,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying with just a bad username\n");
search.in.user = "___no_such_user___";
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
@@ -210,12 +209,12 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying with just a bad domain\n");
search = empty_search;
search.in.realm = "___no_such_domain___";
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_NOT_FOUND);
printf("Trying with a incorrect domain and correct guid\n");
search.in.domain_guid = GUID_string(tctx, &n1.data.nt5_ex.domain_uuid);
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
@@ -228,7 +227,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying with a incorrect domain and incorrect guid\n");
search.in.domain_guid = GUID_string(tctx, &guid);
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_NOT_FOUND);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
@@ -242,7 +241,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Trying with a incorrect GUID and correct domain\n");
search.in.domain_guid = GUID_string(tctx, &guid);
search.in.realm = n1.data.nt5_ex.dns_domain;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX);
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
@@ -255,7 +254,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
printf("Proof other results\n");
search.in.user = "Administrator";
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_STRING(search.out.netlogon.data.nt5_ex.forest, n1.data.nt5_ex.dns_domain);
CHECK_STRING(search.out.netlogon.data.nt5_ex.dns_domain, n1.data.nt5_ex.dns_domain);
@@ -279,7 +278,6 @@ static bool test_cldap_netlogon_flags(struct torture_context *tctx,
struct cldap_netlogon search;
struct netlogon_samlogon_response n1;
uint32_t server_type;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
struct tsocket_address *dest_addr;
int ret;
@@ -302,7 +300,7 @@ static bool test_cldap_netlogon_flags(struct torture_context *tctx,
search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
search.in.map_response = true;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
n1 = search.out.netlogon;
@@ -399,7 +397,6 @@ static bool test_cldap_netlogon_flag_ds_dns_forest(struct torture_context *tctx,
struct cldap_netlogon search;
uint32_t server_type;
struct netlogon_samlogon_response n1;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
bool result = true;
struct tsocket_address *dest_addr;
int ret;
@@ -423,7 +420,7 @@ static bool test_cldap_netlogon_flag_ds_dns_forest(struct torture_context *tctx,
search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
search.in.map_response = true;
- status = cldap_netlogon(cldap, iconv_convenience, tctx, &search);
+ status = cldap_netlogon(cldap, tctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
n1 = search.out.netlogon;
diff --git a/source4/torture/ldap/cldapbench.c b/source4/torture/ldap/cldapbench.c
index a63c78944b..27c0746e9a 100644
--- a/source4/torture/ldap/cldapbench.c
+++ b/source4/torture/ldap/cldapbench.c
@@ -40,9 +40,7 @@ static void request_netlogon_handler(struct tevent_req *req)
NTSTATUS status;
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
io.in.version = 6;
- status = cldap_netlogon_recv(req,
- lp_iconv_convenience(state->tctx->lp_ctx),
- tmp_ctx, &io);
+ status = cldap_netlogon_recv(req, tmp_ctx, &io);
talloc_free(req);
if (NT_STATUS_IS_OK(status)) {
state->pass_count++;
diff --git a/source4/torture/ldap/uptodatevector.c b/source4/torture/ldap/uptodatevector.c
index 0921cf779b..76eb45c5c1 100644
--- a/source4/torture/ldap/uptodatevector.c
+++ b/source4/torture/ldap/uptodatevector.c
@@ -65,7 +65,7 @@ static bool test_check_uptodatevector(struct torture_context *torture,
utdv_val1 = ldb_msg_find_ldb_val(r->msgs[0], "replUpToDateVector");
if (utdv_val1) {
ndr_err = ndr_pull_struct_blob_all(utdv_val1, torture,
- lp_iconv_convenience(torture->lp_ctx), &utdv1,
+ &utdv1,
(ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
@@ -111,7 +111,7 @@ static bool test_check_uptodatevector(struct torture_context *torture,
utdv_val = ldb_msg_find_ldb_val(r->msgs[0], "replUpToDateVector");
if (utdv_val) {
ndr_err = ndr_pull_struct_blob_all(utdv_val, torture,
- lp_iconv_convenience(torture->lp_ctx), &utdv,
+ &utdv,
(ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index dd9e173b54..b674e0eddb 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -398,7 +398,7 @@ static NTSTATUS test_become_dc_schema_chunk(void *private_data,
}
if (!s->schema) {
- s->self_made_schema = dsdb_new_schema(s, lp_iconv_convenience(s->lp_ctx));
+ s->self_made_schema = dsdb_new_schema(s);
NT_STATUS_HAVE_NO_MEMORY(s->self_made_schema);
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index b3ee8fc28f..a09b54cfd6 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -167,7 +167,6 @@ static struct smbcli_state *connect_one(struct tevent_context *ev,
servers[snum],
lp_resolve_context(lp_ctx),
ev, &options, &session_options,
- lp_iconv_convenience(lp_ctx),
lp_gensec_settings(mem_ctx, lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
sleep(2);
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index 0dd6a8f929..e61eb868a4 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -77,7 +77,6 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx,
const char *socket_options,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
- struct smb_iconv_convenience *iconv_convenience,
struct gensec_settings *gensec_settings)
{
struct smbcli_state *c;
@@ -99,7 +98,6 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx,
socket_options,
cmdline_credentials, resolve_ctx, ev,
options, session_options,
- iconv_convenience,
gensec_settings);
if (!NT_STATUS_IS_OK(status)) {
@@ -372,7 +370,6 @@ static void usage(poptContext pc)
cli = connect_one(lp_resolve_context(lp_ctx), ev, mem_ctx, share,
lp_smb_ports(lp_ctx), lp_socket_options(lp_ctx),
&options, &session_options,
- lp_iconv_convenience(lp_ctx),
lp_gensec_settings(mem_ctx, lp_ctx));
if (!cli) {
DEBUG(0,("Failed to connect to %s\n", share));
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index 09aaa41c68..7d1199ec2a 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -64,8 +64,7 @@ static void netlogon_handler(struct dgram_mailslot_handler *dgmslot,
static bool nbt_test_netlogon(struct torture_context *tctx)
{
struct dgram_mailslot_handler *dgmslot;
- struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, tctx->ev,
- lp_iconv_convenience(tctx->lp_ctx));
+ struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, tctx->ev);
struct socket_address *dest;
const char *myaddress;
struct nbt_netlogon_packet logon;
@@ -155,8 +154,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
static bool nbt_test_netlogon2(struct torture_context *tctx)
{
struct dgram_mailslot_handler *dgmslot;
- struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, tctx->ev,
- lp_iconv_convenience(tctx->lp_ctx));
+ struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, tctx->ev);
struct socket_address *dest;
const char *myaddress;
struct nbt_netlogon_packet logon;
@@ -425,8 +423,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
static bool nbt_test_ntlogon(struct torture_context *tctx)
{
struct dgram_mailslot_handler *dgmslot;
- struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, tctx->ev,
- lp_iconv_convenience(tctx->lp_ctx));
+ struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, tctx->ev);
struct socket_address *dest;
struct test_join *join_ctx;
const struct dom_sid *dom_sid;
diff --git a/source4/torture/nbt/nbt.c b/source4/torture/nbt/nbt.c
index aee0c54358..1dcfa563df 100644
--- a/source4/torture/nbt/nbt.c
+++ b/source4/torture/nbt/nbt.c
@@ -27,7 +27,7 @@
struct nbt_name_socket *torture_init_nbt_socket(struct torture_context *tctx)
{
- return nbt_name_socket_init(tctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ return nbt_name_socket_init(tctx, tctx->ev);
}
bool torture_nbt_get_name(struct torture_context *tctx,
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index bea3d4f9cf..226f388f35 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -225,7 +225,7 @@ static void generate_request(struct nbt_name_socket *nbtsock, struct wins_state
*/
static bool bench_wins(struct torture_context *tctx)
{
- struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ struct nbt_name_socket *nbtsock = nbt_name_socket_init(tctx, tctx->ev);
int num_sent=0;
struct timeval tv = timeval_current();
bool ret = true;
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 9a7be03199..b8152f79d6 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -102,8 +102,8 @@ static bool test_assoc_ctx1(struct torture_context *tctx)
torture_comment(tctx, "Test if assoc_ctx is only valid on the conection it was created on\n");
- wrepl_socket1 = wrepl_socket_init(tctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
- wrepl_socket2 = wrepl_socket_init(tctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ wrepl_socket1 = wrepl_socket_init(tctx, tctx->ev);
+ wrepl_socket2 = wrepl_socket_init(tctx, tctx->ev);
torture_comment(tctx, "Setup 2 wrepl connections\n");
status = wrepl_connect(wrepl_socket1, wrepl_best_ip(tctx->lp_ctx, address), address);
@@ -193,7 +193,7 @@ static bool test_assoc_ctx2(struct torture_context *tctx)
torture_comment(tctx, "Test if we always get back the same assoc_ctx\n");
- wrepl_socket = wrepl_socket_init(tctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ wrepl_socket = wrepl_socket_init(tctx, tctx->ev);
torture_comment(tctx, "Setup wrepl connections\n");
status = wrepl_connect(wrepl_socket, wrepl_best_ip(tctx->lp_ctx, address), address);
@@ -262,7 +262,7 @@ static bool test_wins_replication(struct torture_context *tctx)
torture_comment(tctx, "Test one pull replication cycle\n");
- wrepl_socket = wrepl_socket_init(tctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ wrepl_socket = wrepl_socket_init(tctx, tctx->ev);
torture_comment(tctx, "Setup wrepl connections\n");
status = wrepl_connect(wrepl_socket, wrepl_best_ip(tctx->lp_ctx, address), address);
@@ -555,7 +555,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
if (!ctx) return NULL;
ctx->address = address;
- ctx->pull = wrepl_socket_init(ctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ ctx->pull = wrepl_socket_init(ctx, tctx->ev);
if (!ctx->pull) return NULL;
torture_comment(tctx, "Setup wrepl conflict pull connection\n");
@@ -612,7 +612,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
talloc_free(pull_table.out.partners);
- ctx->nbtsock = nbt_name_socket_init(ctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ ctx->nbtsock = nbt_name_socket_init(ctx, tctx->ev);
if (!ctx->nbtsock) return NULL;
load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
@@ -630,7 +630,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
status = socket_listen(ctx->nbtsock->sock, ctx->myaddr, 0, 0);
if (!NT_STATUS_IS_OK(status)) return NULL;
- ctx->nbtsock_srv = nbt_name_socket_init(ctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ ctx->nbtsock_srv = nbt_name_socket_init(ctx, tctx->ev);
if (!ctx->nbtsock_srv) return NULL;
/* Make a port 137 version of ctx->myaddr */
@@ -647,13 +647,13 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
}
if (ctx->myaddr2 && ctx->nbtsock_srv) {
- ctx->nbtsock2 = nbt_name_socket_init(ctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ ctx->nbtsock2 = nbt_name_socket_init(ctx, tctx->ev);
if (!ctx->nbtsock2) return NULL;
status = socket_listen(ctx->nbtsock2->sock, ctx->myaddr2, 0, 0);
if (!NT_STATUS_IS_OK(status)) return NULL;
- ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx, lp_iconv_convenience(tctx->lp_ctx));
+ ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx);
if (!ctx->nbtsock_srv2) return NULL;
/* Make a port 137 version of ctx->myaddr2 */
@@ -724,7 +724,7 @@ static bool test_wrepl_update_one(struct torture_context *tctx,
uint32_t assoc_ctx;
NTSTATUS status;
- wrepl_socket = wrepl_socket_init(ctx, tctx->ev, lp_iconv_convenience(tctx->lp_ctx));
+ wrepl_socket = wrepl_socket_init(ctx, tctx->ev);
status = wrepl_connect(wrepl_socket, wrepl_best_ip(tctx->lp_ctx, ctx->address), ctx->address);
CHECK_STATUS(tctx, status, NT_STATUS_OK);
diff --git a/source4/torture/ndr/ndr.c b/source4/torture/ndr/ndr.c
index 24f5fba282..6068e108b5 100644
--- a/source4/torture/ndr/ndr.c
+++ b/source4/torture/ndr/ndr.c
@@ -38,7 +38,7 @@ static bool wrap_ndr_pull_test(struct torture_context *tctx,
bool (*check_fn) (struct torture_context *ctx, void *data) = test->fn;
const struct ndr_pull_test_data *data = (const struct ndr_pull_test_data *)test->data;
void *ds = talloc_zero_size(tctx, data->struct_size);
- struct ndr_pull *ndr = ndr_pull_init_blob(&(data->data), tctx, lp_iconv_convenience(tctx->lp_ctx));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&(data->data), tctx);
ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
@@ -97,7 +97,7 @@ static bool test_check_string_terminator(struct torture_context *tctx)
/* Simple test */
blob = strhex_to_data_blob(tctx, "0000");
- ndr = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
+ ndr = ndr_pull_init_blob(&blob, mem_ctx);
torture_assert_ndr_success(tctx, ndr_check_string_terminator(ndr, 1, 2),
"simple check_string_terminator test failed");
@@ -115,7 +115,7 @@ static bool test_check_string_terminator(struct torture_context *tctx)
talloc_free(ndr);
blob = strhex_to_data_blob(tctx, "11220000");
- ndr = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
+ ndr = ndr_pull_init_blob(&blob, mem_ctx);
torture_assert_ndr_success(tctx,
ndr_check_string_terminator(ndr, 4, 1),
diff --git a/source4/torture/ntp/ntp_signd.c b/source4/torture/ntp/ntp_signd.c
index bf631f4445..9b4b9c3a4e 100644
--- a/source4/torture/ntp/ntp_signd.c
+++ b/source4/torture/ntp/ntp_signd.c
@@ -137,7 +137,6 @@ static bool test_ntp_signd(struct torture_context *tctx,
ndr_err = ndr_push_struct_blob(&sign_req_blob,
mem_ctx,
- NULL,
&sign_req,
(ndr_push_flags_fn_t)ndr_push_sign_request);
torture_assert(tctx,
@@ -246,7 +245,6 @@ static bool test_ntp_signd(struct torture_context *tctx,
torture_comment(tctx, "Validating the reply buffer\n");
ndr_err = ndr_pull_struct_blob_all(&signd_client->reply,
mem_ctx,
- lp_iconv_convenience(tctx->lp_ctx),
&signed_reply,
(ndr_pull_flags_fn_t)ndr_pull_signed_reply);
torture_assert(tctx, NDR_ERR_CODE_IS_SUCCESS(ndr_err),
diff --git a/source4/torture/rap/printing.c b/source4/torture/rap/printing.c
index a8a30366cf..e2ef9663be 100644
--- a/source4/torture/rap/printing.c
+++ b/source4/torture/rap/printing.c
@@ -87,7 +87,7 @@ static bool test_netprintqenum(struct torture_context *tctx,
"Testing rap_NetPrintQEnum level %d\n", r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqenum(cli->tree, tctx, &r),
"smbcli_rap_netprintqenum failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
@@ -116,7 +116,7 @@ static bool test_netprintqgetinfo(struct torture_context *tctx,
r_enum.in.bufsize = 8192;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r_enum),
+ smbcli_rap_netprintqenum(cli->tree, tctx, &r_enum),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r_enum.out.status),
"failed to enum printq");
@@ -133,7 +133,7 @@ static bool test_netprintqgetinfo(struct torture_context *tctx,
r.in.PrintQueueName, r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqgetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqgetinfo(cli->tree, tctx, &r),
"smbcli_rap_netprintqgetinfo failed");
switch (r.in.level) {
@@ -158,7 +158,7 @@ static bool test_netprintjob_pause(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetPrintJobPause(%d)\n", r.in.JobID);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobpause(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobpause(cli->tree, tctx, &r),
"smbcli_rap_netprintjobpause failed");
return true;
@@ -175,7 +175,7 @@ static bool test_netprintjob_continue(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetPrintJobContinue(%d)\n", r.in.JobID);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobcontinue(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobcontinue(cli->tree, tctx, &r),
"smbcli_rap_netprintjobcontinue failed");
return true;
@@ -192,7 +192,7 @@ static bool test_netprintjob_delete(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetPrintJobDelete(%d)\n", r.in.JobID);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobdelete(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobdelete(cli->tree, tctx, &r),
"smbcli_rap_netprintjobdelete failed");
return true;
@@ -227,7 +227,7 @@ static bool test_netprintq_pause(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetPrintQueuePause(%s)\n", r.in.PrintQueueName);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqueuepause(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqueuepause(cli->tree, tctx, &r),
"smbcli_rap_netprintqueuepause failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"smbcli_rap_netprintqueuepause failed");
@@ -246,7 +246,7 @@ static bool test_netprintq_resume(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetPrintQueueResume(%s)\n", r.in.PrintQueueName);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqueueresume(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqueueresume(cli->tree, tctx, &r),
"smbcli_rap_netprintqueueresume failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"smbcli_rap_netprintqueueresume failed");
@@ -264,7 +264,7 @@ static bool test_netprintq(struct torture_context *tctx,
r.in.bufsize = 8192;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqenum(cli->tree, tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
@@ -302,7 +302,7 @@ static bool test_netprintjobenum_args(struct torture_context *tctx,
"Testing rap_NetPrintJobEnum(%s) level %d\n", r.in.PrintQueueName, r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobenum(cli->tree, tctx, &r),
"smbcli_rap_netprintjobenum failed");
if (count_p) {
@@ -334,7 +334,7 @@ static bool test_netprintjobenum_one(struct torture_context *tctx,
"Testing rap_NetPrintJobEnum(%s) level %d\n", r.in.PrintQueueName, r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobenum(cli->tree, tctx, &r),
"smbcli_rap_netprintjobenum failed");
}
@@ -359,7 +359,7 @@ static bool test_netprintjobgetinfo_byid(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetPrintJobGetInfo(%d) level %d\n", r.in.JobID, r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobgetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobgetinfo(cli->tree, tctx, &r),
"smbcli_rap_netprintjobgetinfo failed");
}
@@ -387,7 +387,7 @@ static bool test_netprintjobsetinfo_byid(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetPrintJobSetInfo(%d) level %d\n", r.in.JobID, r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobsetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobsetinfo(cli->tree, tctx, &r),
"smbcli_rap_netprintjobsetinfo failed");
}
@@ -407,7 +407,7 @@ static bool test_netprintjobgetinfo_byqueue(struct torture_context *tctx,
r.in.level = 0;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobenum(cli->tree, tctx, &r),
"failed to enumerate jobs");
for (i=0; i < r.out.count; i++) {
@@ -432,7 +432,7 @@ static bool test_netprintjobsetinfo_byqueue(struct torture_context *tctx,
r.in.level = 0;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintjobenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintjobenum(cli->tree, tctx, &r),
"failed to enumerate jobs");
for (i=0; i < r.out.count; i++) {
@@ -455,7 +455,7 @@ static bool test_netprintjobenum(struct torture_context *tctx,
r.in.bufsize = 8192;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqenum(cli->tree, tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
@@ -482,7 +482,7 @@ static bool test_netprintjobgetinfo(struct torture_context *tctx,
r.in.bufsize = 8192;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqenum(cli->tree, tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
@@ -509,7 +509,7 @@ static bool test_netprintjobsetinfo(struct torture_context *tctx,
r.in.bufsize = 8192;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqenum(cli->tree, tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
@@ -542,7 +542,7 @@ static bool test_netprintdestenum(struct torture_context *tctx,
"Testing rap_NetPrintDestEnum level %d\n", r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintdestenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintdestenum(cli->tree, tctx, &r),
"smbcli_rap_netprintdestenum failed");
}
@@ -567,7 +567,7 @@ static bool test_netprintdestgetinfo_bydest(struct torture_context *tctx,
"Testing rap_NetPrintDestGetInfo(%s) level %d\n", r.in.PrintDestName, r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintdestgetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintdestgetinfo(cli->tree, tctx, &r),
"smbcli_rap_netprintdestgetinfo failed");
}
@@ -588,7 +588,7 @@ static bool test_netprintdestgetinfo(struct torture_context *tctx,
"Testing rap_NetPrintDestEnum level %d\n", r.in.level);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintdestenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintdestenum(cli->tree, tctx, &r),
"smbcli_rap_netprintdestenum failed");
for (i=0; i < r.out.count; i++) {
@@ -612,7 +612,7 @@ static bool test_rap_print(struct torture_context *tctx,
r.in.bufsize = 8192;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netprintqenum(cli->tree, tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 5412c1b52d..37edd20ed7 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -82,7 +82,7 @@ struct rap_call {
#define RAPNDR_FLAGS (LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
-static struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, uint16_t callno)
+static struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, uint16_t callno)
{
struct rap_call *call;
@@ -98,10 +98,10 @@ static struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, struct smb_iconv_c
call->datadesc = NULL;
call->auxdatadesc = NULL;
- call->ndr_push_param = ndr_push_init_ctx(mem_ctx, iconv_convenience);
+ call->ndr_push_param = ndr_push_init_ctx(mem_ctx);
call->ndr_push_param->flags = RAPNDR_FLAGS;
- call->ndr_push_data = ndr_push_init_ctx(mem_ctx, iconv_convenience);
+ call->ndr_push_data = ndr_push_init_ctx(mem_ctx);
call->ndr_push_data->flags = RAPNDR_FLAGS;
return call;
@@ -218,7 +218,6 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr,
}
static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
struct rap_call *call)
{
NTSTATUS result;
@@ -228,7 +227,7 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
struct ndr_push *data;
struct smb_trans2 trans;
- params = ndr_push_init_ctx(call, iconv_convenience);
+ params = ndr_push_init_ctx(call);
if (params == NULL)
return NT_STATUS_NO_MEMORY;
@@ -276,12 +275,10 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
if (!NT_STATUS_IS_OK(result))
return result;
- call->ndr_pull_param = ndr_pull_init_blob(&trans.out.params, call,
- iconv_convenience);
+ call->ndr_pull_param = ndr_pull_init_blob(&trans.out.params, call);
call->ndr_pull_param->flags = RAPNDR_FLAGS;
- call->ndr_pull_data = ndr_pull_init_blob(&trans.out.data, call,
- iconv_convenience);
+ call->ndr_pull_data = ndr_pull_init_blob(&trans.out.data, call);
call->ndr_pull_data->flags = RAPNDR_FLAGS;
return result;
@@ -289,7 +286,6 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
static NTSTATUS smbcli_rap_netshareenum(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetShareEnum *r)
{
@@ -297,7 +293,7 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_tree *tree,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
int i;
- call = new_rap_cli_call(tree, iconv_convenience, RAP_WshareEnum);
+ call = new_rap_cli_call(tree, RAP_WshareEnum);
if (call == NULL)
return NT_STATUS_NO_MEMORY;
@@ -319,7 +315,7 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetShareEnum, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -376,7 +372,7 @@ static bool test_netshareenum(struct torture_context *tctx,
r.in.bufsize = 8192;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netshareenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r), "");
+ smbcli_rap_netshareenum(cli->tree, tctx, &r), "");
for (i=0; i<r.out.count; i++) {
printf("%s %d %s\n", r.out.info[i].info1.share_name,
@@ -388,7 +384,6 @@ static bool test_netshareenum(struct torture_context *tctx,
}
static NTSTATUS smbcli_rap_netserverenum2(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetServerEnum2 *r)
{
@@ -396,7 +391,7 @@ static NTSTATUS smbcli_rap_netserverenum2(struct smbcli_tree *tree,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
int i;
- call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_NetServerEnum2);
+ call = new_rap_cli_call(mem_ctx, RAP_NetServerEnum2);
if (call == NULL)
return NT_STATUS_NO_MEMORY;
@@ -420,7 +415,7 @@ static NTSTATUS smbcli_rap_netserverenum2(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetServerEnum2, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -484,7 +479,7 @@ static bool test_netserverenum(struct torture_context *tctx,
r.in.domain = NULL;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netserverenum2(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r), "");
+ smbcli_rap_netserverenum2(cli->tree, tctx, &r), "");
for (i=0; i<r.out.count; i++) {
switch (r.in.level) {
@@ -503,14 +498,13 @@ static bool test_netserverenum(struct torture_context *tctx,
}
NTSTATUS smbcli_rap_netservergetinfo(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_WserverGetInfo *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WserverGetInfo))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WserverGetInfo))) {
return NT_STATUS_NO_MEMORY;
}
@@ -534,7 +528,7 @@ NTSTATUS smbcli_rap_netservergetinfo(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_WserverGetInfo, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -718,7 +712,6 @@ static NTSTATUS rap_pull_rap_PrintQueue5(TALLOC_CTX *mem_ctx, struct ndr_pull *n
}
NTSTATUS smbcli_rap_netprintqenum(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintQEnum *r)
{
@@ -726,7 +719,7 @@ NTSTATUS smbcli_rap_netprintqenum(struct smbcli_tree *tree,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
int i;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintQEnum))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintQEnum))) {
return NT_STATUS_NO_MEMORY;
}
@@ -765,7 +758,7 @@ NTSTATUS smbcli_rap_netprintqenum(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintQEnum, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -823,14 +816,13 @@ NTSTATUS smbcli_rap_netprintqenum(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintqgetinfo(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintQGetInfo *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintQGetInfo))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintQGetInfo))) {
return NT_STATUS_NO_MEMORY;
}
@@ -870,7 +862,7 @@ NTSTATUS smbcli_rap_netprintqgetinfo(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintQGetInfo, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -916,14 +908,13 @@ NTSTATUS smbcli_rap_netprintqgetinfo(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintjobpause(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintJobPause *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintJobPause))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintJobPause))) {
return NT_STATUS_NO_MEMORY;
}
@@ -935,7 +926,7 @@ NTSTATUS smbcli_rap_netprintjobpause(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintJobPause, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -953,14 +944,13 @@ NTSTATUS smbcli_rap_netprintjobpause(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintjobcontinue(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintJobContinue *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintJobContinue))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintJobContinue))) {
return NT_STATUS_NO_MEMORY;
}
@@ -972,7 +962,7 @@ NTSTATUS smbcli_rap_netprintjobcontinue(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintJobContinue, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -990,14 +980,13 @@ NTSTATUS smbcli_rap_netprintjobcontinue(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintjobdelete(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintJobDelete *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintJobDel))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintJobDel))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1009,7 +998,7 @@ NTSTATUS smbcli_rap_netprintjobdelete(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintJobDelete, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1027,14 +1016,13 @@ NTSTATUS smbcli_rap_netprintjobdelete(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintqueuepause(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintQueuePause *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintQPause))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintQPause))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1046,7 +1034,7 @@ NTSTATUS smbcli_rap_netprintqueuepause(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintQueuePause, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1064,14 +1052,13 @@ NTSTATUS smbcli_rap_netprintqueuepause(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintqueueresume(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintQueueResume *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintQContinue))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintQContinue))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1083,7 +1070,7 @@ NTSTATUS smbcli_rap_netprintqueueresume(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintQueueResume, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1101,14 +1088,13 @@ NTSTATUS smbcli_rap_netprintqueueresume(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintqueuepurge(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintQueuePurge *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintQPurge))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintQPurge))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1120,7 +1106,7 @@ NTSTATUS smbcli_rap_netprintqueuepurge(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintQueuePurge, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1138,7 +1124,6 @@ NTSTATUS smbcli_rap_netprintqueuepurge(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintjobenum(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintJobEnum *r)
{
@@ -1146,7 +1131,7 @@ NTSTATUS smbcli_rap_netprintjobenum(struct smbcli_tree *tree,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
int i;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintJobEnum))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintJobEnum))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1180,7 +1165,7 @@ NTSTATUS smbcli_rap_netprintjobenum(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintJobEnum, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1234,14 +1219,13 @@ NTSTATUS smbcli_rap_netprintjobenum(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintjobgetinfo(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintJobGetInfo *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintJobGetInfo))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintJobGetInfo))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1275,7 +1259,7 @@ NTSTATUS smbcli_rap_netprintjobgetinfo(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintJobGetInfo, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1319,14 +1303,13 @@ NTSTATUS smbcli_rap_netprintjobgetinfo(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintjobsetinfo(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintJobSetInfo *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintJobSetInfo))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintJobSetInfo))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1365,7 +1348,7 @@ NTSTATUS smbcli_rap_netprintjobsetinfo(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintJobSetInfo, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1434,7 +1417,6 @@ static NTSTATUS rap_pull_rap_PrintDest3(TALLOC_CTX *mem_ctx, struct ndr_pull *nd
}
NTSTATUS smbcli_rap_netprintdestenum(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintDestEnum *r)
{
@@ -1442,7 +1424,7 @@ NTSTATUS smbcli_rap_netprintdestenum(struct smbcli_tree *tree,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
int i;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintDestEnum))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintDestEnum))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1472,7 +1454,7 @@ NTSTATUS smbcli_rap_netprintdestenum(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintDestEnum, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1526,14 +1508,13 @@ NTSTATUS smbcli_rap_netprintdestenum(struct smbcli_tree *tree,
}
NTSTATUS smbcli_rap_netprintdestgetinfo(struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
TALLOC_CTX *mem_ctx,
struct rap_NetPrintDestGetInfo *r)
{
struct rap_call *call;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- if (!(call = new_rap_cli_call(mem_ctx, iconv_convenience, RAP_WPrintDestGetInfo))) {
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WPrintDestGetInfo))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1564,7 +1545,7 @@ NTSTATUS smbcli_rap_netprintdestgetinfo(struct smbcli_tree *tree,
NDR_PRINT_IN_DEBUG(rap_NetPrintDestGetInfo, r);
}
- result = rap_cli_do_call(tree, iconv_convenience, call);
+ result = rap_cli_do_call(tree, call);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -1718,14 +1699,14 @@ static bool test_netservergetinfo(struct torture_context *tctx,
r.in.level = 0;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netservergetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netservergetinfo(cli->tree, tctx, &r),
"rap_netservergetinfo level 0 failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"rap_netservergetinfo level 0 failed");
r.in.level = 1;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netservergetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netservergetinfo(cli->tree, tctx, &r),
"rap_netservergetinfo level 1 failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"rap_netservergetinfo level 1 failed");
@@ -1738,10 +1719,10 @@ bool torture_rap_scan(struct torture_context *torture, struct smbcli_state *cli)
int callno;
for (callno = 0; callno < 0xffff; callno++) {
- struct rap_call *call = new_rap_cli_call(torture, lp_iconv_convenience(torture->lp_ctx), callno);
+ struct rap_call *call = new_rap_cli_call(torture, callno);
NTSTATUS result;
- result = rap_cli_do_call(cli->tree, lp_iconv_convenience(torture->lp_ctx), call);
+ result = rap_cli_do_call(cli->tree, call);
if (!NT_STATUS_EQUAL(result, NT_STATUS_INVALID_PARAMETER))
continue;
diff --git a/source4/torture/rap/rpc.c b/source4/torture/rap/rpc.c
index 4528240310..6335a54b35 100644
--- a/source4/torture/rap/rpc.c
+++ b/source4/torture/rap/rpc.c
@@ -58,7 +58,7 @@ static bool test_rpc_netservergetinfo(struct torture_context *tctx,
r.in.level = 0;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netservergetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netservergetinfo(cli->tree, tctx, &r),
"rap_netservergetinfo level 0 failed");
torture_assert_int_equal(tctx, r.out.status, 0,
"rap_netservergetinfo level 0 failed");
@@ -70,7 +70,7 @@ static bool test_rpc_netservergetinfo(struct torture_context *tctx,
r.in.level = 1;
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netservergetinfo(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netservergetinfo(cli->tree, tctx, &r),
"rap_netservergetinfo level 1 failed");
torture_assert_int_equal(tctx, r.out.status, 0,
"rap_netservergetinfo level 1 failed");
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 5ae396412e..2a1d8e5ace 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -188,7 +188,6 @@ static bool open_connection_no_level2_oplocks(struct torture_context *tctx,
NULL, lp_socket_options(tctx->lp_ctx), cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(tctx, "Failed to open connection - %s\n",
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index a854ac8857..12897ef499 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -877,8 +877,7 @@ bool torture_raw_qfileinfo_pipe(struct torture_context *torture,
struct smbcli_tree *ipc_tree;
NTSTATUS status;
- if (!(p = dcerpc_pipe_init(torture, cli->tree->session->transport->socket->event.ctx,
- lp_iconv_convenience(torture->lp_ctx)))) {
+ if (!(p = dcerpc_pipe_init(torture, cli->tree->session->transport->socket->event.ctx))) {
return false;
}
diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c
index 06cb7650c1..66fc3c01d6 100644
--- a/source4/torture/raw/tconrate.c
+++ b/source4/torture/raw/tconrate.c
@@ -102,7 +102,6 @@ static int fork_tcon_client(struct torture_context *tctx,
NULL, lp_socket_options(tctx->lp_ctx), cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index 77bb761e0c..3bf7dab764 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -81,7 +81,7 @@ static void fill_blob_handle(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
return;
}
- ndr_push_struct_blob(&b2, mem_ctx, NULL, handle, (ndr_push_flags_fn_t)ndr_push_policy_handle);
+ ndr_push_struct_blob(&b2, mem_ctx, handle, (ndr_push_flags_fn_t)ndr_push_policy_handle);
memcpy(blob->data, b2.data, 20);
}
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 2e5edfdb88..d6ed191284 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -361,7 +361,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
search.in.acct_control = -1;
search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
search.in.map_response = true;
- status = cldap_netlogon(cldap, lp_iconv_convenience(tctx->lp_ctx), ctx, &search);
+ status = cldap_netlogon(cldap, ctx, &search);
if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
ctx->site_name = talloc_asprintf(ctx, "%s", "Default-First-Site-Name");
@@ -407,7 +407,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
struct ldb_result *a_res;
struct ldb_result *c_res;
struct ldb_dn *schema_dn = ldb_get_schema_basedn(ldb);
- ldap_schema = dsdb_new_schema(ctx, lp_iconv_convenience(tctx->lp_ctx));
+ ldap_schema = dsdb_new_schema(ctx);
if (!ldap_schema) {
return false;
}
@@ -727,8 +727,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
if (pull_fn) {
/* Can't use '_all' because of PIDL bugs with relative pointers */
ndr_err = ndr_pull_struct_blob(&plain_data, ptr,
- lp_iconv_convenience(tctx->lp_ctx), ptr,
- pull_fn);
+ ptr, pull_fn);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
ndr_print_debug(print_fn, name, ptr);
} else {
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 1fcc0a6f3f..3b6c70e068 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -171,8 +171,7 @@ static bool test_ReadEventLog(struct torture_context *tctx,
blob = data_blob_const(r.out.data + pos, size);
dump_data(0, blob.data, blob.length);
- ndr_err = ndr_pull_struct_blob_all(&blob, tctx,
- lp_iconv_convenience(tctx->lp_ctx), &rec,
+ ndr_err = ndr_pull_struct_blob_all(&blob, tctx, &rec,
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOGRECORD);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c
index b02510930a..09519d03a5 100644
--- a/source4/torture/rpc/join.c
+++ b/source4/torture/rpc/join.c
@@ -41,7 +41,6 @@ bool torture_rpc_join(struct torture_context *torture)
machine_account,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
@@ -70,7 +69,6 @@ bool torture_rpc_join(struct torture_context *torture)
machine_account,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 3f91afedd6..c66725672e 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -2438,7 +2438,7 @@ static bool test_CreateTrustedDomainEx2(struct dcerpc_pipe *p,
auth_struct.outgoing.count = 0;
auth_struct.incoming.count = 0;
- ndr_err = ndr_push_struct_blob(&auth_blob, tctx, lp_iconv_convenience(tctx->lp_ctx), &auth_struct,
+ ndr_err = ndr_push_struct_blob(&auth_blob, tctx, &auth_struct,
(ndr_push_flags_fn_t)ndr_push_trustDomainPasswords);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
torture_comment(tctx, "ndr_push_struct_blob of trustDomainPasswords structure failed");
diff --git a/source4/torture/rpc/remote_pac.c b/source4/torture/rpc/remote_pac.c
index eab835aad1..9358d44ca8 100644
--- a/source4/torture/rpc/remote_pac.c
+++ b/source4/torture/rpc/remote_pac.c
@@ -139,7 +139,7 @@ static bool test_PACVerify(struct torture_context *tctx,
session_info->server_info->pac_kdc_sig.signature.data,
pac_wrapped_struct.SignatureLength);
- ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, lp_iconv_convenience(tctx->lp_ctx), &pac_wrapped_struct,
+ ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, &pac_wrapped_struct,
(ndr_push_flags_fn_t)ndr_push_PAC_Validate);
torture_assert(tctx, NDR_ERR_CODE_IS_SUCCESS(ndr_err), "ndr_push_struct_blob of PACValidate structure failed");
@@ -245,7 +245,7 @@ static bool test_PACVerify(struct torture_context *tctx,
session_info->server_info->pac_kdc_sig.signature.data,
pac_wrapped_struct.SignatureLength);
- ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, lp_iconv_convenience(tctx->lp_ctx), &pac_wrapped_struct,
+ ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, &pac_wrapped_struct,
(ndr_push_flags_fn_t)ndr_push_PAC_Validate);
torture_assert(tctx, NDR_ERR_CODE_IS_SUCCESS(ndr_err), "ndr_push_struct_blob of PACValidate structure failed");
@@ -293,7 +293,7 @@ static bool test_PACVerify(struct torture_context *tctx,
/* Break the signature length */
pac_wrapped_struct.SignatureLength++;
- ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, lp_iconv_convenience(tctx->lp_ctx), &pac_wrapped_struct,
+ ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, &pac_wrapped_struct,
(ndr_push_flags_fn_t)ndr_push_PAC_Validate);
torture_assert(tctx, NDR_ERR_CODE_IS_SUCCESS(ndr_err), "ndr_push_struct_blob of PACValidate structure failed");
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 96d2b5ca52..d09e80283a 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -84,7 +84,6 @@ bool torture_bind_authcontext(struct torture_context *torture)
cmdline_credentials,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(torture, "smbcli_full_connection failed: %s\n",
@@ -92,8 +91,7 @@ bool torture_bind_authcontext(struct torture_context *torture)
goto done;
}
- lsa_pipe = dcerpc_pipe_init(mem_ctx, cli->transport->socket->event.ctx,
- lp_iconv_convenience(torture->lp_ctx));
+ lsa_pipe = dcerpc_pipe_init(mem_ctx, cli->transport->socket->event.ctx);
if (lsa_pipe == NULL) {
torture_comment(torture, "dcerpc_pipe_init failed\n");
goto done;
@@ -224,8 +222,7 @@ static bool bindtest(struct torture_context *tctx,
}
lsa_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
if (lsa_pipe == NULL) {
torture_comment(tctx, "dcerpc_pipe_init failed\n");
goto done;
@@ -336,7 +333,6 @@ static bool torture_bind_samba3(struct torture_context *torture)
cmdline_credentials,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(torture, "smbcli_full_connection failed: %s\n",
@@ -397,8 +393,7 @@ static bool get_usr_handle(struct torture_context *tctx,
uint32_t user_rid,access_granted;
samr_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
torture_assert(tctx, samr_pipe, "dcerpc_pipe_init failed");
samr_handle = samr_pipe->binding_handle;
@@ -953,8 +948,7 @@ static bool auth2(struct torture_context *tctx,
}
net_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
if (net_pipe == NULL) {
torture_comment(tctx, "dcerpc_pipe_init failed\n");
goto done;
@@ -1070,8 +1064,7 @@ static bool schan(struct torture_context *tctx,
}
net_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
if (net_pipe == NULL) {
torture_comment(tctx, "dcerpc_pipe_init failed\n");
goto done;
@@ -1342,7 +1335,6 @@ static bool torture_netlogon_samba3(struct torture_context *torture)
anon_creds,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(torture, "smbcli_full_connection failed: %s\n",
@@ -1432,7 +1424,6 @@ static bool test_join3(struct torture_context *tctx,
"IPC$", NULL, lp_socket_options(tctx->lp_ctx),
smb_creds, lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
torture_assert_ntstatus_ok(tctx, status,
"smbcli_full_connection failed");
@@ -1541,8 +1532,7 @@ static NTSTATUS pipe_bind_smb(struct torture_context *tctx,
NTSTATUS status;
if (!(result = dcerpc_pipe_init(
- mem_ctx, tree->session->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx)))) {
+ mem_ctx, tree->session->transport->socket->event.ctx))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1809,10 +1799,8 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture)
mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
lp_smb_ports(torture->lp_ctx),
"IPC$", NULL, lp_socket_options(torture->lp_ctx), cmdline_credentials,
- lp_resolve_context(torture->lp_ctx),
- torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
- lp_gensec_settings(torture, torture->lp_ctx));
+ lp_resolve_context(torture->lp_ctx), torture->ev, &options,
+ &session_options, lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_warning(torture, "smbcli_full_connection failed: %s\n",
nt_errstr(status));
@@ -1839,7 +1827,6 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture)
lp_socket_options(torture->lp_ctx), anon_creds,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_warning(torture, "anon smbcli_full_connection failed: %s\n",
@@ -2154,8 +2141,7 @@ static bool torture_samba3_rpc_randomauth2(struct torture_context *torture)
}
if (!(net_pipe = dcerpc_pipe_init(
- mem_ctx, cli->transport->socket->event.ctx,
- lp_iconv_convenience(torture->lp_ctx)))) {
+ mem_ctx, cli->transport->socket->event.ctx))) {
torture_comment(torture, "dcerpc_pipe_init failed\n");
goto done;
}
@@ -2556,7 +2542,6 @@ static bool torture_samba3_rpc_lsa(struct torture_context *torture)
}
static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
char **name)
{
struct rap_WserverGetInfo r;
@@ -2566,7 +2551,7 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree,
r.in.level = 0;
r.in.bufsize = 0xffff;
- status = smbcli_rap_netservergetinfo(tree, iconv_convenience, mem_ctx, &r);
+ status = smbcli_rap_netservergetinfo(tree, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -2592,7 +2577,7 @@ static bool rap_get_servername(struct torture_context *tctx,
"IPC$ connection failed");
torture_assert_ntstatus_ok(tctx,
- get_servername(tctx, cli->tree, lp_iconv_convenience(tctx->lp_ctx), servername),
+ get_servername(tctx, cli->tree, servername),
"get_servername failed");
talloc_free(cli);
@@ -3241,7 +3226,7 @@ static bool torture_samba3_setconfig(struct torture_context *tctx,
"OpenKey failed");
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx), "REG_SZ", value, &type, &val),
+ reg_string_to_val(tctx, "REG_SZ", value, &type, &val),
"reg_string_to_val failed");
s.in.handle = &key_handle;
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index 2da0041c73..c59e447443 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -65,7 +65,6 @@ struct samlogon_state {
NTSTATUS expected_error;
bool old_password; /* Allow an old password to be accepted or rejected without error, as well as session key bugs */
DATA_BLOB chall;
- struct smb_iconv_convenience *iconv_convenience;
};
/*
@@ -1190,8 +1189,7 @@ static bool test_plaintext(struct samlogon_state *samlogon_state, enum ntlm_brea
password = strupper_talloc(samlogon_state->mem_ctx, samlogon_state->password);
- if (!convert_string_talloc_convenience(samlogon_state->mem_ctx,
- samlogon_state->iconv_convenience,
+ if (!convert_string_talloc(samlogon_state->mem_ctx,
CH_UNIX, CH_DOS,
password, strlen(password)+1,
(void**)&dospw, NULL, false)) {
@@ -1372,7 +1370,6 @@ static bool test_SamLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
samlogon_state.chall = data_blob_talloc(fn_ctx, NULL, 8);
samlogon_state.parameter_control = parameter_control;
samlogon_state.old_password = old_password;
- samlogon_state.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
generate_random_buffer(samlogon_state.chall.data, 8);
samlogon_state.r_flags.in.server_name = talloc_asprintf(fn_ctx, "\\\\%s", dcerpc_server_name(p));
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index e59bf3a3a8..6e0d9471d1 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -598,7 +598,7 @@ static bool samsync_handle_user(struct torture_context *tctx, TALLOC_CTX *mem_ct
enum ndr_err_code ndr_err;
data.data = user->user_private_info.SensitiveData;
data.length = user->user_private_info.DataLength;
- ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(tctx->lp_ctx), &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
+ ndr_err = ndr_pull_struct_blob(&data, mem_ctx, &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
if (keys.keys.keys2.lmpassword.length == 16) {
lm_hash_p = &lm_hash;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 61d1bccaa4..efe975c76e 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -174,9 +174,9 @@ static bool test_AddPrinterDriver_args_level_3(struct torture_context *tctx,
#define DO_ROUND(size, n) (((size)+((n)-1)) & ~((n)-1))
-#define CHECK_NEEDED_SIZE_ENUM_LEVEL(fn, info, level, count, ic, needed, align) do { \
+#define CHECK_NEEDED_SIZE_ENUM_LEVEL(fn, info, level, count, needed, align) do { \
if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
- uint32_t size = ndr_size_##fn##_info(tctx, ic, level, count, info);\
+ uint32_t size = ndr_size_##fn##_info(tctx, level, count, info);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" level %d (count: %d) got unexpected needed size: %d, we calculated: %d", level, count, needed, round_size);\
@@ -185,9 +185,9 @@ static bool test_AddPrinterDriver_args_level_3(struct torture_context *tctx,
}\
} while(0)
-#define CHECK_NEEDED_SIZE_ENUM(fn, info, count, ic, needed, align) do { \
+#define CHECK_NEEDED_SIZE_ENUM(fn, info, count, needed, align) do { \
if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
- uint32_t size = ndr_size_##fn##_info(tctx, ic, count, info);\
+ uint32_t size = ndr_size_##fn##_info(tctx, count, info);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" (count: %d) got unexpected needed size: %d, we calculated: %d", count, needed, round_size);\
@@ -196,9 +196,9 @@ static bool test_AddPrinterDriver_args_level_3(struct torture_context *tctx,
}\
} while(0)
-#define CHECK_NEEDED_SIZE_LEVEL(fn, info, level, ic, needed, align) do { \
+#define CHECK_NEEDED_SIZE_LEVEL(fn, info, level, needed, align) do { \
if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
- uint32_t size = ndr_size_##fn(info, level, ic, 0);\
+ uint32_t size = ndr_size_##fn(info, level, 0);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" level %d got unexpected needed size: %d, we calculated: %d", level, needed, round_size);\
@@ -323,7 +323,7 @@ static bool test_EnumPorts(struct torture_context *tctx,
torture_assert(tctx, info, "EnumPorts returned no info");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, r.in.level, count, needed, 4);
ctx->port_count[level] = count;
ctx->ports[level] = info;
@@ -414,7 +414,7 @@ static bool test_GetPrintProcessorDirectory(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetPrintProcessorDirectory failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrintProcessorDirectoryInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 2);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrintProcessorDirectoryInfo, r.out.info, r.in.level, needed, 2);
}
return true;
@@ -479,7 +479,7 @@ static bool test_GetPrinterDriverDirectory(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetPrinterDriverDirectory failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverDirectoryInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 2);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverDirectoryInfo, r.out.info, r.in.level, needed, 2);
}
return true;
@@ -533,7 +533,7 @@ static bool test_EnumPrinterDrivers_args(struct torture_context *tctx,
*info_p = info;
}
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinterDrivers, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinterDrivers, info, r.in.level, count, needed, 4);
return true;
@@ -755,7 +755,7 @@ static bool test_EnumMonitors(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumMonitors failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumMonitors, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumMonitors, info, r.in.level, count, needed, 4);
ctx->monitor_count[level] = count;
ctx->monitors[level] = info;
@@ -833,7 +833,7 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrintProcessors failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessors, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessors, info, r.in.level, count, needed, 4);
ctx->print_processor_count[level] = count;
ctx->print_processors[level] = info;
@@ -908,7 +908,7 @@ static bool test_EnumPrintProcDataTypes(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrintProcDataTypes failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes, info, r.in.level, count, needed, 4);
}
@@ -961,7 +961,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinters failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, needed, 4);
ctx->printer_count[level] = count;
ctx->printers[level] = info;
@@ -1080,7 +1080,7 @@ bool test_GetPrinter_level(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetPrinter failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterInfo, r.out.info, r.in.level, needed, 4);
if (info && r.out.info) {
*info = *r.out.info;
@@ -2370,7 +2370,7 @@ static bool test_GetForm_args(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetForm failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_FormInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_FormInfo, r.out.info, r.in.level, needed, 4);
if (info_p) {
*info_p = *r.out.info;
@@ -2437,7 +2437,7 @@ static bool test_EnumForms(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumForms failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumForms, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumForms, info, r.in.level, count, needed, 4);
if (info_p) {
*info_p = info;
@@ -2857,7 +2857,7 @@ static bool test_EnumPorts_old(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPorts failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, 2, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, 2, count, needed, 4);
return true;
}
@@ -2934,7 +2934,7 @@ static bool test_GetJob_args(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetJob failed");
torture_assert(tctx, r.out.info, "No job info returned");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_JobInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_JobInfo, r.out.info, r.in.level, needed, 4);
if (info_p) {
*info_p = *r.out.info;
@@ -3083,7 +3083,7 @@ static bool test_EnumJobs_args(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumJobs failed");
torture_assert(tctx, info, "No jobs returned");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumJobs, *r.out.info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumJobs, *r.out.info, r.in.level, count, needed, 4);
} else {
torture_assert_werr_ok(tctx, r.out.result, "EnumJobs failed");
@@ -3375,7 +3375,7 @@ static bool test_GetPrinterData(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
talloc_asprintf(tctx, "GetPrinterData(%s) failed", r.in.value_name));
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, lp_iconv_convenience(tctx->lp_ctx), needed, 1);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, needed, 1);
if (type_p) {
*type_p = type;
@@ -3437,7 +3437,7 @@ static bool test_GetPrinterDataEx(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
talloc_asprintf(tctx, "GetPrinterDataEx(%s - %s) failed", r.in.key_name, r.in.value_name));
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, lp_iconv_convenience(tctx->lp_ctx), needed, 1);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, needed, 1);
if (type_p) {
*type_p = type;
@@ -3471,7 +3471,7 @@ static bool test_get_environment(struct torture_context *tctx,
torture_assert_int_equal(tctx, type, REG_SZ, "unexpected type");
blob = data_blob_const(data, needed);
- *architecture = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);
+ *architecture = reg_val_data_string(tctx, REG_SZ, blob);
return true;
}
@@ -3515,7 +3515,7 @@ static bool test_GetPrinterData_list(struct torture_context *tctx,
if (strequal(list[i], "Architecture")) {
if (architecture) {
DATA_BLOB blob = data_blob_const(data, needed);
- *architecture = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);
+ *architecture = reg_val_data_string(tctx, REG_SZ, blob);
}
}
}
@@ -3656,7 +3656,7 @@ static bool test_EnumPrinterDataEx(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinterDataEx failed");
- CHECK_NEEDED_SIZE_ENUM(spoolss_EnumPrinterDataEx, info, count, lp_iconv_convenience(tctx->lp_ctx), needed, 1);
+ CHECK_NEEDED_SIZE_ENUM(spoolss_EnumPrinterDataEx, info, count, needed, 1);
if (count_p) {
*count_p = count;
@@ -3698,7 +3698,7 @@ static bool test_EnumPrinterData_consistency(struct torture_context *tctx,
torture_comment(tctx, "Testing EnumPrinterData vs EnumPrinterDataEx consistency\n");
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", "torture_data1", &type, &blob), "");
torture_assert(tctx,
@@ -4093,7 +4093,7 @@ static bool test_winreg_symbolic_link(struct torture_context *tctx,
torture_assert_int_equal(tctx, w_type, REG_LINK, "unexpected type");
blob = data_blob(w_data, w_size);
- str = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);
+ str = reg_val_data_string(tctx, REG_SZ, blob);
torture_assert_str_equal(tctx, str, symlink_destination, "unexpected symlink target string");
@@ -4162,7 +4162,7 @@ do {\
"failed to query winreg");\
torture_assert_int_equal(tctx, w_type, REG_SZ, "unexpected type");\
blob = data_blob(w_data, w_size);\
- str = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);\
+ str = reg_val_data_string(tctx, REG_SZ, blob);\
if (w_size == 2 && iname == NULL) {\
/*torture_comment(tctx, "%s: \"\", %s: (null)\n", #wname, #iname);\ */\
} else {\
@@ -4205,7 +4205,7 @@ do {\
"failed to query winreg");\
torture_assert_int_equal(tctx, w_type, REG_BINARY, "unexpected type");\
blob = data_blob(w_data, w_size);\
- ndr_err = ndr_pull_struct_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx), &dm,\
+ ndr_err = ndr_pull_struct_blob(&blob, tctx, &dm,\
(ndr_pull_flags_fn_t)ndr_pull_spoolss_DeviceMode);\
torture_assert_ndr_success(tctx, ndr_err, "failed to unmarshall dm");\
torture_assert(tctx, test_devicemode_equal(tctx, &dm, iname),\
@@ -4227,7 +4227,7 @@ do {\
"failed to query winreg");\
torture_assert_int_equal(tctx, w_type, REG_BINARY, "unexpected type");\
blob = data_blob(w_data, w_size);\
- ndr_err = ndr_pull_struct_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx), &sd,\
+ ndr_err = ndr_pull_struct_blob(&blob, tctx, &sd,\
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);\
torture_assert_ndr_success(tctx, ndr_err, "failed to unmarshall sd");\
torture_assert(tctx, test_security_descriptor_equal(tctx, &sd, iname),\
@@ -4250,7 +4250,7 @@ do {\
torture_assert_int_equal(tctx, w_type, REG_MULTI_SZ, "unexpected type");\
blob = data_blob(w_data, w_size);\
torture_assert(tctx, \
- pull_reg_multi_sz(tctx, lp_iconv_convenience(tctx->lp_ctx), &blob, &array),\
+ pull_reg_multi_sz(tctx, &blob, &array),\
"failed to pull multi sz");\
for (i=0; array[i] != NULL; i++) {\
torture_assert_str_equal(tctx, array[i], iname[i],\
@@ -4591,7 +4591,7 @@ static bool test_SetPrinterData_matrix(struct torture_context *tctx,
uint32_t needed;
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", "dog", &type, &blob), "");
torture_assert(tctx,
@@ -4748,14 +4748,14 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx,
break;
case REG_SZ:
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", string, &type, &data), "");
offered = data.length;
/*strlen_m_term(data.string)*2;*/
break;
case REG_MULTI_SZ:
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", string, &type, &data), "");
torture_assert(tctx, data_blob_realloc(tctx, &data, data.length + 2), "");
memset(&data.data[data.length - 2], '\0', 2);
@@ -5004,7 +5004,7 @@ do {\
torture_assert_int_equal(tctx, type, REG_SZ, "unexpected type");\
blob = data_blob_const(data, needed);\
torture_assert(tctx,\
- pull_reg_sz(tctx, lp_iconv_convenience(tctx->lp_ctx), &blob, &str),\
+ pull_reg_sz(tctx, &blob, &str),\
"failed to pull REG_SZ");\
torture_assert_str_equal(tctx, str, iname, "unexpected result");\
} while(0);
@@ -5027,7 +5027,7 @@ do {\
torture_assert_int_equal(tctx, type, REG_SZ, "unexpected type");\
blob = data_blob_const(data, needed);\
torture_assert(tctx,\
- pull_reg_sz(tctx, lp_iconv_convenience(tctx->lp_ctx), &blob, &str),\
+ pull_reg_sz(tctx, &blob, &str),\
"failed to pull REG_SZ");\
torture_assert_str_equal(tctx, str, val, "unexpected result");\
} while(0);
@@ -5675,7 +5675,7 @@ static bool test_EnumPrinters_old(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinters failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, needed, 4);
if (!info) {
torture_comment(tctx, "No printers returned\n");
@@ -5738,7 +5738,7 @@ static bool test_GetPrinterDriver(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
"failed to call GetPrinterDriver");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, needed, 4);
return true;
}
@@ -5806,7 +5806,7 @@ static bool test_GetPrinterDriver2_level(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
"failed to call GetPrinterDriver2");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, needed, 4);
if (info_p) {
*info_p = *r.out.info;
@@ -7658,7 +7658,6 @@ static bool connect_printer_driver_share(struct torture_context *tctx,
tctx->ev,
&smb_options,
&smb_session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx)),
"failed to open driver share");
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 47efb77bfb..8f9ec1aed8 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -438,7 +438,7 @@ static bool test_EnumServicesStatus(struct torture_context *tctx, struct dcerpc_
blob.length = r.in.offered;
blob.data = talloc_steal(tctx, r.out.service);
- ndr = ndr_pull_init_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx));
+ ndr = ndr_pull_init_blob(&blob, tctx);
service = talloc_array(tctx, struct ENUM_SERVICE_STATUSW, services_returned);
if (!service) {
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 3da8c9125a..216a30c7a8 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -193,7 +193,7 @@ static bool test_CreateKey_sd(struct dcerpc_binding_handle *b,
NULL);
torture_assert_ndr_success(tctx,
- ndr_push_struct_blob(&sdblob, tctx, NULL, sd,
+ ndr_push_struct_blob(&sdblob, tctx, sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor),
"Failed to push security_descriptor ?!\n");
@@ -260,7 +260,7 @@ static bool _test_GetKeySecurity(struct dcerpc_pipe *p,
sd = talloc_zero(tctx, struct security_descriptor);
torture_assert_ndr_success(tctx,
- ndr_pull_struct_blob(&sdblob, tctx, NULL, sd,
+ ndr_pull_struct_blob(&sdblob, tctx, sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor),
"pull_security_descriptor failed");
@@ -305,7 +305,7 @@ static bool _test_SetKeySecurity(struct dcerpc_pipe *p,
}
torture_assert_ndr_success(tctx,
- ndr_push_struct_blob(&sdblob, tctx, NULL, sd,
+ ndr_push_struct_blob(&sdblob, tctx, sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor),
"push_security_descriptor failed");
diff --git a/source4/torture/unix/unix_info2.c b/source4/torture/unix/unix_info2.c
index 2068d5d97c..32cc9ac487 100644
--- a/source4/torture/unix/unix_info2.c
+++ b/source4/torture/unix/unix_info2.c
@@ -62,7 +62,6 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx)
cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c
index f07c619b30..c1849962a3 100644
--- a/source4/torture/unix/whoami.c
+++ b/source4/torture/unix/whoami.c
@@ -85,7 +85,6 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx,
share, NULL, lp_socket_options(tctx->lp_ctx),
creds, lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index 216927ce70..708055096b 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -515,7 +515,6 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
cmdline_credentials,
lp_resolve_context(tctx->lp_ctx),
ev, &options, &session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open connection - %s\n", nt_errstr(status));
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index e3a43c7727..c5d37e82c9 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -489,8 +489,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
const char *winbind_method[] = { "winbind", NULL };
struct auth_context *auth_context;
- msg = messaging_client_init(state, lp_messaging_path(state, lp_ctx),
- lp_iconv_convenience(lp_ctx), ev);
+ msg = messaging_client_init(state, lp_messaging_path(state, lp_ctx), ev);
if (!msg) {
talloc_free(mem_ctx);
exit(1);
diff --git a/source4/winbind/idmap.c b/source4/winbind/idmap.c
index fc7b8d447d..4a99ac58c5 100644
--- a/source4/winbind/idmap.c
+++ b/source4/winbind/idmap.c
@@ -97,9 +97,7 @@ static int idmap_msg_add_dom_sid(struct idmap_context *idmap_ctx,
struct ldb_val val;
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(&val, mem_ctx,
- lp_iconv_convenience(idmap_ctx->lp_ctx),
- sid,
+ ndr_err = ndr_push_struct_blob(&val, mem_ctx, sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -134,7 +132,7 @@ static struct dom_sid *idmap_msg_get_dom_sid(TALLOC_CTX *mem_ctx,
return NULL;
}
- ndr_err = ndr_pull_struct_blob(val, sid, NULL, sid,
+ ndr_err = ndr_pull_struct_blob(val, sid, sid,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(sid);
diff --git a/source4/winbind/wb_dom_info.c b/source4/winbind/wb_dom_info.c
index bce8bfbe55..b6ec7dd67f 100644
--- a/source4/winbind/wb_dom_info.c
+++ b/source4/winbind/wb_dom_info.c
@@ -68,7 +68,6 @@ struct composite_context *wb_get_dom_info_send(TALLOC_CTX *mem_ctx,
lp_nbt_port(service->task->lp_ctx),
domain_name, NBT_NAME_LOGON,
dom_sid,
- lp_iconv_convenience(service->task->lp_ctx),
lp_resolve_context(service->task->lp_ctx),
service->task->event_ctx,
service->task->msg_ctx);
diff --git a/source4/winbind/wb_pam_auth.c b/source4/winbind/wb_pam_auth.c
index 7b1aa98266..9346cd5c38 100644
--- a/source4/winbind/wb_pam_auth.c
+++ b/source4/winbind/wb_pam_auth.c
@@ -141,8 +141,7 @@ static void pam_auth_crap_recv_logon(struct composite_context *ctx)
if (!composite_is_ok(state->ctx)) return;
ndr_err = ndr_push_struct_blob(
- &tmp_blob, state, lp_iconv_convenience(state->lp_ctx),
- state->req->out.validation.sam3,
+ &tmp_blob, state, state->req->out.validation.sam3,
(ndr_push_flags_fn_t)ndr_push_netr_SamInfo3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
state->ctx->status = ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/winbind/wb_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c
index f0f7aa8526..fcb587a007 100644
--- a/source4/winbind/wb_samba3_cmd.c
+++ b/source4/winbind/wb_samba3_cmd.c
@@ -54,7 +54,6 @@ static NTSTATUS wb_samba3_append_info3_as_txt(TALLOC_CTX *mem_ctx,
ndr_err = ndr_pull_struct_blob(&info3b,
mem_ctx,
- lp_iconv_convenience(s3call->wbconn->lp_ctx),
info3,
(ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/wrepl_server/wrepl_in_call.c b/source4/wrepl_server/wrepl_in_call.c
index 91a39400de..aee6e4920f 100644
--- a/source4/wrepl_server/wrepl_in_call.c
+++ b/source4/wrepl_server/wrepl_in_call.c
@@ -359,8 +359,8 @@ static NTSTATUS wreplsrv_in_update(struct wreplsrv_in_call *call)
wrepl_out->assoc_ctx.our_ctx = wrepl_in->assoc_ctx.our_ctx;
wrepl_out->assoc_ctx.peer_ctx = wrepl_in->assoc_ctx.peer_ctx;
wrepl_out->sock = wrepl_socket_init(wrepl_out,
- wrepl_in->conn->event.ctx,
- lp_iconv_convenience(wrepl_in->service->task->lp_ctx));
+ wrepl_in->conn->event.ctx);
+
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(wrepl_out->sock, update_state);
TALLOC_FREE(wrepl_in->send_queue);
diff --git a/source4/wrepl_server/wrepl_in_connection.c b/source4/wrepl_server/wrepl_in_connection.c
index 09fb3255fb..364ebc7fa9 100644
--- a/source4/wrepl_server/wrepl_in_connection.c
+++ b/source4/wrepl_server/wrepl_in_connection.c
@@ -52,7 +52,6 @@ static NTSTATUS wreplsrv_process(struct wreplsrv_in_connection *wrepl_conn,
struct wreplsrv_in_call *call = *_call;
ndr_err = ndr_pull_struct_blob(&call->in, call,
- lp_iconv_convenience(wrepl_conn->service->task->lp_ctx),
&call->req_packet,
(ndr_pull_flags_fn_t)ndr_pull_wrepl_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -78,7 +77,6 @@ static NTSTATUS wreplsrv_process(struct wreplsrv_in_connection *wrepl_conn,
/* and now encode the reply */
packet_out_wrap.packet = call->rep_packet;
ndr_err = ndr_push_struct_blob(&call->out, call,
- lp_iconv_convenience(wrepl_conn->service->task->lp_ctx),
&packet_out_wrap,
(ndr_push_flags_fn_t) ndr_push_wrepl_wrap);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source4/wrepl_server/wrepl_out_helpers.c b/source4/wrepl_server/wrepl_out_helpers.c
index 5c15ac8d87..dcbc888a8d 100644
--- a/source4/wrepl_server/wrepl_out_helpers.c
+++ b/source4/wrepl_server/wrepl_out_helpers.c
@@ -187,7 +187,7 @@ static struct composite_context *wreplsrv_out_connect_send(struct wreplsrv_partn
wreplconn->service = service;
wreplconn->partner = partner;
- wreplconn->sock = wrepl_socket_init(wreplconn, service->task->event_ctx, lp_iconv_convenience(service->task->lp_ctx));
+ wreplconn->sock = wrepl_socket_init(wreplconn, service->task->event_ctx);
if (!wreplconn->sock) goto failed;
state->stage = WREPLSRV_OUT_CONNECT_STAGE_WAIT_SOCKET;