From 3b3e21bd9ba701a97e752205263a7903619541c7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 19 Mar 2009 12:20:11 +1100 Subject: 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 --- source3/libsmb/smbencrypt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/libsmb/smbencrypt.c') diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index a76be3cc1a..27702b9f42 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -172,16 +172,16 @@ bool ntv2_owf_gen(const uchar owf[16], HMACMD5Context ctx; - if (!push_ucs2_allocate(&user, user_in, &user_byte_len)) { - DEBUG(0, ("push_uss2_allocate() for user failed: %s\n", + if (!push_ucs2_talloc(NULL, &user, user_in, &user_byte_len)) { + DEBUG(0, ("push_uss2_talloc() for user failed: %s\n", strerror(errno))); return False; } - if (!push_ucs2_allocate(&domain, domain_in, &domain_byte_len)) { - DEBUG(0, ("push_uss2_allocate() for domain failed: %s\n", + if (!push_ucs2_talloc(NULL, &domain, domain_in, &domain_byte_len)) { + DEBUG(0, ("push_uss2_talloc() for domain failed: %s\n", strerror(errno))); - SAFE_FREE(user); + TALLOC_FREE(user); return False; } @@ -210,8 +210,8 @@ bool ntv2_owf_gen(const uchar owf[16], dump_data(100, (uint8 *)kr_buf, 16); #endif - SAFE_FREE(user); - SAFE_FREE(domain); + TALLOC_FREE(user); + TALLOC_FREE(domain); return True; } -- cgit