Finish removal of iconv_convenience in public API's.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 9 May 2010 15:20:01 +0000 (17:20 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 18 May 2010 09:45:30 +0000 (11:45 +0200)
216 files changed:
lib/tdr/tdr.c
lib/tdr/tdr.h
lib/tdr/testsuite.c
libcli/auth/ntlmssp_ndr.c
libcli/auth/ntlmssp_ndr.h
libcli/auth/schannel_state.h
libcli/auth/schannel_state_tdb.c
libcli/cldap/cldap.c
libcli/cldap/cldap.h
libcli/ldap/ldap_ndr.c
libcli/named_pipe_auth/npa_tstream.c
libcli/named_pipe_auth/npa_tstream.h
libcli/nbt/libnbt.h
libcli/nbt/nbtname.c
libcli/nbt/nbtsocket.c
libcli/nbt/pynbt.c
libcli/nbt/tools/nmblookup.c
libcli/ndr_netlogon.c
libcli/netlogon.c
libcli/netlogon_proto.h
libcli/registry/util_reg.c
libcli/samsync/decrypt.c
libcli/security/secace.c
librpc/idl/drsblobs.idl
librpc/idl/drsuapi.idl
librpc/idl/epmapper.idl
librpc/idl/frsrpc.idl
librpc/idl/named_pipe_auth.idl
librpc/idl/nbt.idl
librpc/idl/netlogon.idl
librpc/idl/ntlmssp.idl
librpc/idl/security.idl
librpc/idl/spoolss.idl
librpc/ndr/libndr.h
librpc/ndr/ndr.c
librpc/ndr/ndr_compression.c
librpc/ndr/ndr_drsuapi.c
librpc/ndr/ndr_drsuapi.h
librpc/ndr/ndr_frsrpc.c
librpc/ndr/ndr_frsrpc.h
librpc/ndr/ndr_krb5pac.c
librpc/ndr/ndr_ntlmssp.c
librpc/ndr/ndr_ntlmssp.h
librpc/ndr/ndr_schannel.c
librpc/ndr/ndr_sec_helper.c
librpc/ndr/ndr_spoolss_buf.c
librpc/ndr/ndr_spoolss_buf.h
librpc/ndr/uuid.c
librpc/rpc/binding.c
librpc/tools/ndrdump.c
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
pidl/lib/Parse/Pidl/Samba4/Python.pm
pidl/tests/ndr_string.pl
source3/include/includes.h
source3/include/proto.h
source3/librpc/ndr/util.c
source4/auth/gensec/gensec.h
source4/auth/gensec/gensec_gssapi.c
source4/auth/gensec/gensec_krb5.c
source4/auth/gensec/pygensec.c
source4/auth/gensec/schannel.c
source4/auth/kerberos/kerberos.h
source4/auth/kerberos/kerberos_pac.c
source4/auth/ntlm/auth_winbind.c
source4/cldap_server/netlogon.c
source4/client/cifsdd.c
source4/client/cifsdd.h
source4/client/cifsddio.c
source4/client/client.c
source4/dsdb/common/dsdb_access.c
source4/dsdb/common/util.c
source4/dsdb/kcc/kcc_drs_replica_info.c
source4/dsdb/repl/drepl_partitions.c
source4/dsdb/samdb/ldb_modules/descriptor.c
source4/dsdb/samdb/ldb_modules/extended_dn_out.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/ridalloc.c
source4/dsdb/samdb/ldb_modules/samba3sam.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/ldb_modules/schema_load.c
source4/dsdb/schema/schema_info_attr.c
source4/dsdb/schema/schema_init.c
source4/dsdb/schema/schema_set.c
source4/dsdb/schema/schema_syntax.c
source4/kdc/db-glue.c
source4/kdc/kdc.c
source4/kdc/pac-glue.c
source4/lib/ldb-samba/ldif_handlers.c
source4/lib/messaging/irpc.h
source4/lib/messaging/messaging.c
source4/lib/messaging/pymessaging.c
source4/lib/messaging/tests/irpc.c
source4/lib/messaging/tests/messaging.c
source4/lib/registry/hive.c
source4/lib/registry/patchfile.c
source4/lib/registry/patchfile_dotreg.c
source4/lib/registry/patchfile_preg.c
source4/lib/registry/pyregistry.c
source4/lib/registry/regf.c
source4/lib/registry/registry.h
source4/lib/registry/tests/diff.c
source4/lib/registry/tests/generic.c
source4/lib/registry/tests/hive.c
source4/lib/registry/tools/regdiff.c
source4/lib/registry/tools/regpatch.c
source4/lib/registry/tools/regshell.c
source4/lib/registry/tools/regtree.c
source4/lib/registry/util.c
source4/libcli/cliconnect.c
source4/libcli/dgram/browse.c
source4/libcli/dgram/dgramsocket.c
source4/libcli/dgram/libdgram.h
source4/libcli/dgram/netlogon.c
source4/libcli/finddcs.c
source4/libcli/raw/clitransport.c
source4/libcli/raw/clitree.c
source4/libcli/raw/rawacl.c
source4/libcli/raw/rawfile.c
source4/libcli/raw/rawfileinfo.c
source4/libcli/raw/rawsetfileinfo.c
source4/libcli/resolve/nbtlist.c
source4/libcli/smb2/create.c
source4/libcli/smb_composite/connect.c
source4/libcli/util/clilsa.c
source4/libcli/wrepl/winsrepl.c
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_lookup.c
source4/libnet/libnet_site.c
source4/libnet/libnet_unbecome_dc.c
source4/libnet/libnet_vampire.c
source4/librpc/idl/winsrepl.idl
source4/librpc/ndr/ndr_string.c
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc.h
source4/librpc/rpc/dcerpc_connect.c
source4/librpc/rpc/dcerpc_secondary.c
source4/librpc/rpc/dcerpc_util.c
source4/nbt_server/dgram/request.c
source4/nbt_server/interfaces.c
source4/ntp_signd/ntp_signd.c
source4/ntptr/simple_ldb/ntptr_simple_ldb.c
source4/ntvfs/common/notify.c
source4/ntvfs/common/opendb_tdb.c
source4/ntvfs/ipc/ipc_rap.c
source4/ntvfs/ipc/vfs_ipc.c
source4/ntvfs/posix/pvfs_rename.c
source4/ntvfs/posix/pvfs_resolve.c
source4/ntvfs/posix/pvfs_shortname.c
source4/ntvfs/posix/pvfs_xattr.c
source4/param/loadparm.c
source4/param/secrets.c
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcesrv_auth.c
source4/rpc_server/drsuapi/getncchanges.c
source4/rpc_server/lsa/dcesrv_lsa.c
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/rpc_server/service_rpc.c
source4/rpc_server/spoolss/dcesrv_spoolss.c
source4/rpc_server/winreg/rpc_winreg.c
source4/scripting/python/modules.h
source4/smb_server/smb/nttrans.c
source4/smb_server/smb2/fileinfo.c
source4/smb_server/smb2/fileio.c
source4/smbd/server.c
source4/smbd/service_named_pipe.c
source4/smbd/service_stream.c
source4/smbd/service_task.c
source4/torture/auth/pac.c
source4/torture/basic/base.c
source4/torture/basic/scanner.c
source4/torture/basic/utable.c
source4/torture/drs/unit/prefixmap_tests.c
source4/torture/drs/unit/schemainfo_tests.c
source4/torture/gentest.c
source4/torture/ldap/cldap.c
source4/torture/ldap/cldapbench.c
source4/torture/ldap/uptodatevector.c
source4/torture/libnet/libnet_BecomeDC.c
source4/torture/locktest.c
source4/torture/masktest.c
source4/torture/nbt/dgram.c
source4/torture/nbt/nbt.c
source4/torture/nbt/winsbench.c
source4/torture/nbt/winsreplication.c
source4/torture/ndr/ndr.c
source4/torture/ntp/ntp_signd.c
source4/torture/rap/printing.c
source4/torture/rap/rap.c
source4/torture/rap/rpc.c
source4/torture/raw/oplock.c
source4/torture/raw/qfileinfo.c
source4/torture/raw/tconrate.c
source4/torture/rpc/autoidl.c
source4/torture/rpc/dssync.c
source4/torture/rpc/eventlog.c
source4/torture/rpc/join.c
source4/torture/rpc/lsa.c
source4/torture/rpc/remote_pac.c
source4/torture/rpc/samba3rpc.c
source4/torture/rpc/samlogon.c
source4/torture/rpc/samsync.c
source4/torture/rpc/spoolss.c
source4/torture/rpc/svcctl.c
source4/torture/rpc/winreg.c
source4/torture/unix/unix_info2.c
source4/torture/unix/whoami.c
source4/torture/util_smb.c
source4/utils/ntlm_auth.c
source4/winbind/idmap.c
source4/winbind/wb_dom_info.c
source4/winbind/wb_pam_auth.c
source4/winbind/wb_samba3_cmd.c
source4/wrepl_server/wrepl_in_call.c
source4/wrepl_server/wrepl_in_connection.c
source4/wrepl_server/wrepl_out_helpers.c

