summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-24 03:40:09 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-24 03:40:09 +0200
commit922a29992ee38b8e1c851192677b89a2cd59a91a (patch)
tree9ea2826f7fd77b27d16de8be61ca7940fb066bad /source4
parent23b04a31f14dca0a3f9bcd58181f84db4b6092c7 (diff)
downloadsamba-922a29992ee38b8e1c851192677b89a2cd59a91a.tar.gz
samba-922a29992ee38b8e1c851192677b89a2cd59a91a.tar.bz2
samba-922a29992ee38b8e1c851192677b89a2cd59a91a.zip
Remove iconv_convenience parameter from simple string push/pull
functions.
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/ntlm/auth_util.c2
-rw-r--r--source4/auth/ntlmssp/ntlmssp_client.c2
-rw-r--r--source4/auth/ntlmssp/ntlmssp_parse.c13
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c2
-rw-r--r--source4/auth/ntlmssp/ntlmssp_sign.c2
-rw-r--r--source4/kdc/kpasswdd.c2
-rw-r--r--source4/libcli/auth/smbencrypt.c18
-rw-r--r--source4/libcli/raw/rawrequest.c4
-rw-r--r--source4/libcli/smb_composite/sesssetup.c4
-rw-r--r--source4/nsswitch/wbinfo.c2
-rw-r--r--source4/ntvfs/print/vfs_print.c4
-rw-r--r--source4/smb_server/blob.c4
-rw-r--r--source4/smb_server/smb/nttrans.c2
-rw-r--r--source4/smb_server/smb/request.c2
-rw-r--r--source4/smb_server/smb2/fileio.c2
-rw-r--r--source4/torture/basic/scanner.c21
-rw-r--r--source4/torture/rap/rap.c2
-rw-r--r--source4/torture/rpc/netlogon.c2
-rw-r--r--source4/torture/rpc/samba3rpc.c5
-rw-r--r--source4/torture/rpc/samlogon.c5
-rw-r--r--source4/torture/rpc/schannel.c4
-rw-r--r--source4/torture/rpc/wkssvc.c3
-rw-r--r--source4/winbind/wb_pam_auth.c1
23 files changed, 47 insertions, 61 deletions
diff --git a/source4/auth/ntlm/auth_util.c b/source4/auth/ntlm/auth_util.c
index 64ceb437ad..2f8ef10e05 100644
--- a/source4/auth/ntlm/auth_util.c
+++ b/source4/auth/ntlm/auth_util.c
@@ -145,7 +145,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
chall_blob = data_blob_talloc(mem_ctx, challenge, 8);
if (lp_client_ntlmv2_auth(auth_context->lp_ctx)) {
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_iconv_convenience(auth_context->lp_ctx), lp_netbios_name(auth_context->lp_ctx), lp_workgroup(auth_context->lp_ctx));
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_netbios_name(auth_context->lp_ctx), lp_workgroup(auth_context->lp_ctx));
DATA_BLOB lmv2_response, ntlmv2_response, lmv2_session_key, ntlmv2_session_key;
if (!SMBNTLMv2encrypt_hash(user_info_temp,
diff --git a/source4/auth/ntlmssp/ntlmssp_client.c b/source4/auth/ntlmssp/ntlmssp_client.c
index eb990dee9c..0ef40200fe 100644
--- a/source4/auth/ntlmssp/ntlmssp_client.c
+++ b/source4/auth/ntlmssp/ntlmssp_client.c
@@ -73,7 +73,6 @@ NTSTATUS ntlmssp_client_initial(struct gensec_security *gensec_security,
/* generate the ntlmssp negotiate packet */
msrpc_gen(out_mem_ctx,
- lp_iconv_convenience(gensec_security->lp_ctx),
out, "CddAA",
"NTLMSSP",
NTLMSSP_NEGOTIATE,
@@ -258,7 +257,6 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
/* this generates the actual auth packet */
if (!msrpc_gen(mem_ctx,
- lp_iconv_convenience(gensec_security->lp_ctx),
out, auth_gen_string,
"NTLMSSP",
NTLMSSP_AUTH,
diff --git a/source4/auth/ntlmssp/ntlmssp_parse.c b/source4/auth/ntlmssp/ntlmssp_parse.c
index 9256872036..cd270590f1 100644
--- a/source4/auth/ntlmssp/ntlmssp_parse.c
+++ b/source4/auth/ntlmssp/ntlmssp_parse.c
@@ -42,7 +42,6 @@
C = constant ascii string
*/
bool msrpc_gen(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
DATA_BLOB *blob,
const char *format, ...)
{
@@ -67,7 +66,7 @@ bool msrpc_gen(TALLOC_CTX *mem_ctx,
case 'U':
s = va_arg(ap, char *);
head_size += 8;
- n = push_ucs2_talloc(pointers, iconv_convenience, (void **)&pointers[i].data, s);
+ n = push_ucs2_talloc(pointers, (void **)&pointers[i].data, s);
if (n == -1) {
return false;
}
@@ -78,7 +77,7 @@ bool msrpc_gen(TALLOC_CTX *mem_ctx,
case 'A':
s = va_arg(ap, char *);
head_size += 8;
- n = push_ascii_talloc(pointers, iconv_convenience, (char **)&pointers[i].data, s);
+ n = push_ascii_talloc(pointers, (char **)&pointers[i].data, s);
if (n == -1) {
return false;
}
@@ -90,7 +89,7 @@ bool msrpc_gen(TALLOC_CTX *mem_ctx,
n = va_arg(ap, int);
intargs[i] = n;
s = va_arg(ap, char *);
- n = push_ucs2_talloc(pointers, iconv_convenience, (void **)&pointers[i].data, s);
+ n = push_ucs2_talloc(pointers, (void **)&pointers[i].data, s);
if (n == -1) {
return false;
}
@@ -248,7 +247,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
}
if (0 < len1) {
- pull_string(iconv_convenience, p, blob->data + ptr, p_len,
+ pull_string(p, blob->data + ptr, p_len,
len1, STR_UNICODE|STR_NOALIGN);
(*ps) = talloc_strdup(mem_ctx, p);
if (!(*ps)) {
@@ -283,7 +282,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
}
if (0 < len1) {
- pull_string(iconv_convenience, p, blob->data + ptr, p_len,
+ pull_string(p, blob->data + ptr, p_len,
len1, STR_ASCII|STR_NOALIGN);
(*ps) = talloc_strdup(mem_ctx, p);
if (!(*ps)) {
@@ -348,7 +347,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
goto cleanup;
}
- head_ofs += pull_string(iconv_convenience, p,
+ head_ofs += pull_string(p,
blob->data+head_ofs, p_len,
blob->length - head_ofs,
STR_ASCII|STR_TERMINATE);
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index ad1ee8e871..38973f623d 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -205,7 +205,6 @@ NTSTATUS ntlmssp_server_negotiate(struct gensec_security *gensec_security,
}
msrpc_gen(out_mem_ctx,
- lp_iconv_convenience(gensec_security->lp_ctx),
&struct_blob, "aaaaa",
NTLMSSP_NAME_TYPE_DOMAIN, target_name,
NTLMSSP_NAME_TYPE_SERVER, gensec_ntlmssp_state->server_name,
@@ -226,7 +225,6 @@ NTSTATUS ntlmssp_server_negotiate(struct gensec_security *gensec_security,
}
msrpc_gen(out_mem_ctx,
- lp_iconv_convenience(gensec_security->lp_ctx),
out, gen_string,
"NTLMSSP",
NTLMSSP_CHALLENGE,
diff --git a/source4/auth/ntlmssp/ntlmssp_sign.c b/source4/auth/ntlmssp/ntlmssp_sign.c
index 49ed48df98..47d7a2104a 100644
--- a/source4/auth/ntlmssp/ntlmssp_sign.c
+++ b/source4/auth/ntlmssp/ntlmssp_sign.c
@@ -119,7 +119,6 @@ static NTSTATUS ntlmssp_make_packet_signature(struct gensec_ntlmssp_state *gense
uint32_t crc;
crc = crc32_calc_buffer(data, length);
if (!msrpc_gen(sig_mem_ctx,
- lp_iconv_convenience(gensec_ntlmssp_state->gensec_security->lp_ctx),
sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, gensec_ntlmssp_state->crypt.ntlm.seq_num)) {
return NT_STATUS_NO_MEMORY;
}
@@ -248,7 +247,6 @@ NTSTATUS gensec_ntlmssp_seal_packet(struct gensec_security *gensec_security,
uint32_t crc;
crc = crc32_calc_buffer(data, length);
if (!msrpc_gen(sig_mem_ctx,
- lp_iconv_convenience(gensec_security->lp_ctx),
sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, gensec_ntlmssp_state->crypt.ntlm.seq_num)) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c
index 1336b0157e..63b5f2a2e4 100644
--- a/source4/kdc/kpasswdd.c
+++ b/source4/kdc/kpasswdd.c
@@ -65,7 +65,7 @@ static bool kpasswdd_make_error_reply(struct kdc_server *kdc,
DEBUG(result_code ? 3 : 10, ("kpasswdd: %s\n", error_string));
- len = push_utf8_talloc(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx), &error_string_utf8, error_string);
+ len = push_utf8_talloc(mem_ctx, &error_string_utf8, error_string);
if (len == -1) {
return false;
}
diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c
index a78c444da7..2803aaff5e 100644
--- a/source4/libcli/auth/smbencrypt.c
+++ b/source4/libcli/auth/smbencrypt.c
@@ -67,7 +67,7 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
int len;
void *wpwd;
- len = push_ucs2_talloc(NULL, lp_iconv_convenience(global_loadparm), &wpwd, passwd);
+ len = push_ucs2_talloc(NULL, &wpwd, passwd);
if (len < 2) {
/* We don't want to return fixed data, as most callers
* don't check */
@@ -97,7 +97,7 @@ bool E_deshash(const char *passwd, uint8_t p16[16])
ZERO_STRUCT(dospwd);
/* Password must be converted to DOS charset - null terminated, uppercase. */
- push_string(lp_iconv_convenience(global_loadparm), dospwd, passwd, sizeof(dospwd), STR_ASCII|STR_UPPER|STR_TERMINATE);
+ push_string(dospwd, passwd, sizeof(dospwd), STR_ASCII|STR_UPPER|STR_TERMINATE);
/* Only the first 14 chars are considered, password need not be null terminated. */
E_P16((const uint8_t *)dospwd, p16);
@@ -124,7 +124,6 @@ bool ntv2_owf_gen(const uint8_t owf[16],
HMACMD5Context ctx;
TALLOC_CTX *mem_ctx = talloc_init("ntv2_owf_gen for %s\\%s", domain_in, user_in);
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm);
if (!mem_ctx) {
return false;
@@ -152,14 +151,14 @@ bool ntv2_owf_gen(const uint8_t owf[16],
}
}
- user_byte_len = push_ucs2_talloc(mem_ctx, iconv_convenience, &user, user_in);
+ user_byte_len = push_ucs2_talloc(mem_ctx, &user, user_in);
if (user_byte_len == (ssize_t)-1) {
DEBUG(0, ("push_uss2_talloc() for user returned -1 (probably talloc() failure)\n"));
talloc_free(mem_ctx);
return false;
}
- domain_byte_len = push_ucs2_talloc(mem_ctx, iconv_convenience, &domain, domain_in);
+ domain_byte_len = push_ucs2_talloc(mem_ctx, &domain, domain_in);
if (domain_byte_len == (ssize_t)-1) {
DEBUG(0, ("push_ucs2_talloc() for domain returned -1 (probably talloc() failure)\n"));
talloc_free(mem_ctx);
@@ -295,13 +294,12 @@ void SMBsesskeygen_lm_sess_key(const uint8_t lm_hash[16],
}
DATA_BLOB NTLMv2_generate_names_blob(TALLOC_CTX *mem_ctx,
- struct smb_iconv_convenience *iconv_convenience,
const char *hostname,
const char *domain)
{
DATA_BLOB names_blob = data_blob_talloc(mem_ctx, NULL, 0);
- msrpc_gen(mem_ctx, iconv_convenience, &names_blob,
+ msrpc_gen(mem_ctx, &names_blob,
"aaa",
NTLMSSP_NAME_TYPE_DOMAIN, domain,
NTLMSSP_NAME_TYPE_SERVER, hostname,
@@ -324,7 +322,7 @@ static DATA_BLOB NTLMv2_generate_client_data(TALLOC_CTX *mem_ctx, const DATA_BLO
/* See http://www.ubiqx.org/cifs/SMB.html#SMB.8.5 */
- msrpc_gen(mem_ctx, NULL, &response, "ddbbdb",
+ msrpc_gen(mem_ctx, &response, "ddbbdb",
0x00000101, /* Header */
0, /* 'Reserved' */
long_date, 8, /* Timestamp */
@@ -472,7 +470,7 @@ bool encode_pw_buffer(uint8_t buffer[516], const char *password, int string_flag
/* the incoming buffer can be any alignment. */
string_flags |= STR_NOALIGN;
- new_pw_len = push_string(lp_iconv_convenience(global_loadparm), new_pw,
+ new_pw_len = push_string(new_pw,
password,
sizeof(new_pw), string_flags);
@@ -525,7 +523,7 @@ bool decode_pw_buffer(uint8_t in_buffer[516], char *new_pwrd,
}
/* decode into the return buffer. Buffer length supplied */
- converted_pw_len = pull_string(lp_iconv_convenience(global_loadparm), new_pwrd, &in_buffer[512 - byte_len], new_pwrd_size,
+ converted_pw_len = pull_string(new_pwrd, &in_buffer[512 - byte_len], new_pwrd_size,
byte_len, string_flags);
if (converted_pw_len == -1) {
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 353b66c622..caef28d7fc 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -430,7 +430,7 @@ size_t smbcli_req_append_string(struct smbcli_request *req, const char *str, uin
smbcli_req_grow_allocation(req, len + req->out.data_size);
- len = push_string(lp_iconv_convenience(global_loadparm), req->out.data + req->out.data_size, str, len, flags);
+ len = push_string(req->out.data + req->out.data_size, str, len, flags);
smbcli_req_grow_data(req, len + req->out.data_size);
@@ -977,7 +977,7 @@ size_t smbcli_blob_append_string(struct smbcli_session *session,
return 0;
}
- len = push_string(lp_iconv_convenience(global_loadparm), blob->data + blob->length, str, max_len, flags);
+ len = push_string(blob->data + blob->length, str, max_len, flags);
blob->length += len;
diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c
index 645f5362ac..76c1f952e7 100644
--- a/source4/libcli/smb_composite/sesssetup.c
+++ b/source4/libcli/smb_composite/sesssetup.c
@@ -260,7 +260,7 @@ static NTSTATUS session_setup_nt1(struct composite_context *c,
{
NTSTATUS nt_status = NT_STATUS_INTERNAL_ERROR;
struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, lp_iconv_convenience(global_loadparm), session->transport->socket->hostname, lp_workgroup(global_loadparm));
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, session->transport->socket->hostname, lp_workgroup(global_loadparm));
DATA_BLOB session_key = data_blob(NULL, 0);
int flags = CLI_CRED_NTLM_AUTH;
@@ -334,7 +334,7 @@ static NTSTATUS session_setup_old(struct composite_context *c,
NTSTATUS nt_status;
struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state);
const char *password = cli_credentials_get_password(io->in.credentials);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, lp_iconv_convenience(global_loadparm), session->transport->socket->hostname, lp_workgroup(global_loadparm));
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, session->transport->socket->hostname, lp_workgroup(global_loadparm));
DATA_BLOB session_key;
int flags = 0;
if (session->options.lanman_auth) {
diff --git a/source4/nsswitch/wbinfo.c b/source4/nsswitch/wbinfo.c
index a36a66b80f..60c95a3bd0 100644
--- a/source4/nsswitch/wbinfo.c
+++ b/source4/nsswitch/wbinfo.c
@@ -836,7 +836,7 @@ static bool wbinfo_auth_crap(struct loadparm_context *lp_ctx, char *username)
server_chal = data_blob(request.data.auth_crap.chal, 8);
/* Pretend this is a login to 'us', for blob purposes */
- names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_iconv_convenience(lp_ctx), lp_netbios_name(lp_ctx), lp_workgroup(lp_ctx));
+ names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_netbios_name(lp_ctx), lp_workgroup(lp_ctx));
if (!SMBNTLMv2encrypt(mem_ctx, name_user, name_domain, pass, &server_chal,
&names_blob,
diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c
index aa9b11a973..540e51a43b 100644
--- a/source4/ntvfs/print/vfs_print.c
+++ b/source4/ntvfs/print/vfs_print.c
@@ -83,8 +83,8 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs,
p = (char *)io->ioctl.out.blob.data;
SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */);
- push_string(lp_iconv_convenience(ntvfs->ctx->lp_ctx), p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII);
- push_string(lp_iconv_convenience(ntvfs->ctx->lp_ctx), p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII);
+ push_string(p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII);
+ push_string(p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII);
return NT_STATUS_OK;
}
diff --git a/source4/smb_server/blob.c b/source4/smb_server/blob.c
index bd250361a4..baa9b3e4d8 100644
--- a/source4/smb_server/blob.c
+++ b/source4/smb_server/blob.c
@@ -140,10 +140,10 @@ size_t smbsrv_blob_push_string(TALLOC_CTX *mem_ctx,
alignment = 1;
if (dest_len > 0) {
SCVAL(blob->data + offset, 0, 0);
- ret = push_string(lp_iconv_convenience(global_loadparm), blob->data + offset + 1, str, dest_len-1, flags);
+ ret = push_string(blob->data + offset + 1, str, dest_len-1, flags);
}
} else {
- ret = push_string(lp_iconv_convenience(global_loadparm), blob->data + offset, str, dest_len, flags);
+ ret = push_string(blob->data + offset, str, dest_len, flags);
}
/* sometimes the string needs to be terminated, but the length
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index 4a06ea4b91..3480711ed2 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -398,7 +398,7 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
ssize_t len;
SIVAL(p, 4, info->nttrans.out.changes[i].action);
- len = push_string(lp_iconv_convenience(global_loadparm), p + 12, info->nttrans.out.changes[i].name.s,
+ len = push_string(p + 12, info->nttrans.out.changes[i].name.s,
op->trans->out.params.length -
(p+12 - op->trans->out.params.data), STR_UNICODE);
SIVAL(p, 8, len);
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index 241c262857..52eb69fe68 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -428,7 +428,7 @@ size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str,
dest = req->out.buffer + PTR_DIFF(dest, buf0);
}
- len = push_string(lp_iconv_convenience(req->smb_conn->lp_ctx), dest, str, len, flags);
+ len = push_string(dest, str, len, flags);
grow_size = len + PTR_DIFF(dest, req->out.data);
diff --git a/source4/smb_server/smb2/fileio.c b/source4/smb_server/smb2/fileio.c
index 4f4402ba33..221fafadfd 100644
--- a/source4/smb_server/smb2/fileio.c
+++ b/source4/smb_server/smb2/fileio.c
@@ -458,7 +458,7 @@ static void smb2srv_notify_send(struct ntvfs_request *ntvfs)
ssize_t len;
SIVAL(p, 4, io->smb2.out.changes[i].action);
- len = push_string(lp_iconv_convenience(ntvfs->ctx->lp_ctx), p + 12, io->smb2.out.changes[i].name.s,
+ len = push_string(p + 12, io->smb2.out.changes[i].name.s,
blob.length - (p+12 - blob.data), STR_UNICODE);
SIVAL(p, 8, len);
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index 5212f1edee..7f88662baa 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -163,7 +163,7 @@ static bool trans2_op_exists(struct smbcli_state *cli, int op)
/****************************************************************************
check for existance of a trans2 call
****************************************************************************/
-static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
+static bool scan_trans2(
struct smbcli_state *cli, int op, int level,
int fnum, int dnum, int qfnum, const char *fname)
{
@@ -233,7 +233,7 @@ static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], fname, PARAM_SIZE-7,
STR_TERMINATE|STR_UNICODE);
@@ -249,7 +249,7 @@ static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], "\\newfile.dat", PARAM_SIZE-7,
STR_TERMINATE|STR_UNICODE);
@@ -266,7 +266,7 @@ static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
smbcli_mkdir(cli->tree, "\\testdir");
param_len = 2;
SSVAL(param, 0, level);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[2], "\\testdir", PARAM_SIZE-3,
STR_TERMINATE|STR_UNICODE);
@@ -321,15 +321,15 @@ bool torture_trans2_scan(struct torture_context *torture,
}
for (level = 0; level <= 50; level++) {
- scan_trans2(lp_iconv_convenience(torture->lp_ctx), cli, op, level, fnum, dnum, qfnum, fname);
+ scan_trans2(cli, op, level, fnum, dnum, qfnum, fname);
}
for (level = 0x100; level <= 0x130; level++) {
- scan_trans2(lp_iconv_convenience(torture->lp_ctx), cli, op, level, fnum, dnum, qfnum, fname);
+ scan_trans2(cli, op, level, fnum, dnum, qfnum, fname);
}
for (level = 1000; level < 1050; level++) {
- scan_trans2(lp_iconv_convenience(torture->lp_ctx), cli, op, level, fnum, dnum, qfnum, fname);
+ scan_trans2(cli, op, level, fnum, dnum, qfnum, fname);
}
}
@@ -494,7 +494,7 @@ static bool scan_nttrans(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], fname, PARAM_SIZE,
STR_TERMINATE | STR_UNICODE);
@@ -510,7 +510,7 @@ static bool scan_nttrans(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], "\\newfile.dat", PARAM_SIZE,
STR_TERMINATE | STR_UNICODE);
@@ -527,8 +527,7 @@ static bool scan_nttrans(struct smb_iconv_convenience *iconv_convenience,
smbcli_mkdir(cli->tree, "\\testdir");
param_len = 2;
SSVAL(param, 0, level);
- param_len += push_string(iconv_convenience,
- &param[2], "\\testdir", PARAM_SIZE,
+ param_len += push_string(&param[2], "\\testdir", PARAM_SIZE,
STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "dfs", op, level, param, data, param_len,
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index e93bd52b9a..be231107dd 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -184,7 +184,7 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr,
return NT_STATUS_INVALID_PARAMETER;
*dest = talloc_zero_array(mem_ctx, char, len+1);
- pull_string(ndr->iconv_convenience, *dest, p, len+1, len, STR_ASCII);
+ pull_string(*dest, p, len+1, len, STR_ASCII);
return NT_STATUS_OK;
}
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index f4ae5b35eb..c2e12ec01d 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -592,7 +592,7 @@ bool test_netlogon_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
chal = data_blob_const(ninfo.challenge,
sizeof(ninfo.challenge));
- names_blob = NTLMv2_generate_names_blob(tctx, lp_iconv_convenience(tctx->lp_ctx), cli_credentials_get_workstation(credentials),
+ names_blob = NTLMv2_generate_names_blob(tctx, cli_credentials_get_workstation(credentials),
cli_credentials_get_domain(credentials));
status = cli_credentials_get_ntlm_response(cmdline_credentials, tctx,
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 260c1cc149..25ff7d0ea9 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -1041,7 +1041,7 @@ static bool schan(struct smbcli_state *cli,
generate_random_buffer(chal.data, chal.length);
names_blob = NTLMv2_generate_names_blob(
- mem_ctx, lp_iconv_convenience(lp_ctx),
+ mem_ctx,
cli_credentials_get_workstation(user_creds),
cli_credentials_get_domain(user_creds));
status = cli_credentials_get_ntlm_response(
@@ -2420,8 +2420,7 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree,
memcpy(servername, r.out.info.info0.name, 16);
servername[16] = '\0';
- if (pull_ascii_talloc(mem_ctx, iconv_convenience,
- name, servername) < 0) {
+ if (pull_ascii_talloc(mem_ctx, name, servername) < 0) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index b7028e6609..01368cccad 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -595,7 +595,7 @@ static bool test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state,
DATA_BLOB lmv2_response = data_blob(NULL, 0);
DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, samlogon_state->iconv_convenience, TEST_MACHINE_NAME, samlogon_state->workgroup);
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, TEST_MACHINE_NAME, samlogon_state->workgroup);
uint8_t lm_session_key[8];
uint8_t user_session_key[16];
@@ -743,7 +743,7 @@ static bool test_lmv2_ntlm_broken(struct samlogon_state *samlogon_state,
DATA_BLOB lmv2_response = data_blob(NULL, 0);
DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, samlogon_state->iconv_convenience, samlogon_state->netbios_name, samlogon_state->workgroup);
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, samlogon_state->netbios_name, samlogon_state->workgroup);
DATA_BLOB ntlm_response = data_blob_talloc(samlogon_state->mem_ctx, NULL, 24);
DATA_BLOB ntlm_session_key = data_blob_talloc(samlogon_state->mem_ctx, NULL, 16);
@@ -1162,7 +1162,6 @@ static bool test_plaintext(struct samlogon_state *samlogon_state, enum ntlm_brea
ZERO_STRUCT(user_session_key);
if ((push_ucs2_talloc(samlogon_state->mem_ctx,
- samlogon_state->iconv_convenience,
&unicodepw, samlogon_state->password)) == -1) {
DEBUG(0, ("push_ucs2_allocate failed!\n"));
exit(1);
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index fae0093e4d..15d40a2e17 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -68,7 +68,7 @@ bool test_netlogon_ex_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
chal = data_blob_const(ninfo.challenge,
sizeof(ninfo.challenge));
- names_blob = NTLMv2_generate_names_blob(tctx, lp_iconv_convenience(tctx->lp_ctx), cli_credentials_get_workstation(credentials),
+ names_blob = NTLMv2_generate_names_blob(tctx, cli_credentials_get_workstation(credentials),
cli_credentials_get_domain(credentials));
status = cli_credentials_get_ntlm_response(cmdline_credentials, tctx,
@@ -573,7 +573,7 @@ static bool torture_schannel_bench_start(struct torture_schannel_bench_conn *con
chal = data_blob_const(conn->ninfo.challenge,
sizeof(conn->ninfo.challenge));
- names_blob = NTLMv2_generate_names_blob(conn->tmp, lp_iconv_convenience(s->tctx->lp_ctx),
+ names_blob = NTLMv2_generate_names_blob(conn->tmp,
cli_credentials_get_workstation(conn->wks_creds),
cli_credentials_get_domain(conn->wks_creds));
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 015f20f6e2..0f49562d8b 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -966,8 +966,7 @@ static bool test_NetrMessageBufferSend(struct torture_context *tctx,
size_t size;
uint8_t *msg;
- size = push_ucs2_talloc(tctx, lp_iconv_convenience(tctx->lp_ctx),
- (void **)&msg, message);
+ size = push_ucs2_talloc(tctx, (void **)&msg, message);
r.in.server_name = dcerpc_server_name(p);
r.in.message_name = dcerpc_server_name(p);
diff --git a/source4/winbind/wb_pam_auth.c b/source4/winbind/wb_pam_auth.c
index ee54bcd58f..5913f8d1bf 100644
--- a/source4/winbind/wb_pam_auth.c
+++ b/source4/winbind/wb_pam_auth.c
@@ -245,7 +245,6 @@ struct composite_context *wb_cmd_pam_auth_send(TALLOC_CTX *mem_ctx,
names_blob = NTLMv2_generate_names_blob(
mem_ctx,
- lp_iconv_convenience(service->task->lp_ctx),
cli_credentials_get_workstation(credentials),
cli_credentials_get_domain(credentials));