summaryrefslogtreecommitdiff
path: root/source3/utils/ntlm_auth_diagnostics.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-03-19 12:20:11 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-04-14 12:53:56 +1000
commit3b3e21bd9ba701a97e752205263a7903619541c7 (patch)
tree3f0cdf8e4d5a550a323e73d229083d6329b3f236 /source3/utils/ntlm_auth_diagnostics.c
parent4786a493f70070dce6de4cbe488c9de1bdbb75ad (diff)
downloadsamba-3b3e21bd9ba701a97e752205263a7903619541c7.tar.gz
samba-3b3e21bd9ba701a97e752205263a7903619541c7.tar.bz2
samba-3b3e21bd9ba701a97e752205263a7903619541c7.zip
Convert Samba3 to use the common lib/util/charset API
This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
Diffstat (limited to 'source3/utils/ntlm_auth_diagnostics.c')
-rw-r--r--source3/utils/ntlm_auth_diagnostics.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c
index dcdc8e9a40..17801b2a80 100644
--- a/source3/utils/ntlm_auth_diagnostics.c
+++ b/source3/utils/ntlm_auth_diagnostics.c
@@ -458,31 +458,31 @@ static bool test_plaintext(enum ntlm_break break_which)
flags |= WBFLAG_PAM_LMKEY;
flags |= WBFLAG_PAM_USER_SESSION_KEY;
- if (!push_ucs2_allocate(&nt_response_ucs2, opt_password,
+ if (!push_ucs2_talloc(NULL, &nt_response_ucs2, opt_password,
&converted_size))
{
- DEBUG(0, ("push_ucs2_allocate failed!\n"));
+ DEBUG(0, ("push_ucs2_talloc failed!\n"));
exit(1);
}
nt_response.data = (unsigned char *)nt_response_ucs2;
nt_response.length = strlen_w(nt_response_ucs2)*sizeof(smb_ucs2_t);
- if ((password = strdup_upper(opt_password)) == NULL) {
- DEBUG(0, ("strdup_upper failed!\n"));
+ if ((password = strupper_talloc(NULL, opt_password)) == NULL) {
+ DEBUG(0, ("strupper_talloc() failed!\n"));
exit(1);
}
- if (!convert_string_allocate(NULL, CH_UNIX,
- CH_DOS, password,
- strlen(password)+1,
- &lm_response.data,
- &lm_response.length, True)) {
- DEBUG(0, ("convert_string_allocate failed!\n"));
+ if (!convert_string_talloc(NULL, CH_UNIX,
+ CH_DOS, password,
+ strlen(password)+1,
+ &lm_response.data,
+ &lm_response.length, True)) {
+ DEBUG(0, ("convert_string_talloc failed!\n"));
exit(1);
}
- SAFE_FREE(password);
+ TALLOC_FREE(password);
switch (break_which) {
case BREAK_NONE:
@@ -513,8 +513,8 @@ static bool test_plaintext(enum ntlm_break break_which)
user_session_key,
&error_string, NULL);
- SAFE_FREE(nt_response.data);
- SAFE_FREE(lm_response.data);
+ TALLOC_FREE(nt_response.data);
+ TALLOC_FREE(lm_response.data);
data_blob_free(&chall);
if (!NT_STATUS_IS_OK(nt_status)) {