summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/ndr_netlogon.c6
-rw-r--r--librpc/gen_ndr/cli_netlogon.c2
-rw-r--r--librpc/gen_ndr/cli_netlogon.h2
-rw-r--r--librpc/gen_ndr/drsblobs.h12
-rw-r--r--librpc/gen_ndr/drsuapi.h10
-rw-r--r--librpc/gen_ndr/epmapper.h2
-rw-r--r--librpc/gen_ndr/named_pipe_auth.h4
-rw-r--r--librpc/gen_ndr/nbt.h2
-rw-r--r--librpc/gen_ndr/ndr_drsblobs.c62
-rw-r--r--librpc/gen_ndr/ndr_drsblobs.h8
-rw-r--r--librpc/gen_ndr/ndr_drsuapi.c40
-rw-r--r--librpc/gen_ndr/ndr_drsuapi.h10
-rw-r--r--librpc/gen_ndr/ndr_epmapper.c8
-rw-r--r--librpc/gen_ndr/ndr_krb5pac.c4
-rw-r--r--librpc/gen_ndr/ndr_krb5pac.h2
-rw-r--r--librpc/gen_ndr/ndr_misc.c4
-rw-r--r--librpc/gen_ndr/ndr_misc.h2
-rw-r--r--librpc/gen_ndr/ndr_named_pipe_auth.c16
-rw-r--r--librpc/gen_ndr/ndr_named_pipe_auth.h4
-rw-r--r--librpc/gen_ndr/ndr_nbt.c12
-rw-r--r--librpc/gen_ndr/ndr_nbt.h2
-rw-r--r--librpc/gen_ndr/ndr_netlogon.c12
-rw-r--r--librpc/gen_ndr/ndr_netlogon.h2
-rw-r--r--librpc/gen_ndr/ndr_security.c12
-rw-r--r--librpc/gen_ndr/ndr_security.h8
-rw-r--r--librpc/gen_ndr/ndr_svcctl.c4
-rw-r--r--librpc/gen_ndr/ndr_svcctl.h2
-rw-r--r--librpc/gen_ndr/netlogon.h2
-rw-r--r--librpc/gen_ndr/security.h6
-rw-r--r--librpc/idl/drsblobs.idl12
-rw-r--r--librpc/idl/drsuapi.idl10
-rw-r--r--librpc/idl/epmapper.idl2
-rw-r--r--librpc/idl/named_pipe_auth.idl4
-rw-r--r--librpc/idl/nbt.idl2
-rw-r--r--librpc/idl/netlogon.idl2
-rw-r--r--librpc/idl/security.idl6
-rw-r--r--librpc/idl/spoolss.idl8
-rw-r--r--librpc/ndr/libndr.h5
-rw-r--r--librpc/ndr/ndr.c8
-rw-r--r--librpc/ndr/ndr_krb5pac.c16
-rw-r--r--librpc/ndr/ndr_sec_helper.c20
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm8
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/proto.h13
-rw-r--r--source3/lib/secace.c4
-rw-r--r--source3/lib/secdesc.c4
-rw-r--r--source3/lib/sharesec.c2
-rw-r--r--source3/lib/util_sid.c6
-rw-r--r--source3/librpc/ndr/util.c1
-rw-r--r--source3/libsmb/cliquota.c4
-rw-r--r--source3/passdb/lookup_sid.c16
-rw-r--r--source3/printing/nt_printing.c7
-rw-r--r--source3/registry/reg_api.c2
-rw-r--r--source3/registry/regfio.c4
-rw-r--r--source3/rpc_parse/parse_buffer.c2
-rw-r--r--source3/rpc_parse/parse_sec.c6
-rw-r--r--source3/rpc_parse/parse_spoolss.c4
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c2
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c4
-rw-r--r--source3/smbd/nttrans.c2
-rw-r--r--source3/smbd/trans2.c2
-rw-r--r--source4/build/make/rules.mk6
-rw-r--r--source4/librpc/idl/winsrepl.idl2
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c4
-rw-r--r--source4/librpc/rpc/dcerpc.c2
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c32
-rwxr-xr-xsource4/setup/provision2
67 files changed, 249 insertions, 250 deletions
diff --git a/libcli/ndr_netlogon.c b/libcli/ndr_netlogon.c
index ffc075fab2..0354cfb592 100644
--- a/libcli/ndr_netlogon.c
+++ b/libcli/ndr_netlogon.c
@@ -137,12 +137,12 @@ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags(struct ndr_
NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site));
NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site));
if (r->nt_version & NETLOGON_NT_VERSION_5EX_WITH_IP) {
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->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) {
diff --git a/librpc/gen_ndr/cli_netlogon.c b/librpc/gen_ndr/cli_netlogon.c
index d8a9ef304f..2dcdbaeb9b 100644
--- a/librpc/gen_ndr/cli_netlogon.c
+++ b/librpc/gen_ndr/cli_netlogon.c
@@ -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;
diff --git a/librpc/gen_ndr/cli_netlogon.h b/librpc/gen_ndr/cli_netlogon.h
index ac704484d1..dd086a908a 100644
--- a/librpc/gen_ndr/cli_netlogon.h
+++ b/librpc/gen_ndr/cli_netlogon.h
@@ -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,
diff --git a/librpc/gen_ndr/drsblobs.h b/librpc/gen_ndr/drsblobs.h
index f8fd304d3d..bb33464c76 100644
--- a/librpc/gen_ndr/drsblobs.h
+++ b/librpc/gen_ndr/drsblobs.h
@@ -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 {
diff --git a/librpc/gen_ndr/drsuapi.h b/librpc/gen_ndr/drsuapi.h
index ba01e8f226..e3d480365e 100644
--- a/librpc/gen_ndr/drsuapi.h
+++ b/librpc/gen_ndr/drsuapi.h
@@ -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;
diff --git a/librpc/gen_ndr/epmapper.h b/librpc/gen_ndr/epmapper.h
index 4b75261a02..e5155a8cad 100644
--- a/librpc/gen_ndr/epmapper.h
+++ b/librpc/gen_ndr/epmapper.h
@@ -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)] */
};
diff --git a/librpc/gen_ndr/named_pipe_auth.h b/librpc/gen_ndr/named_pipe_auth.h
index 8f2446e564..7ca7444c92 100644
--- a/librpc/gen_ndr/named_pipe_auth.h
+++ b/librpc/gen_ndr/named_pipe_auth.h
@@ -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)] */
diff --git a/librpc/gen_ndr/nbt.h b/librpc/gen_ndr/nbt.h
index a8c66a6795..1f3ad37d9b 100644
--- a/librpc/gen_ndr/nbt.h
+++ b/librpc/gen_ndr/nbt.h
@@ -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;
diff --git a/librpc/gen_ndr/ndr_drsblobs.c b/librpc/gen_ndr/ndr_drsblobs.c
index c868c39ecd..72e182d3ff 100644
--- a/librpc/gen_ndr/ndr_drsblobs.c
+++ b/librpc/gen_ndr/ndr_drsblobs.c
@@ -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--;
}
diff --git a/librpc/gen_ndr/ndr_drsblobs.h b/librpc/gen_ndr/ndr_drsblobs.h
index 09c4b7ff61..2f6cf991d6 100644
--- a/librpc/gen_ndr/ndr_drsblobs.h
+++ b/librpc/gen_ndr/ndr_drsblobs.h
@@ -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);
diff --git a/librpc/gen_ndr/ndr_drsuapi.c b/librpc/gen_ndr/ndr_drsuapi.c
index 3ef5b8024d..369a1d44e0 100644
--- a/librpc/gen_ndr/ndr_drsuapi.c
+++ b/librpc/gen_ndr/ndr_drsuapi.c
@@ -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)
diff --git a/librpc/gen_ndr/ndr_drsuapi.h b/librpc/gen_ndr/ndr_drsuapi.h
index 168854b337..f7cb768ccc 100644
--- a/librpc/gen_ndr/ndr_drsuapi.h
+++ b/librpc/gen_ndr/ndr_drsuapi.h
@@ -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);
diff --git a/librpc/gen_ndr/ndr_epmapper.c b/librpc/gen_ndr/ndr_epmapper.c
index e06bf7f3aa..ad1c66ce1f 100644
--- a/librpc/gen_ndr/ndr_epmapper.c
+++ b/librpc/gen_ndr/ndr_epmapper.c
@@ -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--;
}
diff --git a/librpc/gen_ndr/ndr_krb5pac.c b/librpc/gen_ndr/ndr_krb5pac.c
index 06abe91fc3..27025c0202 100644
--- a/librpc/gen_ndr/ndr_krb5pac.c
+++ b/librpc/gen_ndr/ndr_krb5pac.c
@@ -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)
diff --git a/librpc/gen_ndr/ndr_krb5pac.h b/librpc/gen_ndr/ndr_krb5pac.h
index 8ab6b6a0fa..072468ba5d 100644
--- a/librpc/gen_ndr/ndr_krb5pac.h
+++ b/librpc/gen_ndr/ndr_krb5pac.h
@@ -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);
diff --git a/librpc/gen_ndr/ndr_misc.c b/librpc/gen_ndr/ndr_misc.c
index dbe5cdd60e..83c977245a 100644
--- a/librpc/gen_ndr/ndr_misc.c
+++ b/librpc/gen_ndr/ndr_misc.c
@@ -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)
diff --git a/librpc/gen_ndr/ndr_misc.h b/librpc/gen_ndr/ndr_misc.h
index 101aa8ad84..a38b3c9948 100644
--- a/librpc/gen_ndr/ndr_misc.h
+++ b/librpc/gen_ndr/ndr_misc.h
@@ -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);
diff --git a/librpc/gen_ndr/ndr_named_pipe_auth.c b/librpc/gen_ndr/ndr_named_pipe_auth.c
index 2377964570..88ad449878 100644
--- a/librpc/gen_ndr/ndr_named_pipe_auth.c
+++ b/librpc/gen_ndr/ndr_named_pipe_auth.c
@@ -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);
}
diff --git a/librpc/gen_ndr/ndr_named_pipe_auth.h b/librpc/gen_ndr/ndr_named_pipe_auth.h
index 2a4f689ab9..857c2bcd9b 100644
--- a/librpc/gen_ndr/ndr_named_pipe_auth.h
+++ b/librpc/gen_ndr/ndr_named_pipe_auth.h
@@ -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 */
diff --git a/librpc/gen_ndr/ndr_nbt.c b/librpc/gen_ndr/ndr_nbt.c
index 435bebe091..8fcd94ccc1 100644
--- a/librpc/gen_ndr/ndr_nbt.c
+++ b/librpc/gen_ndr/ndr_nbt.c
@@ -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);
diff --git a/librpc/gen_ndr/ndr_nbt.h b/librpc/gen_ndr/ndr_nbt.h
index c7eb8f78a0..7066d31c60 100644
--- a/librpc/gen_ndr/ndr_nbt.h
+++ b/librpc/gen_ndr/ndr_nbt.h
@@ -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);
diff --git a/librpc/gen_ndr/ndr_netlogon.c b/librpc/gen_ndr/ndr_netlogon.c
index b3894f897c..050ee24ed5 100644
--- a/librpc/gen_ndr/ndr_netlogon.c
+++ b/librpc/gen_ndr/ndr_netlogon.c
@@ -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) {
diff --git a/librpc/gen_ndr/ndr_netlogon.h b/librpc/gen_ndr/ndr_netlogon.h
index 96c487f170..f88310f870 100644
--- a/librpc/gen_ndr/ndr_netlogon.h
+++ b/librpc/gen_ndr/ndr_netlogon.h
@@ -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);
diff --git a/librpc/gen_ndr/ndr_security.c b/librpc/gen_ndr/ndr_security.c
index 27aef3e06a..64c134dcb8 100644
--- a/librpc/gen_ndr/ndr_security.c
+++ b/librpc/gen_ndr/ndr_security.c
@@ -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) {
diff --git a/librpc/gen_ndr/ndr_security.h b/librpc/gen_ndr/ndr_security.h
index 8cf7bf3eea..eddd3c3507 100644
--- a/librpc/gen_ndr/ndr_security.h
+++ b/librpc/gen_ndr/ndr_security.h
@@ -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);
diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c
index 1cab496c8d..590d493092 100644
--- a/librpc/gen_ndr/ndr_svcctl.c
+++ b/librpc/gen_ndr/ndr_svcctl.c
@@ -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)
diff --git a/librpc/gen_ndr/ndr_svcctl.h b/librpc/gen_ndr/ndr_svcctl.h
index 06b807bc7d..595a98041b 100644
--- a/librpc/gen_ndr/ndr_svcctl.h
+++ b/librpc/gen_ndr/ndr_svcctl.h
@@ -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);
diff --git a/librpc/gen_ndr/netlogon.h b/librpc/gen_ndr/netlogon.h
index c0507b1e2d..74f5c2b801 100644
--- a/librpc/gen_ndr/netlogon.h
+++ b/librpc/gen_ndr/netlogon.h
@@ -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;
diff --git a/librpc/gen_ndr/security.h b/librpc/gen_ndr/security.h
index 2b422608ea..4fa9a8084c 100644
--- a/librpc/gen_ndr/security.h
+++ b/librpc/gen_ndr/security.h
@@ -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] */;
diff --git a/librpc/idl/drsblobs.idl b/librpc/idl/drsblobs.idl
index 087f0c982d..7e9c2fe9bb 100644
--- a/librpc/idl/drsblobs.idl
+++ b/librpc/idl/drsblobs.idl
@@ -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(
diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl
index e4b5dc1fd9..9e1f17b61d 100644
--- a/librpc/idl/drsuapi.idl
+++ b/librpc/idl/drsuapi.idl
@@ -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 */
diff --git a/librpc/idl/epmapper.idl b/librpc/idl/epmapper.idl
index ea04878094..0a110a1780 100644
--- a/librpc/idl/epmapper.idl
+++ b/librpc/idl/epmapper.idl
@@ -216,7 +216,7 @@ interface epmapper
} epm_tower;
typedef struct {
- [value(ndr_size_epm_tower(&tower, ndr->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;
diff --git a/librpc/idl/named_pipe_auth.idl b/librpc/idl/named_pipe_auth.idl
index 7d85eba9eb..3bd723e6db 100644
--- a/librpc/idl/named_pipe_auth.idl
+++ b/librpc/idl/named_pipe_auth.idl
@@ -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;
diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl
index f3590fcf2b..9cefff7371 100644
--- a/librpc/idl/nbt.idl
+++ b/librpc/idl/nbt.idl
@@ -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 */
diff --git a/librpc/idl/netlogon.idl b/librpc/idl/netlogon.idl
index 3b9d8bf443..532678eea2 100644
--- a/librpc/idl/netlogon.idl
+++ b/librpc/idl/netlogon.idl
@@ -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
);
diff --git a/librpc/idl/security.idl b/librpc/idl/security.idl
index 223a92faad..caad08e954 100644
--- a/librpc/idl/security.idl
+++ b/librpc/idl/security.idl
@@ -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;
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 6b4b0b8a16..5fdea81575 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -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
);
/******************/
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index eafaf688af..fdecddc0fc 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -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);
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 12f95a9ceb..c382abba02 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -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;
diff --git a/librpc/ndr/ndr_krb5pac.c b/librpc/ndr/ndr_krb5pac.c
index 1b32df4c62..f6654f7380 100644
--- a/librpc/ndr/ndr_krb5pac.c
+++ b/librpc/ndr/ndr_krb5pac.c
@@ -23,9 +23,9 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_krb5pac.h"
-static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, 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) {
diff --git a/librpc/ndr/ndr_sec_helper.c b/librpc/ndr/ndr_sec_helper.c
index 898a4287ea..8f84c02f91 100644
--- a/librpc/ndr/ndr_sec_helper.c
+++ b/librpc/ndr/ndr_sec_helper.c
@@ -30,13 +30,13 @@
/*
return the wire size of a security_ace
*/
-size_t ndr_size_security_ace(const struct security_ace *ace, 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;
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 5c9123a2a8..0a4e44ef0e 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -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} = {
diff --git a/source3/include/includes.h b/source3/include/includes.h
index cae627f564..8b0ff71c4e 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -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);
diff --git a/source3/include/proto.h b/source3/include/proto.h
index cfac164789..22183118e2 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
diff --git a/source3/lib/secace.c b/source3/lib/secace.c
index 9f5a0c02ba..878fac252b 100644
--- a/source3/lib/secace.c
+++ b/source3/lib/secace.c
@@ -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;
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c
index 400f5f31b0..232bbca43c 100644
--- a/source3/lib/secdesc.c
+++ b/source3/lib/secdesc.c
@@ -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;
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c
index 3866ff083f..a1d30f1d2b 100644
--- a/source3/lib/sharesec.c
+++ b/source3/lib/sharesec.c
@@ -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;
}
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index f656bb13dc..97284afae7 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -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;
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/util.c
index b8221838fa..5afc4f4f5a 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/util.c
@@ -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)
{
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index 1462aa7a6a..e40dac368d 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -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);
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index b9a67f208e..53845117e2 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -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)));
}
/*****************************************************************
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 3a81f27ad6..ac3817b94a 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -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;
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 30ad3d9751..a5f3935821 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -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;
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index b6e822955c..5395f225f1 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -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 *);
diff --git a/source3/rpc_parse/parse_buffer.c b/source3/rpc_parse/parse_buffer.c
index 63a73c4b7c..b5177cc634 100644
--- a/source3/rpc_parse/parse_buffer.c
+++ b/source3/rpc_parse/parse_buffer.c
@@ -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;
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index c71b31086a..23c9610381 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -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;
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 78a80a019b..3fe0c3a416 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -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 );
}
/*******************************************************************
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 15af963c4c..a37e55270e 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -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) {
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 6692160ba2..187fb368e2 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -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 );
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index a793e614af..3f33237f18 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -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));
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 5abfffd618..390b166f5f 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -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,
diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk
index 6898432963..55ecf8968b 100644
--- a/source4/build/make/rules.mk
+++ b/source4/build/make/rules.mk
@@ -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]"`
diff --git a/source4/librpc/idl/winsrepl.idl b/source4/librpc/idl/winsrepl.idl
index 13432d86f6..0ec05e891c 100644
--- a/source4/librpc/idl/winsrepl.idl
+++ b/source4/librpc/idl/winsrepl.idl
@@ -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;
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index f42e3678b0..335275f680 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -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);
}
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index a5b17f0405..45c4e78cf1 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -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 */
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index a183ccb9f0..d041d79b3e 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -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);
diff --git a/source4/setup/provision b/source4/setup/provision
index c6b3491cdb..55a438cb65 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -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):