Merge branch 'master' of ssh://git.samba.org/data/git/samba
authorJelmer Vernooij <jelmer@samba.org>
Mon, 5 Jan 2009 17:01:04 +0000 (18:01 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 5 Jan 2009 17:01:04 +0000 (18:01 +0100)
67 files changed:
libcli/ndr_netlogon.c
librpc/gen_ndr/cli_netlogon.c
librpc/gen_ndr/cli_netlogon.h
librpc/gen_ndr/drsblobs.h
librpc/gen_ndr/drsuapi.h
librpc/gen_ndr/epmapper.h
librpc/gen_ndr/named_pipe_auth.h
librpc/gen_ndr/nbt.h
librpc/gen_ndr/ndr_drsblobs.c
librpc/gen_ndr/ndr_drsblobs.h
librpc/gen_ndr/ndr_drsuapi.c
librpc/gen_ndr/ndr_drsuapi.h
librpc/gen_ndr/ndr_epmapper.c
librpc/gen_ndr/ndr_krb5pac.c
librpc/gen_ndr/ndr_krb5pac.h
librpc/gen_ndr/ndr_misc.c
librpc/gen_ndr/ndr_misc.h
librpc/gen_ndr/ndr_named_pipe_auth.c
librpc/gen_ndr/ndr_named_pipe_auth.h
librpc/gen_ndr/ndr_nbt.c
librpc/gen_ndr/ndr_nbt.h
librpc/gen_ndr/ndr_netlogon.c
librpc/gen_ndr/ndr_netlogon.h
librpc/gen_ndr/ndr_security.c
librpc/gen_ndr/ndr_security.h
librpc/gen_ndr/ndr_svcctl.c
librpc/gen_ndr/ndr_svcctl.h
librpc/gen_ndr/netlogon.h
librpc/gen_ndr/security.h
librpc/idl/drsblobs.idl
librpc/idl/drsuapi.idl
librpc/idl/epmapper.idl
librpc/idl/named_pipe_auth.idl
librpc/idl/nbt.idl
librpc/idl/netlogon.idl
librpc/idl/security.idl
librpc/idl/spoolss.idl
librpc/ndr/libndr.h
librpc/ndr/ndr.c
librpc/ndr/ndr_krb5pac.c
librpc/ndr/ndr_sec_helper.c
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
source3/include/includes.h
source3/include/proto.h
source3/lib/secace.c
source3/lib/secdesc.c
source3/lib/sharesec.c
source3/lib/util_sid.c
source3/librpc/ndr/util.c
source3/libsmb/cliquota.c
source3/passdb/lookup_sid.c
source3/printing/nt_printing.c
source3/registry/reg_api.c
source3/registry/regfio.c
source3/rpc_parse/parse_buffer.c
source3/rpc_parse/parse_sec.c
source3/rpc_parse/parse_spoolss.c
source3/rpc_server/srv_srvsvc_nt.c
source3/rpc_server/srv_svcctl_nt.c
source3/smbd/nttrans.c
source3/smbd/trans2.c
source4/build/make/rules.mk
source4/librpc/idl/winsrepl.idl
source4/librpc/ndr/ndr_spoolss_buf.c
source4/librpc/rpc/dcerpc.c
source4/rpc_server/spoolss/dcesrv_spoolss.c
source4/setup/provision

index ffc075fab231a8df8a50be28ef80c654cc12a75b..0354cfb592ce473614e6d24b50f7aee85b696fae 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->flags)));
+                               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->iconv_convenience, ndr->flags)));
                                {
                                        struct ndr_push *_ndr_sockaddr;
-                                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
+                                       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_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->flags)));
+                                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->iconv_convenience, ndr->flags)));
                                }
                        }
                        if (r->nt_version & NETLOGON_NT_VERSION_WITH_CLOSEST_SITE) {
index d8a9ef304fb59195d1590efe4fe9239e89162ea8..2dcdbaeb9bae1e67ca782400621a2a0edda7076b 100644 (file)
@@ -893,7 +893,7 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
                                  struct netr_Authenticator *credential /* [in] [ref] */,
                                  struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
                                  struct netr_ChangeLogEntry change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */,
-                                 uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */,
+                                 uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */,
                                  struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */)
 {
        struct netr_DatabaseRedo r;
index ac704484d106f3bd4ceea16822a0f084164b6317..dd086a908a52c1b01c7ba97b4bdccb521748249f 100644 (file)
@@ -159,7 +159,7 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
                                  struct netr_Authenticator *credential /* [in] [ref] */,
                                  struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
                                  struct netr_ChangeLogEntry change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */,
-                                 uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */,
+                                 uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */,
                                  struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */);
 NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
index f8fd304d3d796f691fbda887602768353476195c..bb33464c76778e4b92e0e52f7a0ab8328d9fda54 100644 (file)
@@ -64,13 +64,13 @@ struct repsFromTo1OtherInfo {
 }/* [gensize,public] */;
 
 struct repsFromTo1 {
-       uint32_t blobsize;/* [value(ndr_size_repsFromTo1(this,ndr->flags)+8)] */
+       uint32_t blobsize;/* [value(ndr_size_repsFromTo1(this,ndr->iconv_convenience,ndr->flags)+8)] */
        uint32_t consecutive_sync_failures;
        NTTIME last_success;
        NTTIME last_attempt;
        WERROR result_last_attempt;
        struct repsFromTo1OtherInfo *other_info;/* [relative] */
-       uint32_t other_info_length;/* [value(ndr_size_repsFromTo1OtherInfo(other_info,ndr->flags))] */
+       uint32_t other_info_length;/* [value(ndr_size_repsFromTo1OtherInfo(other_info,ndr->iconv_convenience,ndr->flags))] */
        uint32_t replica_flags;
        uint8_t schedule[84];
        uint32_t reserved;
@@ -135,7 +135,7 @@ struct ldapControlDirSyncBlob {
        NTTIME time;
        uint32_t u2;
        uint32_t u3;
-       uint32_t extra_length;/* [value(ndr_size_ldapControlDirSyncExtra(&extra,extra.uptodateness_vector.version,0))] */
+       uint32_t extra_length;/* [value(ndr_size_ldapControlDirSyncExtra(&extra,extra.uptodateness_vector.version,ndr->iconv_convenience,0))] */
        struct drsuapi_DsReplicaHighWaterMark highwatermark;
        struct GUID guid1;
        union ldapControlDirSyncExtra extra;/* [switch_is(extra_length)] */
@@ -174,7 +174,7 @@ struct supplementalCredentialsSubBlob {
 
 struct supplementalCredentialsBlob {
        uint32_t unknown1;/* [value(0)] */
-       uint32_t __ndr_size;/* [value(ndr_size_supplementalCredentialsSubBlob(&sub,ndr->flags))] */
+       uint32_t __ndr_size;/* [value(ndr_size_supplementalCredentialsSubBlob(&sub,ndr->iconv_convenience,ndr->flags))] */
        uint32_t unknown2;/* [value(0)] */
        struct supplementalCredentialsSubBlob sub;/* [subcontext_size(__ndr_size),subcontext(0)] */
        uint8_t unknown3;/* [value(0)] */
@@ -315,8 +315,8 @@ struct trustDomainPasswords {
        uint8_t confounder[512];
        struct trustCurrentPasswords outgoing;/* [subcontext_size(outgoing_size),subcontext(0)] */
        struct trustCurrentPasswords incoming;/* [subcontext_size(incoming_size),subcontext(0)] */
-       uint32_t outgoing_size;/* [value(ndr_size_trustCurrentPasswords(&outgoing,ndr->flags))] */
-       uint32_t incoming_size;/* [value(ndr_size_trustCurrentPasswords(&incoming,ndr->flags))] */
+       uint32_t outgoing_size;/* [value(ndr_size_trustCurrentPasswords(&outgoing,ndr->iconv_convenience,ndr->flags))] */
+       uint32_t incoming_size;/* [value(ndr_size_trustCurrentPasswords(&incoming,ndr->iconv_convenience,ndr->flags))] */
 }/* [public,nopull] */;
 
 struct DsCompressedChunk {
index ba01e8f22650ecedb7737c1e75b8abe2209ea0c2..e3d480365e460ba2db0ba30246c873c2849a2974 100644 (file)
@@ -92,7 +92,7 @@ struct drsuapi_DsBindInfoCtr {
 };
 
 struct drsuapi_DsReplicaObjectIdentifier {
-       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r,ndr->flags)-4)] */
+       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r,ndr->iconv_convenience,ndr->flags)-4)] */
        uint32_t __ndr_size_sid;/* [value(ndr_size_dom_sid28(&sid,ndr->flags))] */
        struct GUID guid;
        struct dom_sid28 sid;
@@ -468,7 +468,7 @@ struct drsuapi_DsAttributeValueCtr {
 };
 
 struct drsuapi_DsReplicaObjectIdentifier3 {
-       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r,ndr->flags))] */
+       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r,ndr->iconv_convenience,ndr->flags))] */
        uint32_t __ndr_size_sid;/* [value(ndr_size_dom_sid28(&sid,ndr->flags))] */
        struct GUID guid;
        struct dom_sid28 sid;
@@ -477,7 +477,7 @@ struct drsuapi_DsReplicaObjectIdentifier3 {
 }/* [gensize,public] */;
 
 struct drsuapi_DsReplicaObjectIdentifier3Binary {
-       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r,ndr->flags))] */
+       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r,ndr->iconv_convenience,ndr->flags))] */
        uint32_t __ndr_size_sid;/* [value(ndr_size_dom_sid28(&sid,ndr->flags))] */
        struct GUID guid;
        struct dom_sid28 sid;
@@ -538,7 +538,7 @@ struct drsuapi_DsGetNCChangesCtr1 {
        struct drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
        enum drsuapi_DsExtendedError extended_ret;
        uint32_t object_count;
-       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] */
+       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->iconv_convenience,ndr->flags)+55)] */
        struct drsuapi_DsReplicaObjectListItemEx *first_object;/* [unique] */
        uint32_t more_data;
 }/* [gensize,public] */;
