diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-03-19 12:20:11 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-14 12:53:56 +1000 |
commit | 3b3e21bd9ba701a97e752205263a7903619541c7 (patch) | |
tree | 3f0cdf8e4d5a550a323e73d229083d6329b3f236 /source3/lib/smbldap.c | |
parent | 4786a493f70070dce6de4cbe488c9de1bdbb75ad (diff) | |
download | samba-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/lib/smbldap.c')
-rw-r--r-- | source3/lib/smbldap.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; } |