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/lib/smbldap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/lib/smbldap.c') diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 4f54f9ad58..63629265f1 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -444,12 +444,15 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { /* notreached. */ } - if (!push_utf8_allocate(&utf8_value, value, &converted_size)) { + if (!push_utf8_talloc(talloc_tos(), &utf8_value, value, &converted_size)) { smb_panic("smbldap_set_mod: String conversion failure!"); /* notreached. */ } - - mods[i]->mod_values[j] = utf8_value; + + + mods[i]->mod_values[j] = SMB_STRDUP(utf8_value); + TALLOC_FREE(utf8_value); + SMB_ASSERT(mods[i]->mod_values[j] != NULL); mods[i]->mod_values[j + 1] = NULL; } -- cgit