index ce67003f8bfdfae5a618ad20ea5fc17b858c5c13..95871047b7f3a16793fb805c166211b0e8c605e4 100644 (file)
@@ -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;
index 84f3e50c2ba89691aa38ff6f1ef46736facd0643..c3ffd2f6ffdecc274e511587fd5239e946d661fc 100644 (file)
@@ -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 {
index ca76b5291e727493897928689530eda8e7844617..1db7a1d5fe9afbe3f54d072f603d09ffcc5fb6aa 100644 (file)
@@ -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");
index 53a2378e205cd75759d6099e875bbd89086891d9..8f15044e1a32f2aaeaa6e4cfb61cbd497970d4d9 100644 (file)
 #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);
 }
index 52990b2a56e8ad607f197324d644b58bcd4744b3..e61923170ec083819b2abfd5fe6c6d68c77fd1e1 100644 (file)
 
 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);
index d378a39d8f2881f9997418f095fa6e15780cc66e..017fdbe28d9af34e251551055f56f1c09f823f01 100644 (file)
 #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,
index 3f6618c744c1d01180a467293ab9354d01bc19b6..9e767810a18de7102b46798bd706b1b56e622e71 100644 (file)
@@ -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;
index 191d0eeee49c1d6e4873dcb1ca20cbcecc3d1228..896319e75cdba6373a7b4d06cadaaa2351242afc 100644 (file)
@@ -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);
index 111fa2cfc4514e072a0dd3ead3bcc7f19616000d..d05e5b993687b5de5dfb246340d0a674be0ef34a 100644 (file)
@@ -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,
index c176d0e1e0131e0544992a0cdc3616274bd46d93..3b40fbba25dc826b569120e74532a9db51830654 100644 (file)
@@ -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)) {
index b41fa3eb6d5d5566b13c4024d2fec4ab33ac5203..20228a2df27e8093967db25d90ff4d58350b8c84 100644 (file)
@@ -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)) {
index bff010f09412f2f1473ed002ad88c0bf38d91e61..7a19e10410813e6f57cc47adf30992d579af4448 100644 (file)
@@ -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,
index e150b35566c59f77def41c8040f57e9c9e0f1a59..616554832049c1e4b7dcfb0a8e9c930efd1e78d5 100644 (file)
@@ -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);
index 385905abf19bbeb3a6c77e0cfa8f00ebcbe57634..3f0a1228e7a8f8a82cf5f9c3beaea19ddc7be164 100644 (file)
@@ -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);
index d9bc72e49982874d4d323ec359d2cc5478d54b63..2b792c5e2d7eb2481fb154e667b3df48f62f4da4 100644 (file)
@@ -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)) {
index 425ad13c6dd87cdce31ad844a8834bf94069598f..dbb4d18237e81a727729c0875bc3aa3a7b649d08 100644 (file)
@@ -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;
 
index 96023f64c390379526fd7f4441dab2a2228c0e94..b756c1e30c5dadff71d6c24ac41faa8aba21359d 100644 (file)
@@ -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, 
index 1c6b2bccb6aa332f03c0777ebeb6cf17dbba971e..d15154d2c98ee82245435291a767fe91b13b36e0 100644 (file)
@@ -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) {
index 9ad941cfb6c535c4e8b080574274fbda7cf3c943..e32842ec0a52469ee29b706c9b803d6e0edf6a22 100644 (file)
 #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;
index 905feed8761abc7411878336605408fd32b3dc84..53c7d004ee9f200335a927211b614c40adc021c9 100644 (file)
 /* 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)
index 6ab2be0a1148de7cf8e0f226fd3459d4c073c70b..3a1168f615175789604402ab9d99f94120ffbe30 100644 (file)
@@ -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;
index b3fab712bc6bf168cc4471601eef0dd130bd0624..117151e8876b9632544953b9d3a885e515bfb189 100644 (file)
@@ -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);
index 8a73a6ab94cea7109d26f4576c0954065598d452..2ee5bfaee50808ea779d689f51268230b900ffb6 100644 (file)
@@ -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;
index 89b5760823ddf35956548c8e066be3c39e8bb2b9..1b4649cff9fe9cb5cde7e7d9326addd320df793c 100644 (file)
@@ -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;
 
index 97ae9641f0e9ab0b4101686fe5f72af04b846f60..ef6ffef4b3132185db46b2b134470b2ea2a774a9 100644 (file)
@@ -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 */
index 3d9113892bf17c8f14f10944c95d0dcfca9f8076..25b9517a8eac0f30130442bdaf69681e7de87f1b 100644 (file)
@@ -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;
 
index 996c375aa87b50de3f469e3876ea483446761628..e85042c27c58193592f3e6e27a391cd0e5ae15bf 100644 (file)
@@ -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;
index 43db989327373755b4d93594e3264fd8adf36ef5..e2928515ba2f4de18029a364e1f2a8ec703666bb 100644 (file)
@@ -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;
index 6d9f9b555788d4cf8b9cb954e5132a05f8875fa7..897abb26e4ef0ab6e50bedf21769f33af9db99ae 100644 (file)
@@ -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 */
index d66b2194ca2989bfcf1d9f18e25eb1908d3031cf..4bebb833742d8ca0761b3ff1605b3bf61e25b762 100644 (file)
@@ -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
                );