@@ -565,7 +565,7 @@ struct drsuapi_DsGetNCChangesCtr6 {
        struct drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
        enum drsuapi_DsExtendedError extended_ret;
        uint32_t object_count;
-       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] */
+       uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->iconv_convenience,ndr->flags)+55)] */
        struct drsuapi_DsReplicaObjectListItemEx *first_object;/* [unique] */
        uint32_t more_data;
        uint32_t nc_object_count;
index 4b75261a02e7ec93993edc524b4dfc9855c353f6..e5155a8cad7f9bf4ef27dc61352fb86c5b913b14 100644 (file)
@@ -220,7 +220,7 @@ struct epm_tower {
 }/* [gensize,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN)] */;
 
 struct epm_twr_t {
-       uint32_t tower_length;/* [value(ndr_size_epm_tower(&tower,ndr->flags))] */
+       uint32_t tower_length;/* [value(ndr_size_epm_tower(&tower,ndr->iconv_convenience,ndr->flags))] */
        struct epm_tower tower;/* [subcontext(4)] */
 };
 
index 8f2446e5646b90dc47e5fac03ba0a02cfe923669..7ca7444c92703f2d2d903611d62181d23d94ecad 100644 (file)
@@ -12,7 +12,7 @@ union named_pipe_auth_req_info {
 }/* [switch_type(uint32)] */;
 
 struct named_pipe_auth_req {
-       uint32_t length;/* [value(ndr_size_named_pipe_auth_req(r,ndr->flags)-4),flag(LIBNDR_FLAG_BIGENDIAN)] */
+       uint32_t length;/* [value(ndr_size_named_pipe_auth_req(r,ndr->iconv_convenience,ndr->flags)-4),flag(LIBNDR_FLAG_BIGENDIAN)] */
        const char *magic;/* [value(NAMED_PIPE_AUTH_MAGIC),charset(DOS)] */
        uint32_t level;
        union named_pipe_auth_req_info info;/* [switch_is(level)] */
@@ -23,7 +23,7 @@ union named_pipe_auth_rep_info {
 }/* [switch_type(uint32)] */;
 
 struct named_pipe_auth_rep {
-       uint32_t length;/* [value(ndr_size_named_pipe_auth_rep(r,ndr->flags)-4),flag(LIBNDR_FLAG_BIGENDIAN)] */
+       uint32_t length;/* [value(ndr_size_named_pipe_auth_rep(r,ndr->iconv_convenience,ndr->flags)-4),flag(LIBNDR_FLAG_BIGENDIAN)] */
        const char *magic;/* [value(NAMED_PIPE_AUTH_MAGIC),charset(DOS)] */
        uint32_t level;
        union named_pipe_auth_rep_info info;/* [switch_is(level)] */
index a8c66a67958e3577458ad2e62fbd3ff01202eba1..1f3ad37d9bf5aa6c544a2592edab46828fd639e2 100644 (file)
@@ -505,7 +505,7 @@ struct NETLOGON_SAM_LOGON_RESPONSE_EX {
        const char * user_name;
        const char * server_site;
        const char * client_site;
-       uint8_t sockaddr_size;/* [value(ndr_size_nbt_sockaddr(&sockaddr,ndr->flags))] */
+       uint8_t sockaddr_size;/* [value(ndr_size_nbt_sockaddr(&sockaddr,ndr->iconv_convenience,ndr->flags))] */
        struct nbt_sockaddr sockaddr;/* [subcontext_size(sockaddr_size),subcontext(0)] */
        const char * next_closest_site;
        uint32_t nt_version;
index c868c39ecd02e5f0242c95304125786899e96c98..72e182d3ff3092a31b7302a7d907698618815e5c 100644 (file)
@@ -486,9 +486,9 @@ _PUBLIC_ void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, int flags)
+_PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r)
@@ -498,13 +498,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_fl
                ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
                if (ndr_flags & NDR_SCALARS) {
                        NDR_CHECK(ndr_push_align(ndr, 8));
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->flags) + 8));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8));
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
                        NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
                        NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
                        NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
                        NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->flags)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags)));
                        NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags));
                        NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
@@ -578,7 +578,7 @@ _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, con
                uint32_t _flags_save_STRUCT = ndr->flags;
                ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
                ndr->depth++;
-               ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->flags) + 8:r->blobsize);
+               ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8:r->blobsize);
                ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
                ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
                ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
@@ -589,7 +589,7 @@ _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, con
                        ndr_print_repsFromTo1OtherInfo(ndr, "other_info", r->other_info);
                }
                ndr->depth--;
-               ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->flags):r->other_info_length);
+               ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags):r->other_info_length);
                ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags);
                ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
                ndr_print_uint32(ndr, "reserved", r->reserved);
@@ -602,10 +602,10 @@ _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, con
        }
 }
 
-_PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, int flags)
+_PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, struct smb_iconv_convenience *ic, int flags)
 {
        flags |= LIBNDR_PRINT_ARRAY_HEX;
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1, ic);
 }
 
 static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, int ndr_flags, const union repsFromTo *r)
@@ -1084,9 +1084,9 @@ _PUBLIC_ void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const cha
        }
 }
 
-static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, int flags)
+static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra);
+       return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra, ic);
 }
 
 static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncBlob *r)
@@ -1097,10 +1097,10 @@ static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, i
                NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
                NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1));
-               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0)));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
                NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -1137,7 +1137,7 @@ _PUBLIC_ void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char
        ndr_print_NTTIME(ndr, "time", r->time);
        ndr_print_uint32(ndr, "u2", r->u2);
        ndr_print_uint32(ndr, "u3", r->u3);
-       ndr_print_uint32(ndr, "extra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, 0):r->extra_length);
+       ndr_print_uint32(ndr, "extra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0):r->extra_length);
        ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
        ndr_print_GUID(ndr, "guid1", &r->guid1);
        ndr_print_set_switch_value(ndr, &r->extra, r->extra_length);
@@ -1337,9 +1337,9 @@ _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, co
        ndr->depth--;
 }
 
-static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, int flags)
+static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r)
@@ -1347,13 +1347,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
                {
                        struct ndr_push *_ndr_sub;
-                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
                        NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
-                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
                }
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
        }
@@ -1387,7 +1387,7 @@ _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const
        ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
        ndr->depth++;
        ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
-       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->flags):r->__ndr_size);
+       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
        ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
        ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
        ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
@@ -2616,9 +2616,9 @@ _PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const c
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags)
+_PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
@@ -2709,9 +2709,9 @@ _PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags)
+_PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
@@ -2721,18 +2721,18 @@ _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, i
                NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
                {
                        struct ndr_push *_ndr_outgoing;
-                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
                        NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
-                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
                }
                {
                        struct ndr_push *_ndr_incoming;
-                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
                        NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
-                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
                }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
        }
        if (ndr_flags & NDR_BUFFERS) {
        }
@@ -2746,8 +2746,8 @@ _PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *
        ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
        ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
        ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
-       ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags):r->outgoing_size);
-       ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags):r->incoming_size);
+       ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags):r->outgoing_size);
+       ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags):r->incoming_size);
        ndr->depth--;
 }
 
index 09c4b7ff61d4fa15b42381d20b1e7b97c4a466e5..2f6cf991d65e8af714726f7504858f73a1cad11c 100644 (file)
@@ -55,11 +55,11 @@ void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, c
 enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1OtherInfo *r);
 enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1OtherInfo *r);
 void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r);
-size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, int flags);
+size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r);
 enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1 *r);
 void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r);
-size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, int flags);
+size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, struct smb_iconv_convenience *ic, int flags);
 void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r);
 enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr_flags, const struct repsFromToBlob *r);
 enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr_flags, struct repsFromToBlob *r);
@@ -118,11 +118,11 @@ void ndr_print_AuthenticationInformationArray(struct ndr_print *ndr, const char
 enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r);
 enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r);
 void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r);
-size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags);
+size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r);
 enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r);
 void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r);
-size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags);
+size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r);
 enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r);
 void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r);
index 3ef5b8024d2d98e2e309c81c7932674bea9054e2..369a1d44e01ed4e4983f3489cb1ace0b3fc8fb67 100644 (file)
@@ -440,7 +440,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn) + 1));
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->iconv_convenience, ndr->flags) - 4));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
                NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
@@ -478,7 +478,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr,
 {
        ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier");
        ndr->depth++;
-       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4:r->__ndr_size);
+       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->iconv_convenience, ndr->flags) - 4:r->__ndr_size);
        ndr_print_uint32(ndr, "__ndr_size_sid", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid28(&r->sid, ndr->flags):r->__ndr_size_sid);
        ndr_print_GUID(ndr, "guid", &r->guid);
        ndr_print_dom_sid28(ndr, "sid", &r->sid);
@@ -487,9 +487,9 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr,
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, int flags)
+_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r)
@@ -1892,7 +1892,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct nd
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->iconv_convenience, ndr->flags)));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
                NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
@@ -1926,7 +1926,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr
 {
        ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3");
        ndr->depth++;
-       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags):r->__ndr_size);
+       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
        ndr_print_uint32(ndr, "__ndr_size_sid", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid28(&r->sid, ndr->flags):r->__ndr_size_sid);
        ndr_print_GUID(ndr, "guid", &r->guid);
        ndr_print_dom_sid28(ndr, "sid", &r->sid);
@@ -1935,16 +1935,16 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, int flags)
+_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->iconv_convenience, ndr->flags)));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
                NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
@@ -1992,7 +1992,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_prin
 {
        ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3Binary");
        ndr->depth++;
-       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->flags):r->__ndr_size);
+       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
        ndr_print_uint32(ndr, "__ndr_size_sid", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid28(&r->sid, ndr->flags):r->__ndr_size_sid);
        ndr_print_GUID(ndr, "guid", &r->guid);
        ndr_print_dom_sid28(ndr, "sid", &r->sid);
@@ -2003,9 +2003,9 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_prin
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, int flags)
+_PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAttribute *r)
@@ -2409,7 +2409,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push *
                NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
                NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->iconv_convenience, ndr->flags) + 55));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
        }
@@ -2513,7 +2513,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const
        ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
        ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
        ndr_print_uint32(ndr, "object_count", r->object_count);
-       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55:r->__ndr_size);
+       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->iconv_convenience, ndr->flags) + 55:r->__ndr_size);
        ndr_print_ptr(ndr, "first_object", r->first_object);
        ndr->depth++;
        if (r->first_object) {
@@ -2524,9 +2524,9 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, int flags)
+_PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
@@ -2633,7 +2633,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *
                NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
                NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->iconv_convenience, ndr->flags) + 55));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_object_count));
