summaryrefslogtreecommitdiff
path: root/source4/auth/ntlmssp
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/auth/ntlmssp
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/auth/ntlmssp')
-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
4 files changed, 6 insertions, 13 deletions
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;
}