summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-05-09 17:20:01 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-05-18 11:45:30 +0200
commitf9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d (patch)
tree9a0a6cb6617d855c28eb891396898096c4214e88 /source4/rpc_server
parente9f5bdf6b5a1aeb7e2e556cf41f7cbc2abed7856 (diff)
downloadsamba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.tar.gz
samba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.tar.bz2
samba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.zip
Finish removal of iconv_convenience in public API's.
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcerpc_server.c14
-rw-r--r--source4/rpc_server/dcesrv_auth.c8
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c3
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c13
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c3
-rw-r--r--source4/rpc_server/service_rpc.c16
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c32
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c2
8 files changed, 32 insertions, 59 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 0b0e3f22b6..774309996d 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -486,7 +486,7 @@ static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32_t fault_code
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, NULL);
+ status = ncacn_push_auth(&rep->blob, call, &pkt, NULL);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -531,7 +531,7 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32_t reason)
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, NULL);
+ status = ncacn_push_auth(&rep->blob, call, &pkt, NULL);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -732,7 +732,8 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, call->conn->auth_state.auth_info);
+ status = ncacn_push_auth(&rep->blob, call, &pkt,
+ call->conn->auth_state.auth_info);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(call->context);
call->context = NULL;
@@ -923,7 +924,7 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
return NT_STATUS_NO_MEMORY;
}
- status = ncacn_push_auth(&rep->blob, call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx), &pkt, call->conn->auth_state.auth_info);
+ status = ncacn_push_auth(&rep->blob, call, &pkt, call->conn->auth_state.auth_info);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -962,8 +963,7 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
return dcesrv_fault(call, DCERPC_FAULT_UNK_IF);
}
- pull = ndr_pull_init_blob(&call->pkt.u.request.stub_and_verifier, call,
- lp_iconv_convenience(call->conn->dce_ctx->lp_ctx));
+ pull = ndr_pull_init_blob(&call->pkt.u.request.stub_and_verifier, call);
NT_STATUS_HAVE_NO_MEMORY(pull);
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
@@ -1023,7 +1023,7 @@ _PUBLIC_ NTSTATUS dcesrv_reply(struct dcesrv_call_state *call)
}
/* form the reply NDR */
- push = ndr_push_init_ctx(call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx));
+ push = ndr_push_init_ctx(call);
NT_STATUS_HAVE_NO_MEMORY(push);
/* carry over the pointer count to the reply in case we are
diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c
index 59d8be3e24..4915c3ccbc 100644
--- a/source4/rpc_server/dcesrv_auth.c
+++ b/source4/rpc_server/dcesrv_auth.c
@@ -383,7 +383,7 @@ bool dcesrv_auth_response(struct dcesrv_call_state *call,
/* non-signed packets are simple */
if (sig_size == 0) {
- status = ncacn_push_auth(blob, call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx), pkt, NULL);
+ status = ncacn_push_auth(blob, call, pkt, NULL);
return NT_STATUS_IS_OK(status);
}
@@ -397,18 +397,18 @@ bool dcesrv_auth_response(struct dcesrv_call_state *call,
* TODO: let the gensec mech decide if it wants to generate a signature
* that might be needed for schannel...
*/
- status = ncacn_push_auth(blob, call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx), pkt, NULL);
+ status = ncacn_push_auth(blob, call, pkt, NULL);
return NT_STATUS_IS_OK(status);
case DCERPC_AUTH_LEVEL_NONE:
- status = ncacn_push_auth(blob, call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx), pkt, NULL);
+ status = ncacn_push_auth(blob, call, pkt, NULL);
return NT_STATUS_IS_OK(status);
default:
return false;
}
- ndr = ndr_push_init_ctx(call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx));
+ ndr = ndr_push_init_ctx(call);
if (!ndr) {
return false;
}
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 354ebf0f85..a9bb1c0b4e 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -136,8 +136,7 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
return WERR_OK;
}
- ndr_err = ndr_pull_struct_blob(md_value, obj,
- lp_iconv_convenience(ldb_get_opaque(sam_ctx, "loadparm")), &md,
+ ndr_err = ndr_pull_struct_blob(md_value, obj, &md,
(ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_DS_DRA_INTERNAL_ERROR;
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 8ab3cbfe6b..2483d680e0 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -749,7 +749,6 @@ static NTSTATUS get_trustdom_auth_blob(struct dcesrv_call_state *dce_call,
arcfour_crypt_blob(auth_blob->data, auth_blob->length, &session_key);
ndr_err = ndr_pull_struct_blob(auth_blob, mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
auth_struct,
(ndr_pull_flags_fn_t)ndr_pull_trustDomainPasswords);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -797,7 +796,6 @@ static NTSTATUS get_trustauth_inout_blob(struct dcesrv_call_state *dce_call,
ioblob.previous->array[i].AuthType = 0;
}
ndr_err = ndr_push_struct_blob(trustauth_blob, mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
&ioblob,
(ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -3920,7 +3918,6 @@ static int dns_cmp(const char *s1, size_t l1,
/* decode all TDOs forest trust info blobs */
static NTSTATUS get_ft_info(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *ic,
struct ldb_message *msg,
struct ForestTrustInfo *info)
{
@@ -3932,8 +3929,7 @@ static NTSTATUS get_ft_info(TALLOC_CTX *mem_ctx,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
/* ldb_val is equivalent to DATA_BLOB */
- ndr_err = ndr_pull_struct_blob_all(ft_blob, mem_ctx, ic,
- info,
+ ndr_err = ndr_pull_struct_blob_all(ft_blob, mem_ctx, info,
(ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfo);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return NT_STATUS_INVALID_DOMAIN_STATE;
@@ -4242,8 +4238,6 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
{
struct dcesrv_handle *h;
struct lsa_policy_state *p_state;
- struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(lp_ctx);
const char *trust_attrs[] = { "trustPartner", "trustAttributes",
"msDS-TrustForestTrustInfo", NULL };
struct ldb_message **dom_res = NULL;
@@ -4356,7 +4350,7 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
return NT_STATUS_NO_MEMORY;
}
- nt_status = get_ft_info(mem_ctx, ic, dom_res[i], fti);
+ nt_status = get_ft_info(mem_ctx, dom_res[i], fti);
if (!NT_STATUS_IS_OK(nt_status)) {
if (NT_STATUS_EQUAL(nt_status,
NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
@@ -4385,8 +4379,7 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
/* not just a check, write info back */
- ndr_err = ndr_push_struct_blob(&ft_blob, mem_ctx, ic,
- nfti,
+ ndr_err = ndr_push_struct_blob(&ft_blob, mem_ctx, nfti,
(ndr_push_flags_fn_t)ndr_push_ForestTrustInfo);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return NT_STATUS_INVALID_PARAMETER;
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 3842429b8e..011341641a 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -249,7 +249,6 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca
creds->sid = samdb_result_dom_sid(creds, msgs[0], "objectSid");
nt_status = schannel_save_creds_state(mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
lp_private_dir(dce_call->conn->dce_ctx->lp_ctx),
creds);
@@ -362,7 +361,6 @@ static NTSTATUS dcesrv_netr_creds_server_step_check(struct dcesrv_call_state *dc
}
nt_status = schannel_check_creds_state(mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
lp_private_dir(dce_call->conn->dce_ctx->lp_ctx),
computer_name,
received_authenticator,
@@ -714,7 +712,6 @@ static NTSTATUS dcesrv_netr_LogonSamLogonEx(struct dcesrv_call_state *dce_call,
struct netlogon_creds_CredentialState *creds;
nt_status = schannel_get_creds_state(mem_ctx,
- lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx),
lp_private_dir(dce_call->conn->dce_ctx->lp_ctx),
r->in.computer_name, &creds);
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c
index 6f4df00f9d..05e45d8529 100644
--- a/source4/rpc_server/service_rpc.c
+++ b/source4/rpc_server/service_rpc.c
@@ -135,7 +135,6 @@ static void dcesrv_sock_reply_done(struct tevent_req *subreq)
struct dcerpc_read_ncacn_packet_state {
struct {
- struct smb_iconv_convenience *smb_iconv_c;
} caller;
DATA_BLOB buffer;
struct ncacn_packet *pkt;
@@ -150,8 +149,7 @@ static void dcerpc_read_ncacn_packet_done(struct tevent_req *subreq);
static struct tevent_req *dcerpc_read_ncacn_packet_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct tstream_context *stream,
- struct smb_iconv_convenience *ic)
+ struct tstream_context *stream)
{
struct tevent_req *req;
struct dcerpc_read_ncacn_packet_state *state;
@@ -163,7 +161,6 @@ static struct tevent_req *dcerpc_read_ncacn_packet_send(TALLOC_CTX *mem_ctx,
return NULL;
}
- state->caller.smb_iconv_c = ic;
state->buffer = data_blob_const(NULL, 0);
state->pkt = talloc(state, struct ncacn_packet);
if (tevent_req_nomem(state->pkt, req)) {
@@ -260,9 +257,7 @@ static void dcerpc_read_ncacn_packet_done(struct tevent_req *subreq)
return;
}
- ndr = ndr_pull_init_blob(&state->buffer,
- state->pkt,
- state->caller.smb_iconv_c);
+ ndr = ndr_pull_init_blob(&state->buffer, state->pkt);
if (tevent_req_nomem(ndr, req)) {
return;
}
@@ -392,8 +387,7 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn)
subreq = dcerpc_read_ncacn_packet_send(dcesrv_conn,
dcesrv_conn->event_ctx,
- dcesrv_conn->stream,
- lp_iconv_convenience(lp_ctx));
+ dcesrv_conn->stream);
if (!subreq) {
status = NT_STATUS_NO_MEMORY;
DEBUG(0,("dcesrv_sock_accept: dcerpc_read_fragment_buffer_send(%s)\n",
@@ -413,7 +407,6 @@ static void dcesrv_read_fragment_done(struct tevent_req *subreq)
struct ncacn_packet *pkt;
DATA_BLOB buffer;
NTSTATUS status;
- struct loadparm_context *lp_ctx = dce_conn->dce_ctx->lp_ctx;
status = dcerpc_read_ncacn_packet_recv(subreq, dce_conn,
&pkt, &buffer);
@@ -431,8 +424,7 @@ static void dcesrv_read_fragment_done(struct tevent_req *subreq)
subreq = dcerpc_read_ncacn_packet_send(dce_conn,
dce_conn->event_ctx,
- dce_conn->stream,
- lp_iconv_convenience(lp_ctx));
+ dce_conn->stream);
if (!subreq) {
status = NT_STATUS_NO_MEMORY;
dcesrv_terminate_connection(dce_conn, nt_errstr(status));
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 0fe8e0eb9b..f6212da250 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -33,11 +33,11 @@ enum spoolss_handle {
SPOOLSS_NOTIFY
};
-#define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
- ((info)?ndr_size_##fn(info, level, ic, 0):0)
+#define SPOOLSS_BUFFER_UNION(fn,info,level) \
+ ((info)?ndr_size_##fn(info, level, 0):0)
-#define SPOOLSS_BUFFER_UNION_ARRAY(fn,ic,info,level,count) \
- ((info)?ndr_size_##fn##_info(dce_call, ic, level, count, info):0)
+#define SPOOLSS_BUFFER_UNION_ARRAY(fn,info,level,count) \
+ ((info)?ndr_size_##fn##_info(dce_call, level, count, info):0)
#define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= *r->out.needed)?val_true:val_false)
@@ -238,7 +238,6 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -246,7 +245,7 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumPrinters(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -374,7 +373,6 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -382,7 +380,7 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
status = ntptr_EnumPrinterDrivers(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -407,7 +405,6 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -415,7 +412,7 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
status = ntptr_GetPrinterDriverDirectory(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, ic, r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -459,7 +456,6 @@ static WERROR dcesrv_spoolss_GetPrintProcessorDirectory(struct dcesrv_call_state
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -467,7 +463,7 @@ static WERROR dcesrv_spoolss_GetPrintProcessorDirectory(struct dcesrv_call_state
status = ntptr_GetPrintProcessorDirectory(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo, ic, r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -721,7 +717,6 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
struct ntptr_GenericHandle *handle;
struct dcesrv_handle *h;
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -742,7 +737,7 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_FOOBAR;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, ic, r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -789,7 +784,6 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
struct ntptr_GenericHandle *handle;
struct dcesrv_handle *h;
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -809,7 +803,7 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
return WERR_FOOBAR;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -824,7 +818,6 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
W_ERROR_NOT_OK_RETURN(status);
@@ -832,7 +825,7 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
status = ntptr_EnumPorts(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -847,7 +840,6 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private_data, struct ntptr_context);
WERROR status;
- struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
W_ERROR_NOT_OK_RETURN(status);
@@ -855,7 +847,7 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumMonitors(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, *r->out.info, r->in.level, *r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index c639c634d1..575902a164 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -141,7 +141,7 @@ static WERROR dcesrv_winreg_CreateKey(struct dcesrv_call_state *dce_call,
if (sdblob.data == NULL) {
return WERR_INVALID_PARAM;
}
- ndr_err = ndr_pull_struct_blob_all(&sdblob, mem_ctx, NULL, &sd,
+ ndr_err = ndr_pull_struct_blob_all(&sdblob, mem_ctx, &sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_INVALID_PARAM;