@@ -2788,7 +2788,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const
        ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
        ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
        ndr_print_uint32(ndr, "object_count", r->object_count);
-       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55:r->__ndr_size);
+       ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->iconv_convenience, ndr->flags) + 55:r->__ndr_size);
        ndr_print_ptr(ndr, "first_object", r->first_object);
        ndr->depth++;
        if (r->first_object) {
@@ -2818,9 +2818,9 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, int flags)
+_PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r)
index 168854b3378f8aa49d24bad346dfcabd016c6280..f7cb768ccc1ebb34abf0db01f24b1a86ef20d858 100644 (file)
@@ -74,7 +74,7 @@ void ndr_print_drsuapi_DsBindInfoCtr(struct ndr_print *ndr, const char *name, co
 enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier *r);
 enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier *r);
 void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier *r);
-size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, int flags);
+size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r);
 enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
 void ndr_print_drsuapi_DsReplicaSyncOptions(struct ndr_print *ndr, const char *name, uint32_t r);
@@ -115,11 +115,11 @@ void ndr_print_drsuapi_DsAttributeValueCtr(struct ndr_print *ndr, const char *na
 enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3 *r);
 enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3 *r);
 void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3 *r);
-size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, int flags);
+size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r);
 enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3Binary *r);
 void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r);
-size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, int flags);
+size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAttribute *r);
 enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAttribute *r);
 void ndr_print_drsuapi_DsReplicaAttribute(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttribute *r);
@@ -140,7 +140,7 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch
 enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1 *r);
 enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1 *r);
 void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1 *r);
-size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, int flags);
+size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
 enum ndr_err_code ndr_pull_drsuapi_DsLinkedAttributeFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
 void ndr_print_drsuapi_DsLinkedAttributeFlags(struct ndr_print *ndr, const char *name, uint32_t r);
@@ -150,7 +150,7 @@ void ndr_print_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const cha
 enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6 *r);
 enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6 *r);
 void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6 *r);
-size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, int flags);
+size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r);
 enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r);
 void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r);
index e06bf7f3aac99278e5ee6a009e863a8c8a47183c..ad1c66ce1fb4aacd65d7ffb3775c7966aeb0f2db 100644 (file)
@@ -1578,17 +1578,17 @@ _PUBLIC_ void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const
        }
 }
 
-static size_t ndr_size_epm_tower(const struct epm_tower *r, int flags)
+static size_t ndr_size_epm_tower(const struct epm_tower *r, struct smb_iconv_convenience *ic, int flags)
 {
        flags |= LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN;
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_epm_tower);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_epm_tower, ic);
 }
 
 static enum ndr_err_code ndr_push_epm_twr_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_t *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_epm_tower(&r->tower, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_epm_tower(&r->tower, ndr->iconv_convenience, ndr->flags)));
                {
                        struct ndr_push *_ndr_tower;
                        NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_tower, 4, -1));
@@ -1622,7 +1622,7 @@ _PUBLIC_ void ndr_print_epm_twr_t(struct ndr_print *ndr, const char *name, const
 {
        ndr_print_struct(ndr, name, "epm_twr_t");
        ndr->depth++;
-       ndr_print_uint32(ndr, "tower_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_epm_tower(&r->tower, ndr->flags):r->tower_length);
+       ndr_print_uint32(ndr, "tower_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_epm_tower(&r->tower, ndr->iconv_convenience, ndr->flags):r->tower_length);
        ndr_print_epm_tower(ndr, "tower", &r->tower);
        ndr->depth--;
 }
index 06abe91fc34b2eecd6bacfae2f3a173cba68b7fd..27025c0202f4a92823515ca74881eee094287046 100644 (file)
@@ -430,9 +430,9 @@ _PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const
        }
 }
 
-_PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
+_PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_PAC_INFO);
+       return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_PAC_INFO, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r)
index 8ab6b6a0fa2f416d579873b3248bdeb8e6e88a41..072468ba5de0620a7acb272c377c2c106a42b8a4 100644 (file)
@@ -35,7 +35,7 @@ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const stru
 enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r);
 enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r);
 void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r);
-size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
+size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r);
 enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r);
 void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r);
index dbe5cdd60edc95e14575dce69b1ba6908ec0de48..83c977245af834cb1c3e6ee5574dd13bc31ad85d 100644 (file)
@@ -33,9 +33,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, st
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ size_t ndr_size_GUID(const struct GUID *r, int flags)
+_PUBLIC_ size_t ndr_size_GUID(const struct GUID *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_GUID);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_GUID, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r)
index 101aa8ad84bba5ed757da4a745ee58de81549b7f..a38b3c994806da4a95364e5dd462f6d27dffdfb3 100644 (file)
@@ -10,7 +10,7 @@
 enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r);
 enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r);
 void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *r);
-size_t ndr_size_GUID(const struct GUID *r, int flags);
+size_t ndr_size_GUID(const struct GUID *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r);
 enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_flags, struct ndr_syntax_id *r);
 void ndr_print_ndr_syntax_id(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id *r);
index 2377964570afa7f4e7654517905fdfd39869ebe7..88ad4498785d187d573700a98550c27fdb2ba583 100644 (file)
@@ -101,7 +101,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_req(struct ndr_push *ndr, in
                {
                        uint32_t _flags_save_uint32 = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_req(r, ndr->flags) - 4));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_req(r, ndr->iconv_convenience, ndr->flags) - 4));
                        ndr->flags = _flags_save_uint32;
                }
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, NAMED_PIPE_AUTH_MAGIC, 4, sizeof(uint8_t), CH_DOS));
@@ -140,7 +140,7 @@ _PUBLIC_ void ndr_print_named_pipe_auth_req(struct ndr_print *ndr, const char *n
 {
        ndr_print_struct(ndr, name, "named_pipe_auth_req");
        ndr->depth++;
-       ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_req(r, ndr->flags) - 4:r->length);
+       ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_req(r, ndr->iconv_convenience, ndr->flags) - 4:r->length);
        ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NAMED_PIPE_AUTH_MAGIC:r->magic);
        ndr_print_uint32(ndr, "level", r->level);
        ndr_print_set_switch_value(ndr, &r->info, r->level);
@@ -148,9 +148,9 @@ _PUBLIC_ void ndr_print_named_pipe_auth_req(struct ndr_print *ndr, const char *n
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_named_pipe_auth_req(const struct named_pipe_auth_req *r, int flags)
+_PUBLIC_ size_t ndr_size_named_pipe_auth_req(const struct named_pipe_auth_req *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_req);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_req, ic);
 }
 
 static enum ndr_err_code ndr_push_named_pipe_auth_rep_info(struct ndr_push *ndr, int ndr_flags, const union named_pipe_auth_rep_info *r)
@@ -245,7 +245,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_rep(struct ndr_push *ndr, in
                {
                        uint32_t _flags_save_uint32 = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_rep(r, ndr->flags) - 4));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_rep(r, ndr->iconv_convenience, ndr->flags) - 4));
                        ndr->flags = _flags_save_uint32;
                }
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, NAMED_PIPE_AUTH_MAGIC, 4, sizeof(uint8_t), CH_DOS));
@@ -286,7 +286,7 @@ _PUBLIC_ void ndr_print_named_pipe_auth_rep(struct ndr_print *ndr, const char *n
 {
        ndr_print_struct(ndr, name, "named_pipe_auth_rep");
        ndr->depth++;
-       ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_rep(r, ndr->flags) - 4:r->length);
+       ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_rep(r, ndr->iconv_convenience, ndr->flags) - 4:r->length);
        ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NAMED_PIPE_AUTH_MAGIC:r->magic);
        ndr_print_uint32(ndr, "level", r->level);
        ndr_print_set_switch_value(ndr, &r->info, r->level);
@@ -295,8 +295,8 @@ _PUBLIC_ void ndr_print_named_pipe_auth_rep(struct ndr_print *ndr, const char *n
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_named_pipe_auth_rep(const struct named_pipe_auth_rep *r, int flags)
+_PUBLIC_ size_t ndr_size_named_pipe_auth_rep(const struct named_pipe_auth_rep *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_rep);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_rep, ic);
 }
 
index 2a4f689ab972c545fd640dd223aa4a86a605abb1..857c2bcd9b6207e0c50b3b3f490574a5ab90e1e8 100644 (file)
@@ -11,10 +11,10 @@ void ndr_print_named_pipe_auth_req_info(struct ndr_print *ndr, const char *name,
 enum ndr_err_code ndr_push_named_pipe_auth_req(struct ndr_push *ndr, int ndr_flags, const struct named_pipe_auth_req *r);
 enum ndr_err_code ndr_pull_named_pipe_auth_req(struct ndr_pull *ndr, int ndr_flags, struct named_pipe_auth_req *r);
 void ndr_print_named_pipe_auth_req(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_req *r);
-size_t ndr_size_named_pipe_auth_req(const struct named_pipe_auth_req *r, int flags);
+size_t ndr_size_named_pipe_auth_req(const struct named_pipe_auth_req *r, struct smb_iconv_convenience *ic, int flags);
 void ndr_print_named_pipe_auth_rep_info(struct ndr_print *ndr, const char *name, const union named_pipe_auth_rep_info *r);
 enum ndr_err_code ndr_push_named_pipe_auth_rep(struct ndr_push *ndr, int ndr_flags, const struct named_pipe_auth_rep *r);
 enum ndr_err_code ndr_pull_named_pipe_auth_rep(struct ndr_pull *ndr, int ndr_flags, struct named_pipe_auth_rep *r);
 void ndr_print_named_pipe_auth_rep(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_rep *r);
-size_t ndr_size_named_pipe_auth_rep(const struct named_pipe_auth_rep *r, int flags);
+size_t ndr_size_named_pipe_auth_rep(const struct named_pipe_auth_rep *r, struct smb_iconv_convenience *ic, int flags);
 #endif /* _HEADER_NDR_named_pipe_auth */
index 435bebe091c4d79370a7496de23acb77ea1e9756..8fcd94ccc17565a37a210e7694693d41588f0bb1 100644 (file)
@@ -1583,9 +1583,9 @@ _PUBLIC_ void ndr_print_nbt_sockaddr(struct ndr_print *ndr, const char *name, co
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, int flags)
+_PUBLIC_ size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_nbt_sockaddr);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_nbt_sockaddr, ic);
 }
 
 _PUBLIC_ enum ndr_err_code ndr_push_nbt_server_type(struct ndr_push *ndr, int ndr_flags, uint32_t r)