index 8cabec33daffacb98121a54dd21db9dff45eecc1..1227952ff2d8974c4d91742e2323dac557983c2e 100644 (file)
@@ -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;
index 740a928d87fc8901de9028ce34ebe1160db9d350..fb1dc0dcc045f8c8c16b7a82b2997385655fea38 100644 (file)
@@ -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;
 
index c7df80d7ce9e27c4c1531ad082cb9f469776c186..028015b6967e90ed8951e7626eb649004c29ccb9 100644 (file)
@@ -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;
index 72e8d21ba40a40836ef4ff1eabcf431a4c275ed6..133a119069cb59eb006e1e09459cbc1fce4404f2 100644 (file)
@@ -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) \
index 90be787526f293456e1c36ebc36396a1d93b396f..1600d51c1c0791b07be13d536fbd493192e22eb5 100644 (file)
@@ -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;
 
index c73c3bb6faf7c8bd82e60d40fafc6694d3db3fb4..d291df5ad8c96aaf2f10ff82bf7f31ebce152d44 100644 (file)
@@ -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);
index e9888fdf858ead4b7577d76f7fde552f94ffb8ac..0cc3e5236c8093865a995393a2c464b90247e421 100644 (file)
@@ -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)
index 43c6c18bd70cf9ccf2e0c23df9cede7e155458dc..9d1d371b60de6deab96505b6df605451c0904156 100644 (file)
@@ -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 */
index e0c7f1cd757257d227c38af6ee8b4198d4d8c9a7..96d34687bc1f3bcf48858010b2792c0f3fc017d3 100644 (file)
@@ -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);
 }
