summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-01 22:05:13 -0600
committerStefan Metzmacher <metze@samba.org>2008-01-01 16:12:15 -0600
commit7d5f0e0893d42b56145a3ffa34e3b4b9906cbd91 (patch)
tree444af87d26b95edc8293bdbd669ddddd54f9b177 /source4/torture/rpc
parent86dc05e99f124db47f2743d1fc23117a7f5145ab (diff)
downloadsamba-7d5f0e0893d42b56145a3ffa34e3b4b9906cbd91.tar.gz
samba-7d5f0e0893d42b56145a3ffa34e3b4b9906cbd91.tar.bz2
samba-7d5f0e0893d42b56145a3ffa34e3b4b9906cbd91.zip
r26639: librpc: Pass iconv convenience on from RPC connection to NDR library, so it can be overridden by OpenChange.
(This used to be commit 2f29f80e07adef1f020173f2cd6d947d0ef505ce)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/samba3rpc.c27
-rw-r--r--source4/torture/rpc/samsync.c2
-rw-r--r--source4/torture/rpc/winreg.c2
3 files changed, 20 insertions, 11 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index a63772e964..36461ad629 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -89,7 +89,8 @@ bool torture_bind_authcontext(struct torture_context *torture)
goto done;
}
- lsa_pipe = dcerpc_pipe_init(mem_ctx, cli->transport->socket->event.ctx);
+ lsa_pipe = dcerpc_pipe_init(mem_ctx, cli->transport->socket->event.ctx,
+ lp_iconv_convenience(torture->lp_ctx));
if (lsa_pipe == NULL) {
d_printf("dcerpc_pipe_init failed\n");
goto done;
@@ -206,7 +207,8 @@ static bool bindtest(struct smbcli_state *cli,
}
lsa_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx);
+ cli->transport->socket->event.ctx,
+ lp_iconv_convenience(lp_ctx));
if (lsa_pipe == NULL) {
d_printf("dcerpc_pipe_init failed\n");
goto done;
@@ -346,7 +348,8 @@ static NTSTATUS get_usr_handle(struct smbcli_state *cli,
uint32_t user_rid,access_granted;
samr_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx);
+ cli->transport->socket->event.ctx,
+ lp_iconv_convenience(lp_ctx));
if (samr_pipe == NULL) {
d_printf("dcerpc_pipe_init failed\n");
status = NT_STATUS_NO_MEMORY;
@@ -816,7 +819,8 @@ static bool auth2(struct smbcli_state *cli,
}
net_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx);
+ cli->transport->socket->event.ctx,
+ lp_iconv_convenience(global_loadparm));
if (net_pipe == NULL) {
d_printf("dcerpc_pipe_init failed\n");
goto done;
@@ -918,7 +922,8 @@ static bool schan(struct smbcli_state *cli,
}
net_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx);
+ cli->transport->socket->event.ctx,
+ lp_iconv_convenience(lp_ctx));
if (net_pipe == NULL) {
d_printf("dcerpc_pipe_init failed\n");
goto done;
@@ -1366,7 +1371,8 @@ static NTSTATUS pipe_bind_smb(TALLOC_CTX *mem_ctx,
NTSTATUS status;
if (!(result = dcerpc_pipe_init(
- mem_ctx, tree->session->transport->socket->event.ctx))) {
+ mem_ctx, tree->session->transport->socket->event.ctx,
+ lp_iconv_convenience(global_loadparm)))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1901,7 +1907,8 @@ bool torture_samba3_rpc_randomauth2(struct torture_context *torture)
}
if (!(net_pipe = dcerpc_pipe_init(
- mem_ctx, cli->transport->socket->event.ctx))) {
+ mem_ctx, cli->transport->socket->event.ctx,
+ lp_iconv_convenience(torture->lp_ctx)))) {
d_printf("dcerpc_pipe_init failed\n");
goto done;
}
@@ -2972,7 +2979,8 @@ static NTSTATUS get_shareinfo(TALLOC_CTX *mem_ctx,
NTSTATUS status;
if (!(p = dcerpc_pipe_init(cli,
- cli->transport->socket->event.ctx))) {
+ cli->transport->socket->event.ctx,
+ lp_iconv_convenience(global_loadparm)))) {
status = NT_STATUS_NO_MEMORY;
goto fail;
}
@@ -3038,7 +3046,8 @@ static NTSTATUS get_hklm_handle(TALLOC_CTX *mem_ctx,
}
if (!(p = dcerpc_pipe_init(result,
- cli->transport->socket->event.ctx))) {
+ cli->transport->socket->event.ctx,
+ lp_iconv_convenience(global_loadparm)))) {
status = NT_STATUS_NO_MEMORY;
goto fail;
}
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index e94f228589..1f7f9f463e 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -548,7 +548,7 @@ static bool samsync_handle_user(TALLOC_CTX *mem_ctx, struct samsync_state *samsy
data.data = user->user_private_info.SensitiveData;
data.length = user->user_private_info.DataLength;
creds_arcfour_crypt(samsync_state->creds, data.data, data.length);
- ndr_err = ndr_pull_struct_blob(&data, mem_ctx, &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
+ ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(global_loadparm), &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
if (keys.keys.keys2.lmpassword.length == 16) {
sam_rid_crypt(rid, keys.keys.keys2.lmpassword.pwd.hash, lm_hash.hash, 0);
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 72435f8054..d77295605f 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -221,7 +221,7 @@ static bool _test_GetKeySecurity(struct dcerpc_pipe *p,
sd = talloc_zero(tctx, struct security_descriptor);
torture_assert_ndr_success(tctx,
- ndr_pull_struct_blob(&sdblob, tctx, sd,
+ ndr_pull_struct_blob(&sdblob, tctx, NULL, sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor),
"pull_security_descriptor failed");