@@ -1929,12 +1929,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pu
                        NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name));
                        NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site));
                        NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site));
-                       NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
+                       NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->iconv_convenience, ndr->flags)));
                        {
                                struct ndr_push *_ndr_sockaddr;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
+                               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_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS, &r->sockaddr));
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
+                               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_nbt_string(ndr, NDR_SCALARS, r->next_closest_site));
                        NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
@@ -2005,7 +2005,7 @@ _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, co
                ndr_print_nbt_string(ndr, "user_name", r->user_name);
                ndr_print_nbt_string(ndr, "server_site", r->server_site);
                ndr_print_nbt_string(ndr, "client_site", r->client_site);
-               ndr_print_uint8(ndr, "sockaddr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags):r->sockaddr_size);
+               ndr_print_uint8(ndr, "sockaddr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_nbt_sockaddr(&r->sockaddr, ndr->iconv_convenience, ndr->flags):r->sockaddr_size);
                ndr_print_nbt_sockaddr(ndr, "sockaddr", &r->sockaddr);
                ndr_print_nbt_string(ndr, "next_closest_site", r->next_closest_site);
                ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
index c7eb8f78a021c9f2e5488270043585938c03597a..7066d31c602194de5919e13d64fcc0478dad7bfb 100644 (file)
@@ -54,7 +54,7 @@ void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name, const s
 enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_flags, const struct nbt_sockaddr *r);
 enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_flags, struct nbt_sockaddr *r);
 void ndr_print_nbt_sockaddr(struct ndr_print *ndr, const char *name, const struct nbt_sockaddr *r);
-size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, int flags);
+size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_nbt_server_type(struct ndr_push *ndr, int ndr_flags, uint32_t r);
 enum ndr_err_code ndr_pull_nbt_server_type(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
 void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r);
index b3894f897ccdeafa61579add8465d32f5085efd8..050ee24ed59f594b10f77d1fad7638fdc6ad21ef 100644 (file)
@@ -6678,9 +6678,9 @@ _PUBLIC_ void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *n
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, int flags)
+_PUBLIC_ size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry, ic);
 }
 
 static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r)
@@ -11792,11 +11792,11 @@ static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int fl
                NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
                {
                        struct ndr_push *_ndr_change_log_entry;
-                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_change_log_entry, 4, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_change_log_entry, 4, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->iconv_convenience, ndr->flags)));
                        NDR_CHECK(ndr_push_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
-                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_change_log_entry, 4, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_change_log_entry, 4, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->iconv_convenience, ndr->flags)));
                }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->iconv_convenience, ndr->flags)));
        }
        if (flags & NDR_OUT) {
                if (r->out.return_authenticator == NULL) {
@@ -11917,7 +11917,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *nam
                ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
                ndr->depth--;
                ndr_print_netr_ChangeLogEntry(ndr, "change_log_entry", &r->in.change_log_entry);
-               ndr_print_uint32(ndr, "change_log_entry_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags):r->in.change_log_entry_size);
+               ndr_print_uint32(ndr, "change_log_entry_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->iconv_convenience, ndr->flags):r->in.change_log_entry_size);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
index 96c487f1700f54c6096269e7a5b4c19a35b76aa7..f88310f8704a04ddee24cf3414fe9394b1d4c2e0 100644 (file)
@@ -197,7 +197,7 @@ void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, con
 enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, int ndr_flags, const struct netr_ChangeLogEntry *r);
 enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, int ndr_flags, struct netr_ChangeLogEntry *r);
 void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, const struct netr_ChangeLogEntry *r);
-size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, int flags);
+size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, struct smb_iconv_convenience *ic, int flags);
 void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r);
 void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r);
index 27aef3e06ac0222826996a450411ee2c7122276f..64c134dcb848281551e3ef38db3a5c7783c81972 100644 (file)
@@ -418,7 +418,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_f
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_security_ace_type(ndr, NDR_SCALARS, r->type));
                NDR_CHECK(ndr_push_security_ace_flags(ndr, NDR_SCALARS, r->flags));
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_ace(r, ndr->flags)));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_ace(r, ndr->iconv_convenience, ndr->flags)));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask));
                NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->type));
                NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object));
@@ -436,7 +436,7 @@ _PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, co
        ndr->depth++;
        ndr_print_security_ace_type(ndr, "type", r->type);
        ndr_print_security_ace_flags(ndr, "flags", r->flags);
-       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_ace(r, ndr->flags):r->size);
+       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_ace(r, ndr->iconv_convenience, ndr->flags):r->size);
        ndr_print_uint32(ndr, "access_mask", r->access_mask);
        ndr_print_set_switch_value(ndr, &r->object, r->type);
        ndr_print_security_ace_object_ctr(ndr, "object", &r->object);
@@ -475,7 +475,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_f
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_security_acl_revision(ndr, NDR_SCALARS, r->revision));
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_acl(r, ndr->flags)));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_acl(r, ndr->iconv_convenience, ndr->flags)));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aces));
                for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) {
                        NDR_CHECK(ndr_push_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0]));
@@ -526,7 +526,7 @@ _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, co
        ndr_print_struct(ndr, name, "security_acl");
        ndr->depth++;
        ndr_print_security_acl_revision(ndr, "revision", r->revision);
-       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_acl(r, ndr->flags):r->size);
+       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_acl(r, ndr->iconv_convenience, ndr->flags):r->size);
        ndr_print_uint32(ndr, "num_aces", r->num_aces);
        ndr->print(ndr, "%s: ARRAY(%d)", "aces", (int)r->num_aces);
        ndr->depth++;
@@ -774,7 +774,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_f
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_security_descriptor(r->sd, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_security_descriptor(r->sd, ndr->iconv_convenience, ndr->flags)));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -827,7 +827,7 @@ _PUBLIC_ void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, co
 {
        ndr_print_struct(ndr, name, "sec_desc_buf");
        ndr->depth++;
-       ndr_print_uint32(ndr, "sd_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_descriptor(r->sd, ndr->flags):r->sd_size);
+       ndr_print_uint32(ndr, "sd_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_descriptor(r->sd, ndr->iconv_convenience, ndr->flags):r->sd_size);
        ndr_print_ptr(ndr, "sd", r->sd);
        ndr->depth++;
        if (r->sd) {
index 8cf7bf3eea4f396321aaea7e29ac2035d418a825..eddd3c3507772843f35ee52f9aed10b00792e673 100644 (file)
@@ -10,7 +10,7 @@
 enum ndr_err_code ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *r);
 enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r);
 void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *r);
-size_t ndr_size_dom_sid(const struct dom_sid *r, int flags);
+size_t ndr_size_dom_sid(const struct dom_sid *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r);
 enum ndr_err_code ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r);
 void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r);
@@ -27,18 +27,18 @@ void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name,
 enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r);
 enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r);
 void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r);
-size_t ndr_size_security_ace(const struct security_ace *r, int flags);
+size_t ndr_size_security_ace(const struct security_ace *r, struct smb_iconv_convenience *ic, int flags);
 void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r);
 enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r);
 enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r);
 void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r);
-size_t ndr_size_security_acl(const struct security_acl *r, int flags);
+size_t ndr_size_security_acl(const struct security_acl *r, struct smb_iconv_convenience *ic, int flags);
 void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r);
 void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r);
 enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r);
 enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r);
 void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r);
-size_t ndr_size_security_descriptor(const struct security_descriptor *r, int flags);
+size_t ndr_size_security_descriptor(const struct security_descriptor *r, struct smb_iconv_convenience *ic, int flags);
 enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r);
 enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r);
 void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r);
index 1cab496c8d4888d7b01bf7013698ec5cf2679ad5..590d493092de4437bc486735f327d23cdac863b9 100644 (file)
@@ -586,9 +586,9 @@ _PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *
        ndr->depth--;
 }
 
-_PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags)
+_PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, struct smb_iconv_convenience *ic, int flags)
 {
-       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG);
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG, ic);
 }
 
 static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
index 06b807bc7dc2cfcd04821d35af02141671565bb9..595a98041b0a2f0098ba8ddefcf3b01e8c1e3803 100644 (file)
@@ -112,7 +112,7 @@ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name,
 enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r);
 enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r);
 void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r);
-size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags);
+size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, struct smb_iconv_convenience *ic, int flags);
 void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
 void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
 void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);
index c0507b1e2d588e1d6406343b22540c4f8049628a..74f5c2b80118b8e4f0fb0be95ed6894aa53de1cb 100644 (file)
@@ -1303,7 +1303,7 @@ struct netr_DatabaseRedo {
                const char *computername;/* [charset(UTF16)] */
                struct netr_Authenticator *credential;/* [ref] */
                struct netr_ChangeLogEntry change_log_entry;/* [subcontext_size(change_log_entry_size),subcontext(4)] */
-               uint32_t change_log_entry_size;/* [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */
+               uint32_t change_log_entry_size;/* [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */
                struct netr_Authenticator *return_authenticator;/* [ref] */
        } in;
 