index e8dc76959b950ccb79bbb02fcfdbcd6e1410fb7e..9e5ac92d6cbc389388b9bb6562f97cd7c63e0927 100644 (file)
@@ -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 */
index 34a2ef88a7d6727882fae1c1c413545eb56b8339..237c0b65d4558c7b0ee30b766278fd9cdf5dd206 100644 (file)
@@ -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) {
index 4808aa5f5f677cb2e5cf21bd6d44ebe7f6dda08e..02fc3c2cc7e51e887ec3aed868e74901348e180f 100644 (file)
@@ -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);
index b574f154956e650df68a602a5110775aa554df3a..e07ff15cf6f1a2beec402135588584fef809f899 100644 (file)
@@ -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);
index b61042921157263513b87362ab2b68b955ec9bfb..9bbc628a29436cc58a43f94e5d244dfac339353c 100644 (file)
@@ -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);
index abc805c8efc99e7bb197f7766ad3924a22ba41b1..af6ca0936f05ba78e7b6afe42e224817dd186ac4 100644 (file)
 /*
   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;
index e15591633dcb4b5b845bcb1f0dc0183d8e81b017..2fd9d95d2b99293326c3c2691098f84f1f31df21 100644 (file)
@@ -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) {\
        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) {\
 #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;\
 #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)
index 89dcb4617cbb38352aef56151a267c788753c6be..9db187dc7d9cace69f275a13da7019334eae069a 100644 (file)
 
 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);
index 1899afbbca616f8f81b5934a640f8a0de4b51028..5b6053167a80a55b3782389583690b854d3e6e39 100644 (file)
@@ -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);
index e3edc67882dab995d353f22f5a54e1826cbdcd69..5e9bef8e7c370d464aa75ff82f4342cc8415104a 100644 (file)
@@ -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;
 
index 9b4847e74a98b149f89b1fa291bde95af38b929f..6fc903fa323b043a69eece6bb625c7d210f4ffc6 100644 (file)
@@ -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);
index 4c23dfacd82d13401b0e32a1e57cd0a11d2d090a..83bca288edee8bc760cb82b5943cd48849031382 100644 (file)
@@ -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} = {
index 226db078d6c39f12d2ffc2612c68e28de9173227..390ee275103a773cd1a332e32e6e0e940b8f8183 100644 (file)
@@ -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);");
index e00dd01c8e26a63119828116f1fe453094855123..8e8b8ecbad6c46f4ff428549b67381f60f1dd307 100755 (executable)
@@ -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;
index 3e48d16805492ce392cc014241491cfc2afe0d70..132d37380f2d88b15deaedafdb04f15a261b5cdc 100644 (file)
@@ -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"
index 6099ecf0e980e741fe544a962e15c5a54d53034e..eb9c63c5ac4d7e6eb5824899cabf554305a6b1c9 100644 (file)
@@ -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  */
 
