summaryrefslogtreecommitdiff
path: root/source3/lib/substitute.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/lib/substitute.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/lib/substitute.c')
-rw-r--r--source3/lib/substitute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 0cb326961d..c9dc1d2eb4 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -576,7 +576,7 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
switch (*(p+1)) {
case 'U' :
- r = strdup_lower(smb_name);
+ r = strlower_talloc(tmp_ctx, smb_name);
if (r == NULL) {
goto error;
}
@@ -584,7 +584,7 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
break;
case 'G' : {
struct passwd *pass;
- r = SMB_STRDUP(smb_name);
+ r = talloc_strdup(tmp_ctx, smb_name);
if (r == NULL) {
goto error;
}
@@ -598,7 +598,7 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
break;
}
case 'D' :
- r = strdup_upper(domain_name);
+ r = strupper_talloc(tmp_ctx, domain_name);
if (r == NULL) {
goto error;
}
@@ -678,7 +678,7 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
}
p++;
- SAFE_FREE(r);
+ TALLOC_FREE(r);
if (a_string == NULL) {
goto done;