index 2b422608eafc958e9973ac048a0896deca9029ef..4fa9a8084cf97462a794f97c9d9dcea6e3984622 100644 (file)
@@ -257,7 +257,7 @@ union security_ace_object_ctr {
 struct security_ace {
        enum security_ace_type type;
        uint8_t flags;
-       uint16_t size;/* [value(ndr_size_security_ace(r,ndr->flags))] */
+       uint16_t size;/* [value(ndr_size_security_ace(r,ndr->iconv_convenience,ndr->flags))] */
        uint32_t access_mask;
        union security_ace_object_ctr object;/* [switch_is(type)] */
        struct dom_sid trustee;
@@ -278,7 +278,7 @@ enum security_acl_revision
 
 struct security_acl {
        enum security_acl_revision revision;
-       uint16_t size;/* [value(ndr_size_security_acl(r,ndr->flags))] */
+       uint16_t size;/* [value(ndr_size_security_acl(r,ndr->iconv_convenience,ndr->flags))] */
        uint32_t num_aces;/* [range(0,1000)] */
        struct security_ace *aces;
 }/* [gensize,public,nosize] */;
@@ -322,7 +322,7 @@ struct security_descriptor {
 }/* [gensize,public,flag(LIBNDR_FLAG_LITTLE_ENDIAN),nosize] */;
 
 struct sec_desc_buf {
-       uint32_t sd_size;/* [value(ndr_size_security_descriptor(sd,ndr->flags)),range(0,0x40000)] */
+       uint32_t sd_size;/* [value(ndr_size_security_descriptor(sd,ndr->iconv_convenience,ndr->flags)),range(0,0x40000)] */
        struct security_descriptor *sd;/* [unique,subcontext(4)] */
 }/* [public] */;
 
index 087f0c982ddf52595da9deeb0eb57bb7c199f730..7e9c2fe9bb337fb552f94727669d2123aea74f9f 100644 (file)
@@ -91,13 +91,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->flags)+8)] uint32 blobsize;
+               [value(ndr_size_repsFromTo1(this, ndr->iconv_convenience, 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->flags))] uint32 other_info_length;
+               [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->iconv_convenience, ndr->flags))] uint32 other_info_length;
                drsuapi_DsReplicaNeighbourFlags replica_flags;
                uint8 schedule[84];
                uint32 reserved;
@@ -186,7 +186,7 @@ interface drsblobs {
                NTTIME time;
                uint32 u2;
                uint32 u3;
-               [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))] 
+               [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, ndr->iconv_convenience, 0))] 
                        uint32 extra_length;
                drsuapi_DsReplicaHighWaterMark highwatermark;
                GUID guid1;
@@ -247,7 +247,7 @@ interface drsblobs {
 
        typedef [public] struct {
                [value(0)] uint32 unknown1;
-               [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->flags))] uint32 __ndr_size;
+               [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
                [value(0)] uint32 unknown2;
                [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
                [value(0)] uint8 unknown3;
@@ -430,8 +430,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->flags))] uint32 outgoing_size;
-               [value(ndr_size_trustCurrentPasswords(&incoming, ndr->flags))] uint32 incoming_size;
+               [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;
        } trustDomainPasswords;
 
        void decode_trustDomainPasswords(
index e4b5dc1fd9a99fe139c449e3fadf956831236c7b..9e1f17b61d7b9f7422624a26d9afe4f7acc13df1 100644 (file)
@@ -142,7 +142,7 @@ interface drsuapi
        /*****************/
        /* Function 0x02 */
        typedef [public,gensize] struct {
-               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
+               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->iconv_convenience, ndr->flags)-4)] uint32 __ndr_size;
                [value(ndr_size_dom_sid28(&sid, ndr->flags))]  uint32 __ndr_size_sid;
                GUID guid;
                dom_sid28 sid;
@@ -514,7 +514,7 @@ interface drsuapi
 
        /* DN String values */
        typedef [public,gensize] struct {
-               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
+               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
                [value(ndr_size_dom_sid28(&sid,ndr->flags))]  uint32 __ndr_size_sid;
                GUID guid;
                dom_sid28 sid;
@@ -523,7 +523,7 @@ interface drsuapi
        } drsuapi_DsReplicaObjectIdentifier3;
 
        typedef [public,gensize] struct {
-               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->flags))] uint32 __ndr_size;
+               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
                [value(ndr_size_dom_sid28(&sid,ndr->flags))]  uint32 __ndr_size_sid;
                GUID guid;
                dom_sid28 sid;
@@ -586,7 +586,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->flags)+55)] uint32 __ndr_size;
+               [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->iconv_convenience,ndr->flags)+55)] uint32 __ndr_size;
                drsuapi_DsReplicaObjectListItemEx *first_object;
                boolean32 more_data;
        } drsuapi_DsGetNCChangesCtr1;
@@ -619,7 +619,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->flags)+55)] uint32 __ndr_size;
+               [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->iconv_convenience,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 ea048780941237fcbde3e58ab7dc1d9b4af4a500..0a110a178056c849561d57657e52a4856c7b9673 100644 (file)
@@ -216,7 +216,7 @@ interface epmapper
        } epm_tower;
 
        typedef struct {
-               [value(ndr_size_epm_tower(&tower, ndr->flags))] uint32  tower_length;
+               [value(ndr_size_epm_tower(&tower, ndr->iconv_convenience, ndr->flags))] uint32  tower_length;
                [subcontext(4)] epm_tower tower;
        } epm_twr_t;
 
index 7d85eba9eb83603f54a3e5bd9a740e875c603e88..3bd723e6db2c11a13058e6f8ac491dc83578e14d 100644 (file)
@@ -19,7 +19,7 @@ interface named_pipe_auth
 
        typedef [public,gensize] struct {
                [flag(NDR_BIG_ENDIAN),
-                value(ndr_size_named_pipe_auth_req(r,ndr->flags)-4)]
+                value(ndr_size_named_pipe_auth_req(r,ndr->iconv_convenience,ndr->flags)-4)]
                        uint32 length;
                [charset(DOS),value(NAMED_PIPE_AUTH_MAGIC)] uint8 magic[4];
                uint32 level;
@@ -33,7 +33,7 @@ interface named_pipe_auth
 
        typedef [public,gensize] struct {
                [flag(NDR_BIG_ENDIAN),
-                value(ndr_size_named_pipe_auth_rep(r,ndr->flags)-4)]
+                value(ndr_size_named_pipe_auth_rep(r,ndr->iconv_convenience,ndr->flags)-4)]
                        uint32 length;
                [charset(DOS),value(NAMED_PIPE_AUTH_MAGIC)] uint8 magic[4];
                uint32 level;
index f3590fcf2bc8f79d8457ece5b1def40661c3372a..9cefff737104f03e006a2bb24e5d92f71bdc1900 100644 (file)
@@ -454,7 +454,7 @@ interface nbt
                nbt_string           client_site;
 
                /* Optional on NETLOGON_NT_VERSION_5EX_WITH_IP */
-               [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->flags))] uint8 sockaddr_size;
+               [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->iconv_convenience, ndr->flags))] uint8 sockaddr_size;
                [subcontext(0),subcontext_size(sockaddr_size)] nbt_sockaddr sockaddr;
 
                /* Optional on NETLOGON_NT_VERSION_WITH_CLOSEST_SITE */
index 3b9d8bf44339865bfa60ec5f90cb1f01f284b94b..532678eea2c307f54a0de15843560efde8748ef7 100644 (file)
@@ -1014,7 +1014,7 @@ interface netlogon
                [in]     netr_Authenticator *credential,
                [in,out,ref] netr_Authenticator *return_authenticator,
                [in]     [subcontext(4),subcontext_size(change_log_entry_size)] netr_ChangeLogEntry change_log_entry,
-               [in]     [value(ndr_size_netr_ChangeLogEntry(&change_log_entry, ndr->flags))] uint32 change_log_entry_size,
+               [in]     [value(ndr_size_netr_ChangeLogEntry(&change_log_entry, ndr->iconv_convenience, ndr->flags))] uint32 change_log_entry_size,
                [out,ref]    netr_DELTA_ENUM_ARRAY **delta_enum_array
                );
 
index 223a92faad82c56c09d33f98b7e096f2d2921344..caad08e954440251f1f07813ba9a31ec17da4d6a 100644 (file)
@@ -324,7 +324,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->flags))] uint16 size;
+               [value(ndr_size_security_ace(r,ndr->iconv_convenience,ndr->flags))] uint16 size;
                uint32 access_mask;
                [switch_is(type)] security_ace_object_ctr object;
                dom_sid trustee;
@@ -339,7 +339,7 @@ interface security
 
        typedef [public,gensize,nosize] struct {
                security_acl_revision revision;
-               [value(ndr_size_security_acl(r,ndr->flags))] uint16 size;
+               [value(ndr_size_security_acl(r,ndr->iconv_convenience,ndr->flags))] uint16 size;
                [range(0,1000)] uint32 num_aces;
                security_ace aces[num_aces];
        } security_acl;
@@ -381,7 +381,7 @@ interface security
        } security_descriptor;
 
        typedef [public] struct {
-               [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->flags))] uint32 sd_size;
+               [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->iconv_convenience,ndr->flags))] uint32 sd_size;
                [subcontext(4)] security_descriptor *sd;
        } sec_desc_buf;
 
index 6b4b0b8a162807e41d556418b7ab4ca9430461c6..5fdea81575058ce8e913b57366f958eb71e4c118 100644 (file)
@@ -283,7 +283,7 @@ import "misc.idl", "security.idl", "winreg.idl";
        /******************/
        /* Function: 0x01 */
        typedef struct {
-               [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size;
+               [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->iconv_convenience, ndr->flags))] uint32 _ndr_size;
                [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
        } spoolss_DevmodeContainer;
 
@@ -726,7 +726,7 @@ import "misc.idl", "security.idl", "winreg.idl";
        const string SPOOLSS_ARCHITECTURE_NT_X86                = "Windows NT x86";
 
        typedef [public,gensize] struct {
-               [value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size;
+               [value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
                uint32 major;
                uint32 minor;
                uint32 build;
@@ -735,7 +735,7 @@ import "misc.idl", "security.idl", "winreg.idl";
        } spoolss_OSVersion;
 
        typedef [public,gensize] struct {
-               [value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size;
+               [value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
                uint32 major;
                uint32 minor;
                uint32 build;
@@ -801,7 +801,7 @@ import "misc.idl", "security.idl", "winreg.idl";
                [in] [string,charset(UTF16)] uint16 value_name[],
                [in] spoolss_PrinterDataType type,
                [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
-               [in,value(ndr_size_spoolss_PrinterData(&data,type,flags))] uint32 _offered
+               [in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
        );
 
        /******************/
index eafaf688af270a6c2629f77046927ad887888a24..fdecddc0fcc5090d38f7972c8dfe925cd45c7000 100644 (file)
@@ -103,6 +103,7 @@ 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;
 };
@@ -360,8 +361,8 @@ void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct 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);
-size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push);
+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 *);
 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);
index 12f95a9ceb63df03f084bb704e34924658a13117..c382abba020605e28f94fc4c094de0116e3f2419 100644 (file)
@@ -924,7 +924,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)
+_PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push, struct smb_iconv_convenience *iconv_convenience)
 {
        struct ndr_push *ndr;
        enum ndr_err_code status;
@@ -933,7 +933,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, global_iconv_convenience);
+       ndr = ndr_push_init_ctx(NULL, iconv_convenience);
        if (!ndr) return 0;
        ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;
        status = push(ndr, NDR_SCALARS|NDR_BUFFERS, discard_const(p));