index 1318bd8e00f89e4ba4e6448633487b736c6ee2bc..5966ca8679c6ed853cf5ecebd0027f67e9c1d225 100644 (file)
@@ -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 };
index 45e24f194f5a988a3b4dbd14a9f58badb23f8b8c..886f8fb171e7f71693f875e4cb5727ab62542450 100644 (file)
@@ -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;
 };
 
index c6901a7b5eab8181a931d84db3ef68aa1382efcb..73c12a20ff660735a260e201247c319b4bbf5f85 100644 (file)
@@ -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);
index d051b7f2276e0a85f434dec43032bd1fc1ea9025..77b50cb41c7de9c618c5383e55da30b6be3ad185 100644 (file)
@@ -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,
index 2b4963c843157c46c7bd3893c2c7e6d88bcf2edc..3ae80ddaf32c09913c1306308c28d6579ecd7504 100644 (file)
@@ -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;
 }
 
index 7877ea461a86e8c6a818b2c59e5d2322b666854c..d4b29484f1c772da992876e2e72550d2cb15c505 100644 (file)
@@ -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);
index 1990343808e93786656752a216f7fe22389294d9..96c11a4ce1a36c6eda671bf072a6c2a4bface72c 100644 (file)
@@ -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,
index ecd35f3dfa8549bb3c4cbb4e3035d1c790f55b74..aca807e78d992e83646aaa8a85bb895f37efae42 100644 (file)
@@ -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);
index 173a8953906b8edc01b897cf55bbcaf55d17eb8d..7406a94275d4f20845b61817ba574d60ab97f328 100644 (file)
@@ -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);
 
index 414f08a6f64efa91de86b9ebdfe4678b0a416739..7667d9bf3e55eefe40c36968037c2e9f6386a352 100644 (file)
@@ -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;
        }
index 302d470afdb747b0e88430afb58481c6ca657a4f..b804a15d1cb5f61c3a5d2595b72794a9c22b3c06 100644 (file)
@@ -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);
        }
index e39c046fe8e1dbbd9fbc7c3e57f7f196d2022bbb..4e9cb9dd9a3bbe03886480ed2120f920f6f0f08c 100644 (file)
@@ -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);
index 47caf6b835abcd16f684c2e40a9ceee60b15c74e..0ceb69e3b15ed7a232b0f998aeec65e041e1673d 100644 (file)
@@ -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));
                }
 
index 55a2d0c0d02c262a9ffb3570f61f79d1d843112e..cf834b9e1fa6b5c74fe7cc819343d574df649a24 100644 (file)
@@ -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;
 
index 7857e1fa256d541dc931c7d4fde498687fc20cc4..ac0c73643f2018a677bbd9f97bf5b376444d6f2d 100644 (file)
@@ -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)) {
index df4e734252fdecc0b263368ea77f90189b807150..da4d0b39402519126273fb45768c5c6d5160c1c9 100644 (file)
@@ -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);
index 322ccc980c7787e5f80cfa6c73c74fd19c7790b4..170105642b24d916ce98c1f19b92fc2dc01eb755 100644 (file)
@@ -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",
index b17a17d5a333e9c605c3682188ebd49322ca5840..cb45b41248fbd0dd1cb1ce86db1aad4213ad0659 100644 (file)
@@ -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);
index 8fc5e3a47bb0dd0219c10901af1f97e2e02405c8..6c9baaa13a1d0a7c2cea9deb213e3a17bb4a7504 100644 (file)
@@ -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)) {
index 39af87091cccf165b10d4d3e8f7f8a28eabe9e50..12adf16181f711908002e78b8c3f94ba6b697684 100644 (file)
@@ -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)) {
index f9e7f52cd95b8015cecf0f184271f875eb6d9c30..de2c6da94c3a65b949921283b907032d80bbdf7a 100644 (file)
@@ -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,
index a6aeb5e58fa8825db3fa8848f026d4e7f31feaf0..72ffd0e21cbf6cd2f68b5c668fd4191027468464 100644 (file)
@@ -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)) {
index a64062fcdc965c53e2f85346cd0a836571be1689..05aee7763883875384dca4489ee750fef14f6869 100644 (file)
@@ -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"));
index 61013d133e8c386e71ac4caf951f6bf8035cdc0b..42245ce49112a9139f9d44f9bfbc92856899e1ab 100644 (file)
@@ -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;
index 4a50a3fa47cc27a12bd0c4862283005ef9c28876..4d1659df0b1f4823a72c41e1950af9f28468f6f4 100644 (file)
@@ -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;
index b4a68769e63fbf4a664b50e65f40dcce4e15696d..4df6f1e38a43d26446cf6bf4211e7a536e1879fe 100644 (file)
@@ -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, 
index ac22eb9b3f2905608662b53033e7d2b9f0cdd1e8..a9c5e932a1e800e3ca290f1da2a56816278fd5fc 100644 (file)
@@ -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);
index cdd37f094b88d88e5f251e9daa1343a45c987510..55e78ebf3af54286895b89b2070c852aab57fe53 100644 (file)
 #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;
        }
index fe6ef42e8c39a471c2422effbc57e59b02415ad5..07d75c44a85f30f2babd4adaa3e8654a7cb00e4a 100644 (file)
@@ -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");
index a0eed3d7c0d26295a8e35d8b3e25062ac9fd3efe..2e6f411a7aec1e320f9b01b431f9788a59f669ec 100644 (file)
@@ -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)) {
index 33c4c8cdf66fc511b7c9785e37ad9cd7508ad2b2..97820c0c32c6f48b2470a44bc6a269846ef637f3 100644 (file)
@@ -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;
index 984999b83c872a7d6581c0a02b0eac2ae515ba5a..b824bb86b089edddb3576ca0c12c66e2d56958bc 100644 (file)
@@ -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;
index 2a932fa832bb7011cfeff5e55cccb6098fe24e33..8c203e555d8aa3143f2a6f7c90baf5e6ecb441ad 100644 (file)
@@ -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;
index 9ebb4bb5c3d8c18dd3e4773ed846dec97605cfe7..5e21199488de7d65a92fc3ebc344af52bca1dd60 100644 (file)
@@ -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)) {
index c82ad398ff41225c62f40f826f12ba0a53d2f2a5..e7c0b874c1d47678dde19a53c44cb6a6b60569f7 100644 (file)
@@ -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);
index 3850bcbc4918cad462463c6bca82bc41c909bac8..19d6971088b4983b513e9c12b004cbe20ce03c64 100644 (file)
@@ -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);
index cea3accce055e1a3c455377b93181c94821cc61b..ddcf945400a6155ed0db3d2c893a8360d290045d 100644 (file)
@@ -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);
        }
 
index 3eb23e0f7d53c90681b4791736391fc3cceb466f..87a3c7a124cae4162be2f83ebd43ef7fef3b2c0d 100644 (file)
@@ -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");
 
index f61132caac07cb363181df1a1227bd5525c7da1f..96cb180ff7a01a5d7cc043af1c3635970aad3075 100644 (file)
@@ -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, 
index c9cb247071c21a544087b974a1b0e14026a7fc42..5763dff0d2d86735ac9789efb4102683fb8fb07d 100644 (file)
+++ b/