@@ -949,7 +949,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)
+_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)
 {
        struct ndr_push *ndr;
        enum ndr_err_code status;
@@ -958,7 +958,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, global_iconv_convenience);
+       ndr = ndr_push_init_ctx(NULL, iconv_convenience);
        if (!ndr) return 0;
        ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;
 
index 1b32df4c628620656473c5e61183293be1bc0eaf..f6654f7380526ce1132e58f70b0d26a5cee907e7 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, int flags)
+static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
 {
-       size_t s = ndr_size_PAC_INFO(r, level, flags);
+       size_t s = ndr_size_PAC_INFO(r, level, ic, 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, int fl
        }
 }
 
-static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
+static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
 {
-       size_t s = ndr_size_PAC_INFO(r, level, flags);
+       size_t s = ndr_size_PAC_INFO(r, level, ic, 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,0)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_PAC_INFO(r->info,r->type,ndr->iconv_convenience,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(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,0)));
+                                       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_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,0)));
+                                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,ndr->iconv_convenience,0)));
                                }
                        }
                        ndr->flags = _flags_save_PAC_INFO;
@@ -127,7 +127,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,0):r->_ndr_size);
+       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_ptr(ndr, "info", r->info);
        ndr->depth++;
        if (r->info) {
index 898a4287eaaf8e1fc39aadb364c6033db935a18e..8f84c02f911724a66a79d424dd020e5d35e31af3 100644 (file)
 /*
   return the wire size of a security_ace
 */
-size_t ndr_size_security_ace(const struct security_ace *ace, int flags)
+size_t ndr_size_security_ace(const struct security_ace *ace, struct smb_iconv_convenience *ic, int flags)
 {
        size_t ret;
 
        if (!ace) return 0;
 
-       ret = 8 + ndr_size_dom_sid(&ace->trustee, flags);
+       ret = 8 + ndr_size_dom_sid(&ace->trustee, ic, 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 *acl, int flags)
+size_t ndr_size_security_acl(const struct security_acl *acl, struct smb_iconv_convenience *ic, int flags)
 {
        size_t ret;
        int i;
        if (!acl) return 0;
        ret = 8;
        for (i=0;i<acl->num_aces;i++) {
-               ret += ndr_size_security_ace(&acl->aces[i], flags);
+               ret += ndr_size_security_ace(&acl->aces[i], ic, flags);
        }
        return ret;
 }
@@ -106,23 +106,23 @@ size_t ndr_size_security_acl(const struct security_acl *acl, int flags)
 /*
   return the wire size of a security descriptor
 */
-size_t ndr_size_security_descriptor(const struct security_descriptor *sd, int flags)
+size_t ndr_size_security_descriptor(const struct security_descriptor *sd, struct smb_iconv_convenience *ic, int flags)
 {
        size_t ret;
        if (!sd) return 0;
        
        ret = 20;
-       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);
+       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);
        return ret;
 }
 
 /*
   return the wire size of a dom_sid
 */
-size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags)
+size_t ndr_size_dom_sid(const struct dom_sid *sid, struct smb_iconv_convenience *ic, int flags)
 {
        if (!sid) return 0;
        return 8 + 4*sid->num_auths;
index 5c9123a2a84caaca4bd2a279859c43038b7d5253..0a4e44ef0ec256301403c4b768a9c32b76e638e0 100644 (file)
@@ -1558,7 +1558,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);");
+       $self->pidl("return ndr_size_struct($varname, flags, (ndr_push_flags_fn_t)ndr_push_$name, ic);");
 }
 
 sub DeclStruct($$$$)
@@ -1570,7 +1570,7 @@ sub DeclStruct($$$$)
 sub ArgsStructNdrSize($$$)
 {
        my ($d, $name, $varname) = @_;
-       return "const struct $name *$varname, int flags";
+       return "const struct $name *$varname, struct smb_iconv_convenience *ic, int flags";
 }
 
 $typefamily{STRUCT} = {
@@ -1593,7 +1593,7 @@ sub ParseUnionNdrSize($$$)
                $self->pidl("flags |= $flags;");
        }
 
-       $self->pidl("return ndr_size_union($varname, flags, level, (ndr_push_flags_fn_t)ndr_push_$name);");
+       $self->pidl("return ndr_size_union($varname, flags, level, (ndr_push_flags_fn_t)ndr_push_$name, ic);");
 }
 
 sub ParseUnionPushPrimitives($$$$)
@@ -1873,7 +1873,7 @@ sub DeclUnion($$$$)
 sub ArgsUnionNdrSize($$)
 {
        my ($d,$name) = @_;
-       return "const union $name *r, uint32_t level, int flags";
+       return "const union $name *r, uint32_t level, struct smb_iconv_convenience *ic, int flags";
 }
 
 $typefamily{UNION} = {
index cae627f56427b2f6b60aa216232c9da60fda989f..8b0ff71c4ec4a0ac236cfe8e36bb379c4d49f3d2 100644 (file)
@@ -559,7 +559,6 @@ typedef char fstring[FSTRING_LEN];
 #endif
 
 /* Samba 3 doesn't use iconv_convenience: */
-extern void *global_iconv_convenience;
 extern void *cmdline_lp_ctx;
 struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 
index cfac164789003a824497b326761395a829b01b57..22183118e26cda8240d5ff4f6b955383afe7c1cc 100644 (file)
@@ -2279,19 +2279,6 @@ _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool
 _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
 const char *ndr_errstr(enum ndr_err_code err);
 
-/* The following definitions come from librpc/ndr/ndr_sec_helper.c  */
-
-size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags);
-size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags);
-size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
-size_t ndr_size_security_ace(const struct security_ace *ace, int flags);
-size_t ndr_size_security_acl(const struct security_acl *acl, int flags);
-size_t ndr_size_security_descriptor(const struct security_descriptor *sd, int flags);
-void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-
 /* The following definitions come from librpc/ndr/sid.c  */
 
 char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
index 9f5a0c02ba645d831c94589a794b9a60ba4ef2bc..878fac252b06c3b61da5ef65dab47213855fed5a 100644 (file)
@@ -59,7 +59,7 @@ void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, enum security_ace_type type,
 {
        t->type = type;
        t->flags = flag;
-       t->size = ndr_size_dom_sid(sid, 0) + 8;
+       t->size = ndr_size_dom_sid(sid, NULL, 0) + 8;
        t->access_mask = mask;
 
        ZERO_STRUCTP(&t->trustee);
@@ -86,7 +86,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsign
 
        (*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, 0);
+       (*pp_new)[i].size  = SEC_ACE_HEADER_SIZE + ndr_size_dom_sid(sid, NULL, 0);
        (*pp_new)[i].access_mask = mask;
        sid_copy(&(*pp_new)[i].trustee, sid);
        return NT_STATUS_OK;
index 400f5f31b0b98bd00635b128044baea58d71ea80..232bbca43c876d4b62766de73beef013bfb3fc64 100644 (file)
@@ -233,11 +233,11 @@ SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
        }
 
        if (dst->owner_sid != NULL) {
-               offset += ndr_size_dom_sid(dst->owner_sid, 0);
+               offset += ndr_size_dom_sid(dst->owner_sid, NULL, 0);
        }
 
        if (dst->group_sid != NULL) {
-               offset += ndr_size_dom_sid(dst->group_sid, 0);
+               offset += ndr_size_dom_sid(dst->group_sid, NULL, 0);
        }
 
        *sd_size = (size_t)offset;
index 3866ff083fcfd0fa861eecbcdf6e9764e74ff1fd..a1d30f1d2b47431eac6ffaf161f84aa956150a1c 100644 (file)
@@ -190,7 +190,7 @@ SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
        }
 
        if (psd)
-               *psize = ndr_size_security_descriptor(psd, 0);
+               *psize = ndr_size_security_descriptor(psd, NULL, 0);
 
        return psd;
 }
index f656bb13dc8807c582e4471c54ef755a60076cd3..97284afae743f39d44f9138db6787c6e6dcced01 100644 (file)
@@ -382,7 +382,7 @@ bool sid_linearize(char *outbuf, size_t len, const DOM_SID *sid)
 {
        size_t i;
 
-       if (len < ndr_size_dom_sid(sid, 0))
+       if (len < ndr_size_dom_sid(sid, NULL, 0))
                return False;
 
        SCVAL(outbuf,0,sid->sid_rev_num);
@@ -523,7 +523,7 @@ bool non_mappable_sid(DOM_SID *sid)
 char *sid_binstring(const DOM_SID *sid)
 {
        char *buf, *s;
-       int len = ndr_size_dom_sid(sid, 0);
+       int len = ndr_size_dom_sid(sid, NULL, 0);
        buf = (char *)SMB_MALLOC(len);
        if (!buf)
                return NULL;
@@ -541,7 +541,7 @@ char *sid_binstring(const DOM_SID *sid)
 char *sid_binstring_hex(const DOM_SID *sid)
 {
        char *buf, *s;
-       int len = ndr_size_dom_sid(sid, 0);
+       int len = ndr_size_dom_sid(sid, NULL, 0);
        buf = (char *)SMB_MALLOC(len);
        if (!buf)
                return NULL;
index b8221838fa06eea00115cf44452d8174bf58c938..5afc4f4f5adc0d39f0d3cfd057b50ba2700ba35d 100644 (file)
@@ -166,7 +166,6 @@ _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name
        ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss));
 }
 
-void *global_iconv_convenience;
 void *cmdline_lp_ctx;
 struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx)
 {
index 1462aa7a6ab5ec3b3b9ffee14984b64504904c1d..e40dac368d9ae6b5e686dcecdf202b4970ede921 100644 (file)
@@ -150,7 +150,7 @@ bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
        SIVAL(params, 8,0x00000000);
        SIVAL(params,12,0x00000024);
 
-       sid_len = ndr_size_dom_sid(&pqt->sid, 0);
+       sid_len = ndr_size_dom_sid(&pqt->sid, NULL, 0);
        data_len = sid_len+8;
        SIVAL(data, 0, 0x00000000);
        SIVAL(data, 4, sid_len);
@@ -213,7 +213,7 @@ bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
 
        SSVAL(params,0,quota_fnum);
 
-       sid_len = ndr_size_dom_sid(&pqt->sid, 0);
+       sid_len = ndr_size_dom_sid(&pqt->sid, NULL, 0);
        SIVAL(data,0,0);
        SIVAL(data,4,sid_len);
        SBIG_UINT(data, 8,(uint64_t)0);
index b9a67f208e88c30f7e648bfe806f5b2d60b3e37e..53845117e200cfe3aef03037bb9cfeead5dbca93 100644 (file)
@@ -1014,7 +1014,7 @@ static bool fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
 
        memcpy(psid, cache_value.data, MIN(sizeof(*psid), cache_value.length));
        SMB_ASSERT(cache_value.length >= offsetof(struct dom_sid, id_auth));
-       SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, 0));
+       SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, NULL, 0));
 
        return true;
 }
@@ -1028,7 +1028,7 @@ static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
        DATA_BLOB cache_value;
 
        if (!memcache_lookup(NULL, SID_UID_CACHE,
-                            data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
+                            data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
                             &cache_value)) {
                return false;
        }
@@ -1046,11 +1046,11 @@ static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
 void store_uid_sid_cache(const DOM_SID *psid, uid_t uid)
 {
        memcache_add(NULL, SID_UID_CACHE,
-                    data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
+                    data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
                     data_blob_const(&uid, sizeof(uid)));
        memcache_add(NULL, UID_SID_CACHE,
                     data_blob_const(&uid, sizeof(uid)),
-                    data_blob_const(psid, ndr_size_dom_sid(psid, 0)));
+                    data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)));
 }
 
 /*****************************************************************
@@ -1069,7 +1069,7 @@ static bool fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
 
        memcpy(psid, cache_value.data, MIN(sizeof(*psid), cache_value.length));
        SMB_ASSERT(cache_value.length >= offsetof(struct dom_sid, id_auth));
-       SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, 0));
+       SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, NULL, 0));
 
        return true;
 }
@@ -1083,7 +1083,7 @@ static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
        DATA_BLOB cache_value;
 
        if (!memcache_lookup(NULL, SID_UID_CACHE,
-                            data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
+                            data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
                             &cache_value)) {
                return false;
        }
@@ -1101,11 +1101,11 @@ static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
 void store_gid_sid_cache(const DOM_SID *psid, gid_t gid)
 {
        memcache_add(NULL, SID_GID_CACHE,
-                    data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
+                    data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
                     data_blob_const(&gid, sizeof(gid)));
        memcache_add(NULL, GID_SID_CACHE,
                     data_blob_const(&gid, sizeof(gid)),
-                    data_blob_const(psid, ndr_size_dom_sid(psid, 0)));
+                    data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)));
 }
 
 /*****************************************************************
index 3a81f27ad683a817034dc7a96164276f9e2432d7..ac3817b94a8f43255a9825c09b72378e71f0135f 100644 (file)
@@ -435,7 +435,7 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
 
        /* store it back */
        
-       sd_size = ndr_size_security_descriptor(sd_store->sd, 0)
+       sd_size = ndr_size_security_descriptor(sd_store->sd, NULL, 0)
                + sizeof(SEC_DESC_BUF);
        if ( !prs_init(&ps, sd_size, ctx, MARSHALL) ) {
                DEBUG(0,("sec_desc_upg_fn: Failed to allocate prs memory for %s\n", key.dptr ));
@@ -5477,7 +5477,8 @@ WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr)
        /* Store the security descriptor in a tdb */
 
        if (!prs_init(&ps,
-               (uint32)ndr_size_security_descriptor(new_secdesc_ctr->sd, 0)
+               (uint32_t)ndr_size_security_descriptor(new_secdesc_ctr->sd, 
+                                                    NULL, 0)
                + sizeof(SEC_DESC_BUF), mem_ctx, MARSHALL) ) {
                status = WERR_NOMEM;
                goto out;
@@ -5630,7 +5631,7 @@ bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **s
 
                /* Save default security descriptor for later */
 
-               if (!prs_init(&ps, (uint32)ndr_size_security_descriptor((*secdesc_ctr)->sd, 0) +
+               if (!prs_init(&ps, (uint32_t)ndr_size_security_descriptor((*secdesc_ctr)->sd, NULL, 0) +
                        sizeof(SEC_DESC_BUF), ctx, MARSHALL))
                        return False;
 
index 30ad3d9751fb07b045dcd765325fc1a4f908f735..a5f3935821b4827364942d54bbbe930083fb77af 100644 (file)
@@ -436,7 +436,7 @@ WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
                return err;
        }
 
-       *secdescsize = ndr_size_security_descriptor(secdesc, 0);
+       *secdescsize = ndr_size_security_descriptor(secdesc, NULL, 0);
        TALLOC_FREE(mem_ctx);
 
        *last_changed_time = 0;
index b6e822955c5d6ddec17d514406877ae20b140dca..5395f225f18fa2e8e74438c4b08fcf3a043847df 100644 (file)
@@ -1553,7 +1553,7 @@ static uint32 sk_record_data_size( SEC_DESC * sd )
 
        /* the record size is sizeof(hdr) + name + static members + data_size_field */
 
-       size = sizeof(uint32)*5 + ndr_size_security_descriptor(sd, 0) + sizeof(uint32);
+       size = sizeof(uint32)*5 + ndr_size_security_descriptor(sd, NULL, 0) + sizeof(uint32);
 
        /* multiple of 8 */
        size_mod8 = size & 0xfffffff8;
@@ -1783,7 +1783,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 )
                        nk->sec_desc->ref_count = 0;
                        
                        /* size value must be self-inclusive */
-                       nk->sec_desc->size      = ndr_size_security_descriptor(sec_desc, 0)
+                       nk->sec_desc->size      = ndr_size_security_descriptor(sec_desc, NULL, 0)
                                + sizeof(uint32);
 
                        DLIST_ADD_END( file->sec_desc_list, nk->sec_desc, REGF_SK_REC *);
index 63a73c4b7c7df347ef8f6b9e1c82ba7bab22d2a0..b5177cc6343e754d545c6b863e398b4b80e5b23c 100644 (file)
@@ -439,7 +439,7 @@ bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC
                }
                
                if (*secdesc != NULL) {
-                       buffer->string_at_end -= ndr_size_security_descriptor(*secdesc, 0);
+                       buffer->string_at_end -= ndr_size_security_descriptor(*secdesc, NULL, 0);
 
                        if(!prs_set_offset(ps, buffer->string_at_end))
                                return False;
index c71b31086a4dde832c7396879ffc4a729df1d93d..23c96103811eb19cd77bbd01e5856d9da53cacba 100644 (file)
@@ -275,14 +275,14 @@ bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
 
                if (psd->owner_sid != NULL) {
                        off_owner_sid = offset;
-                       offset += ndr_size_dom_sid(psd->owner_sid, 0);
+                       offset += ndr_size_dom_sid(psd->owner_sid, NULL, 0);
                } else {
                        off_owner_sid = 0;
                }
 
                if (psd->group_sid != NULL) {
                        off_grp_sid = offset;
-                       offset += ndr_size_dom_sid(psd->group_sid, 0);
+                       offset += ndr_size_dom_sid(psd->group_sid, NULL, 0);
                } else {
                        off_grp_sid = 0;
                }
@@ -410,7 +410,7 @@ bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int
        if(!prs_uint32    ("ptr  ", ps, depth, &ptr))
                return False;
 
-       len = ndr_size_security_descriptor(psdb->sd, 0);
+       len = ndr_size_security_descriptor(psdb->sd, NULL, 0);
        if(!prs_uint32_pre("len    ", ps, depth, &len, &off_len))
                return False;
 
index 78a80a019b173c7ba95d1bf0027855ee407efc0e..3fe0c3a41688c313bb0b0931ca6316a4e16e1b7c 100644 (file)
@@ -3103,7 +3103,7 @@ uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info)
                
        size += 4;
        
-       size += ndr_size_security_descriptor( info->secdesc, 0 );
+       size += ndr_size_security_descriptor( info->secdesc, NULL, 0 );
 
        size+=size_of_device_mode( info->devmode );
        
@@ -3190,7 +3190,7 @@ return the size required by a struct in the stream
 uint32 spoolss_size_printer_info_3(PRINTER_INFO_3 *info)
 {
        /* The 8 is for the self relative pointer - 8 byte aligned.. */
-       return 8 + (uint32)ndr_size_security_descriptor( info->secdesc, 0 );
+       return 8 + (uint32)ndr_size_security_descriptor( info->secdesc, NULL, 0 );
 }
 
 /*******************************************************************
index 15af963c4c68191e5f572516c36c3ea46cd30c45..a37e55270e16f8530537311d0d9c1d9476b0fa61 100644 (file)
@@ -2106,7 +2106,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
                goto error_exit;
        }
 
-       sd_size = ndr_size_security_descriptor(psd, 0);
+       sd_size = ndr_size_security_descriptor(psd, NULL, 0);
 
        sd_buf = TALLOC_ZERO_P(p->mem_ctx, struct sec_desc_buf);
        if (!sd_buf) {
index 6692160ba2c16d65c47fe9d5c368fd328daa29b0..187fb368e2032b98c91a7c45116108aa5193db5a 100644 (file)
@@ -688,7 +688,7 @@ WERROR _svcctl_QueryServiceConfigW(pipes_struct *p,
        if ( !W_ERROR_IS_OK(wresult) )
                return wresult;
 
-       buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, 0);
+       buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, NULL, 0);
        *r->out.bytes_needed = (buffer_size > r->in.buf_size) ? buffer_size : r->in.buf_size;
 
         if (buffer_size > r->in.buf_size ) {
@@ -838,7 +838,7 @@ WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p,
        if ( !(sec_desc = svcctl_get_secdesc( p->mem_ctx, info->name, get_root_nt_token() )) )
                 return WERR_NOMEM;
 
-       *r->out.needed = ndr_size_security_descriptor( sec_desc, 0 );
+       *r->out.needed = ndr_size_security_descriptor( sec_desc, NULL, 0 );
 
        if ( *r->out.needed > r->in.buffer_size ) {
                ZERO_STRUCTP( &r->out.buffer );
index a793e614afffaea509d13a7f6970066fe6b81113..3f33237f18979f429609134c572426766ad83c93 100644 (file)
@@ -1655,7 +1655,7 @@ static void call_nt_transact_query_security_desc(connection_struct *conn,
            security_info_wanted & DACL_SECURITY_INFORMATION)
                psd->type |= SEC_DESC_DACL_PRESENT;
 
-       sd_size = ndr_size_security_descriptor(psd, 0);
+       sd_size = ndr_size_security_descriptor(psd, NULL, 0);
 
        DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %lu.\n",(unsigned long)sd_size));
 
index 5abfffd61886980c4cd63c0865ff6ad3cf5c2289..390b166f5f0d144b21cec75739fa36babe26c64d 100644 (file)
@@ -3071,6 +3071,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                             i < conn->server_info->ptok->num_sids; ++i) {
                                sid_bytes += ndr_size_dom_sid(
                                        &conn->server_info->ptok->user_sids[i],
+                                       NULL, 
                                        0);
                        }
 
@@ -3093,6 +3094,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                            i < conn->server_info->ptok->num_sids; ++i) {
                                int sid_len = ndr_size_dom_sid(
                                        &conn->server_info->ptok->user_sids[i],
+                                       NULL,
                                        0);
 
                                sid_linearize(pdata + data_len, sid_len,
index 68984329635022dfa81f885c16307aefe4b6d073..55ecf8968bf4963f4b79639528cf5827753872f6 100644 (file)
@@ -182,8 +182,10 @@ showflags::
        @echo '  MDLD_FLAGS = $(MDLD_FLAGS)'
        @echo '  SHLIBEXT   = $(SHLIBEXT)'
 
+base_srcdirs = $(srcdir) ../librpc/ ../lib/ ../libcli
+
 etags:
-       etags `find $(srcdir) -name "*.[ch]"`
+       etags `find $(base_srcdirs) -name "*.[ch]"`
 
 ctags:
-       ctags `find $(srcdir) -name "*.[ch]"`
+       ctags `find $(base_srcdirs) -name "*.[ch]"`
index 13432d86f6e5573dc0913bf8c18c2064ce84f07e..0ec05e891cbb6880e836fec30f3fcabf9c1a0833 100644 (file)
@@ -164,7 +164,7 @@ interface wrepl
        } wrepl_packet;
 
        typedef [flag(NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
-               [value(ndr_size_wrepl_packet(&packet, ndr->flags))] uint32 size;
+               [value(ndr_size_wrepl_packet(&packet, ndr->iconv_convenience, ndr->flags))] uint32 size;
                wrepl_packet    packet;
        } wrepl_wrap;
 
index f42e3678b0e77ac8626823ec04af33ff10d0be89..335275f6805c9e52c60458c7efa655f9199bba5e 100644 (file)
@@ -525,8 +525,8 @@ enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flag
        return NDR_ERR_SUCCESS;
 }
 
-uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, uint32_t flags)
+uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags)
 {
        if (!devmode) return 0;
-       return ndr_size_spoolss_DeviceMode(devmode,flags);
+       return ndr_size_spoolss_DeviceMode(devmode,ic,flags);
 }
index a5b17f0405dab1fd86e533cbba1a2c40d49d12bd..45c4e78cf10022a6ecfa7bfd4a0aba4922b0dc69 100644 (file)
@@ -1051,7 +1051,7 @@ static void dcerpc_ship_next_request(struct dcerpc_connection *c)
        if (req->object) {
                pkt.u.request.object.object = *req->object;
                pkt.pfc_flags |= DCERPC_PFC_FLAG_OBJECT_UUID;
-               chunk_size -= ndr_size_GUID(req->object,0);
+               chunk_size -= ndr_size_GUID(req->object,NULL,0);
        }
 
        /* we send a series of pdus without waiting for a reply */
index a183ccb9f0cbabad4e81c469f98b5f7ffd24e620..d041d79b3e4c8acdd4622373d2161382951450ad 100644 (file)
@@ -35,11 +35,11 @@ enum spoolss_handle {
        SPOOLSS_NOTIFY
 };
 
-#define SPOOLSS_BUFFER_UNION(fn,info,level) \
-       ((info)?ndr_size_##fn(info, level, 0):0)
+#define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
+       ((info)?ndr_size_##fn(info, level, ic, 0):0)
 
-#define SPOOLSS_BUFFER_UNION_ARRAY(fn,info,level,count) \
-       ((info)?ndr_size_##fn##_info(dce_call, lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx), level, count, info):0)
+#define SPOOLSS_BUFFER_UNION_ARRAY(fn,ic,info,level,count) \
+       ((info)?ndr_size_##fn##_info(dce_call, ic, level, count, info):0)
 
 #define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= r->out.needed)?val_true:val_false)
 
@@ -235,6 +235,7 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
 {
        struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
 
        status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
        W_ERROR_NOT_OK_RETURN(status);
@@ -242,7 +243,7 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
        status = ntptr_EnumPrinters(ntptr, mem_ctx, r);
        W_ERROR_NOT_OK_RETURN(status);
 
-       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, r->out.info, r->in.level, r->out.count);
+       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, r->out.info, r->in.level, r->out.count);
        r->out.info     = SPOOLSS_BUFFER_OK(r->out.info, NULL);
        r->out.count    = SPOOLSS_BUFFER_OK(r->out.count, 0);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -370,6 +371,7 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
 {
        struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
 
        status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
        W_ERROR_NOT_OK_RETURN(status);
@@ -377,7 +379,7 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
        status = ntptr_EnumPrinterDrivers(ntptr, mem_ctx, r);
        W_ERROR_NOT_OK_RETURN(status);
 
-       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, r->out.info, r->in.level, r->out.count);
+       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, r->out.info, r->in.level, r->out.count);
        r->out.info     = SPOOLSS_BUFFER_OK(r->out.info, NULL);
        r->out.count    = SPOOLSS_BUFFER_OK(r->out.count, 0);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -402,6 +404,7 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
 {
        struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
 
        status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
        W_ERROR_NOT_OK_RETURN(status);
@@ -409,7 +412,7 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
        status = ntptr_GetPrinterDriverDirectory(ntptr, mem_ctx, r);
        W_ERROR_NOT_OK_RETURN(status);
 
-       r->out.needed   = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, r->out.info, r->in.level);
+       r->out.needed   = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, ic, r->out.info, r->in.level);
        r->out.info     = SPOOLSS_BUFFER_OK(r->out.info, NULL);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
 }
@@ -554,6 +557,7 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
        struct ntptr_GenericHandle *handle;
        struct dcesrv_handle *h;
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
 
        DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
        handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -571,7 +575,7 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
 
        W_ERROR_NOT_OK_RETURN(status);
 
-       r->out.needed   = ndr_size_spoolss_PrinterData(&r->out.data, r->out.type, 0);
+       r->out.needed   = ndr_size_spoolss_PrinterData(&r->out.data, r->out.type, ic, 0);
        r->out.type     = SPOOLSS_BUFFER_OK(r->out.type, SPOOLSS_PRINTER_DATA_TYPE_NULL);
        r->out.data     = SPOOLSS_BUFFER_OK(r->out.data, r->out.data);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_MORE_DATA);
@@ -691,6 +695,7 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
        struct ntptr_GenericHandle *handle;
        struct dcesrv_handle *h;
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
 
        DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
        handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -711,7 +716,7 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
                        return WERR_FOOBAR;
        }
 
-       r->out.needed   = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, r->out.info, r->in.level);
+       r->out.needed   = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, ic, r->out.info, r->in.level);
        r->out.info     = SPOOLSS_BUFFER_OK(r->out.info, NULL);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
 }
@@ -758,6 +763,7 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
        struct ntptr_GenericHandle *handle;
        struct dcesrv_handle *h;
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
 
        DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
        handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -777,7 +783,7 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
                        return WERR_FOOBAR;
        }
 
-       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, r->out.info, r->in.level, r->out.count);
+       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, r->out.info, r->in.level, r->out.count);
        r->out.info     = SPOOLSS_BUFFER_OK(r->out.info, NULL);
        r->out.count    = SPOOLSS_BUFFER_OK(r->out.count, 0);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -792,6 +798,7 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
 {
        struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
 
        status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
        W_ERROR_NOT_OK_RETURN(status);
@@ -799,7 +806,7 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
        status = ntptr_EnumPorts(ntptr, mem_ctx, r);
        W_ERROR_NOT_OK_RETURN(status);
 
-       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, r->out.info, r->in.level, r->out.count);
+       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, r->out.info, r->in.level, r->out.count);
        r->out.info     = SPOOLSS_BUFFER_OK(r->out.info, NULL);
        r->out.count    = SPOOLSS_BUFFER_OK(r->out.count, 0);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -814,6 +821,7 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
 {
        struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
        WERROR status;
+       struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
 
        status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
        W_ERROR_NOT_OK_RETURN(status);
@@ -821,7 +829,7 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
        status = ntptr_EnumMonitors(ntptr, mem_ctx, r);
        W_ERROR_NOT_OK_RETURN(status);
 
-       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, r->out.info, r->in.level, r->out.count);
+       r->out.needed   = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, r->out.info, r->in.level, r->out.count);
        r->out.info     = SPOOLSS_BUFFER_OK(r->out.info, NULL);
        r->out.count    = SPOOLSS_BUFFER_OK(r->out.count, 0);
        return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
index c6b3491cdb29b9441302c53ae541d7ab90947e86..55a438cb659a1032f922167cc36faebc4b2666a3 100755 (executable)
@@ -129,7 +129,7 @@ if opts.interactive:
                else:
                        print "%s: " % (prompt,),
                return sys.stdin.readline().rstrip("\n") or default
-       opts.realm = ask("Realm", socket.gethostname().split(".", 1)[1].upper())
+       opts.realm = ask("Realm", socket.getfqdn().split(".", 1)[1].upper())
        opts.domain = ask("Domain", opts.realm.split(".")[0])
        opts.server_role = ask("Server Role (dc, member, standalone)", "dc")
        for i in range(3):