summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-09-14 23:21:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:06:46 -0500
commit9a012df08ee829c1d40fc88ba12a0ea479f60be0 (patch)
tree98fc38abc69111d06d29b0f7c57a5f3372bdcbed /source4
parent6f37a17d4a66c67de974cec14ebdf627114a397e (diff)
downloadsamba-9a012df08ee829c1d40fc88ba12a0ea479f60be0.tar.gz
samba-9a012df08ee829c1d40fc88ba12a0ea479f60be0.tar.xz
samba-9a012df08ee829c1d40fc88ba12a0ea479f60be0.zip
r25175: Change to talloc_asprintf_append_buffer().
Jeremy. (This used to be commit 0844dbf597191b3e4d35a696695b229e986daec4)
Diffstat (limited to 'source4')
-rw-r--r--source4/client/client.c4
-rw-r--r--source4/lib/talloc/testsuite.c8
-rw-r--r--source4/lib/util/util_strlist.c6
-rw-r--r--source4/libcli/cldap/cldap.c14
-rw-r--r--source4/libcli/nbt/nbtname.c2
-rw-r--r--source4/libcli/security/sddl.c12
-rw-r--r--source4/libcli/util/asn1.c4
-rw-r--r--source4/libnet/libnet_become_dc.c2
-rw-r--r--source4/libnet/libnet_unbecome_dc.c2
-rw-r--r--source4/librpc/ndr/ndr.c6
-rw-r--r--source4/librpc/rpc/dcerpc_util.c14
-rw-r--r--source4/nbt_server/wins/wins_hook.c2
-rw-r--r--source4/scripting/ejs/smbcalls_string.c10
-rw-r--r--source4/torture/basic/denytest.c2
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c4
-rw-r--r--source4/torture/rpc/session_key.c6
-rw-r--r--source4/torture/rpc/srvsvc.c2
-rw-r--r--source4/utils/nmblookup.c8
-rw-r--r--source4/utils/ntlm_auth.c2
-rw-r--r--source4/web_server/http.c6
-rw-r--r--source4/winbind/wb_cmd_list_users.c2
-rw-r--r--source4/winbind/wb_samba3_cmd.c6
22 files changed, 62 insertions, 62 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 6a4a9c10405..cd81f8c8324 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -507,7 +507,7 @@ static void do_list_helper(struct clilist_file_info *f, const char *mask, void *
p = strrchr_m(mask2,'\\');
if (!p) return;
p[1] = 0;
- mask2 = talloc_asprintf_append(mask2, "%s\\*", f->name);
+ mask2 = talloc_asprintf_append_buffer(mask2, "%s\\*", f->name);
add_to_do_list_queue(mask2);
}
return;
@@ -861,7 +861,7 @@ static void do_mget(struct smbclient_context *ctx, struct clilist_file_info *fin
/* handle directories */
saved_curdir = talloc_strdup(NULL, ctx->remote_cur_dir);
- ctx->remote_cur_dir = talloc_asprintf_append(NULL, "%s\\", finfo->name);
+ ctx->remote_cur_dir = talloc_asprintf_append_buffer(NULL, "%s\\", finfo->name);
string_replace(discard_const_p(char, finfo->name), '\\', '/');
if (ctx->lowercase) {
diff --git a/source4/lib/talloc/testsuite.c b/source4/lib/talloc/testsuite.c
index ddf6865b1a5..e16c91f8b9c 100644
--- a/source4/lib/talloc/testsuite.c
+++ b/source4/lib/talloc/testsuite.c
@@ -419,15 +419,15 @@ static bool test_misc(void)
p2 = talloc_strndup(p1, "foo", 2);
torture_assert("misc", strcmp("fo", p2) == 0,
"strndup doesn't work\n");
- p2 = talloc_asprintf_append(p2, "o%c", 'd');
+ p2 = talloc_asprintf_append_buffer(p2, "o%c", 'd');
torture_assert("misc", strcmp("food", p2) == 0,
- "talloc_asprintf_append doesn't work\n");
+ "talloc_asprintf_append_buffer doesn't work\n");
CHECK_BLOCKS("misc", p2, 1);
CHECK_BLOCKS("misc", p1, 3);
- p2 = talloc_asprintf_append(NULL, "hello %s", "world");
+ p2 = talloc_asprintf_append_buffer(NULL, "hello %s", "world");
torture_assert("misc", strcmp("hello world", p2) == 0,
- "talloc_asprintf_append doesn't work\n");
+ "talloc_asprintf_append_buffer doesn't work\n");
CHECK_BLOCKS("misc", p2, 1);
CHECK_BLOCKS("misc", p1, 3);
talloc_free(p2);
diff --git a/source4/lib/util/util_strlist.c b/source4/lib/util/util_strlist.c
index ed4ab000316..1f1cc17d00b 100644
--- a/source4/lib/util/util_strlist.c
+++ b/source4/lib/util/util_strlist.c
@@ -151,7 +151,7 @@ _PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char sepera
ret = talloc_strdup(mem_ctx, list[0]);
for (i = 1; list[i]; i++) {
- ret = talloc_asprintf_append(ret, "%c%s", seperator, list[i]);
+ ret = talloc_asprintf_append_buffer(ret, "%c%s", seperator, list[i]);
}
return ret;
@@ -174,9 +174,9 @@ _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char
for (i = 1; list[i]; i++) {
if (strchr(list[i], ' ') || strlen(list[i]) == 0)
- ret = talloc_asprintf_append(ret, "%c\"%s\"", sep, list[i]);
+ ret = talloc_asprintf_append_buffer(ret, "%c\"%s\"", sep, list[i]);
else
- ret = talloc_asprintf_append(ret, "%c%s", sep, list[i]);
+ ret = talloc_asprintf_append_buffer(ret, "%c%s", sep, list[i]);
}
return ret;
diff --git a/source4/libcli/cldap/cldap.c b/source4/libcli/cldap/cldap.c
index 4c41e130145..9381e80934d 100644
--- a/source4/libcli/cldap/cldap.c
+++ b/source4/libcli/cldap/cldap.c
@@ -536,26 +536,26 @@ struct cldap_request *cldap_netlogon_send(struct cldap_socket *cldap,
ldap_encode_ndr_uint32(tmp_ctx, io->in.version));
if (filter == NULL) goto failed;
if (io->in.user) {
- filter = talloc_asprintf_append(filter, "(User=%s)", io->in.user);
+ filter = talloc_asprintf_append_buffer(filter, "(User=%s)", io->in.user);
if (filter == NULL) goto failed;
}
if (io->in.host) {
- filter = talloc_asprintf_append(filter, "(Host=%s)", io->in.host);
+ filter = talloc_asprintf_append_buffer(filter, "(Host=%s)", io->in.host);
if (filter == NULL) goto failed;
}
if (io->in.realm) {
- filter = talloc_asprintf_append(filter, "(DnsDomain=%s)", io->in.realm);
+ filter = talloc_asprintf_append_buffer(filter, "(DnsDomain=%s)", io->in.realm);
if (filter == NULL) goto failed;
}
if (io->in.acct_control != -1) {
- filter = talloc_asprintf_append(filter, "(AAC=%s)",
+ filter = talloc_asprintf_append_buffer(filter, "(AAC=%s)",
ldap_encode_ndr_uint32(tmp_ctx, io->in.acct_control));
if (filter == NULL) goto failed;
}
if (io->in.domain_sid) {
struct dom_sid *sid = dom_sid_parse_talloc(tmp_ctx, io->in.domain_sid);
if (sid == NULL) goto failed;
- filter = talloc_asprintf_append(filter, "(domainSid=%s)",
+ filter = talloc_asprintf_append_buffer(filter, "(domainSid=%s)",
ldap_encode_ndr_dom_sid(tmp_ctx, sid));
if (filter == NULL) goto failed;
}
@@ -564,11 +564,11 @@ struct cldap_request *cldap_netlogon_send(struct cldap_socket *cldap,
NTSTATUS status;
status = GUID_from_string(io->in.domain_guid, &guid);
if (!NT_STATUS_IS_OK(status)) goto failed;
- filter = talloc_asprintf_append(filter, "(DomainGuid=%s)",
+ filter = talloc_asprintf_append_buffer(filter, "(DomainGuid=%s)",
ldap_encode_ndr_GUID(tmp_ctx, &guid));
if (filter == NULL) goto failed;
}
- filter = talloc_asprintf_append(filter, ")");
+ filter = talloc_asprintf_append_buffer(filter, ")");
if (filter == NULL) goto failed;
search.in.dest_address = io->in.dest_address;
diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c
index 911eb0cb5fc..416814220b9 100644
--- a/source4/libcli/nbt/nbtname.c
+++ b/source4/libcli/nbt/nbtname.c
@@ -111,7 +111,7 @@ _PUBLIC_ NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const
NT_STATUS_NOT_OK_RETURN(status);
if (component == NULL) break;
if (name) {
- name = talloc_asprintf_append(name, ".%s", component);
+ name = talloc_asprintf_append_buffer(name, ".%s", component);
NT_STATUS_HAVE_NO_MEMORY(name);
} else {
name = (char *)component;
diff --git a/source4/libcli/security/sddl.c b/source4/libcli/security/sddl.c
index 4342a7b87a5..d4efab9b641 100644
--- a/source4/libcli/security/sddl.c
+++ b/source4/libcli/security/sddl.c
@@ -405,7 +405,7 @@ static char *sddl_flags_to_string(TALLOC_CTX *mem_ctx, const struct flag_map *ma
/* now by bits */
for (i=0;map[i].name;i++) {
if ((flags & map[i].flag) != 0) {
- s = talloc_asprintf_append(s, "%s", map[i].name);
+ s = talloc_asprintf_append_buffer(s, "%s", map[i].name);
if (s == NULL) goto failed;
flags &= ~map[i].flag;
}
@@ -532,7 +532,7 @@ static char *sddl_encode_acl(TALLOC_CTX *mem_ctx, const struct security_acl *acl
for (i=0;i<acl->num_aces;i++) {
char *ace = sddl_encode_ace(sddl, &acl->aces[i], domain_sid);
if (ace == NULL) goto failed;
- sddl = talloc_asprintf_append(sddl, "(%s)", ace);
+ sddl = talloc_asprintf_append_buffer(sddl, "(%s)", ace);
if (sddl == NULL) goto failed;
talloc_free(ace);
}
@@ -563,28 +563,28 @@ char *sddl_encode(TALLOC_CTX *mem_ctx, const struct security_descriptor *sd,
if (sd->owner_sid != NULL) {
char *sid = sddl_encode_sid(tmp_ctx, sd->owner_sid, domain_sid);
if (sid == NULL) goto failed;
- sddl = talloc_asprintf_append(sddl, "O:%s", sid);
+ sddl = talloc_asprintf_append_buffer(sddl, "O:%s", sid);
if (sddl == NULL) goto failed;
}
if (sd->group_sid != NULL) {
char *sid = sddl_encode_sid(tmp_ctx, sd->group_sid, domain_sid);
if (sid == NULL) goto failed;
- sddl = talloc_asprintf_append(sddl, "G:%s", sid);
+ sddl = talloc_asprintf_append_buffer(sddl, "G:%s", sid);
if (sddl == NULL) goto failed;
}
if ((sd->type & SEC_DESC_DACL_PRESENT) && sd->dacl != NULL) {
char *acl = sddl_encode_acl(tmp_ctx, sd->dacl, sd->type, domain_sid);
if (acl == NULL) goto failed;
- sddl = talloc_asprintf_append(sddl, "D:%s", acl);
+ sddl = talloc_asprintf_append_buffer(sddl, "D:%s", acl);
if (sddl == NULL) goto failed;
}
if ((sd->type & SEC_DESC_SACL_PRESENT) && sd->sacl != NULL) {
char *acl = sddl_encode_acl(tmp_ctx, sd->sacl, sd->type>>1, domain_sid);
if (acl == NULL) goto failed;
- sddl = talloc_asprintf_append(sddl, "S:%s", acl);
+ sddl = talloc_asprintf_append_buffer(sddl, "S:%s", acl);
if (sddl == NULL) goto failed;
}
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 8bd091a3195..7e2d54fcbd8 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -514,13 +514,13 @@ BOOL ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID)
tmp_oid = talloc_asprintf(mem_ctx, "%u", b[0]/40);
if (!tmp_oid) goto nomem;
- tmp_oid = talloc_asprintf_append(tmp_oid, ".%u", b[0]%40);
+ tmp_oid = talloc_asprintf_append_buffer(tmp_oid, ".%u", b[0]%40);
if (!tmp_oid) goto nomem;
for(i = 1, v = 0; i < blob.length; i++) {
v = (v<<7) | (b[i]&0x7f);
if ( ! (b[i] & 0x80)) {
- tmp_oid = talloc_asprintf_append(tmp_oid, ".%u", v);
+ tmp_oid = talloc_asprintf_append_buffer(tmp_oid, ".%u", v);
v = 0;
}
if (!tmp_oid) goto nomem;
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 13d20202e12..b06573448e3 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -2910,7 +2910,7 @@ struct composite_context *libnet_BecomeDC_send(struct libnet_context *ctx, TALLO
/* Destination DSA dns_name construction */
tmp_name = strlower_talloc(s, s->dest_dsa.netbios_name);
if (composite_nomem(tmp_name, c)) return c;
- tmp_name = talloc_asprintf_append(tmp_name, ".%s",s->domain.dns_name);
+ tmp_name = talloc_asprintf_append_buffer(tmp_name, ".%s",s->domain.dns_name);
if (composite_nomem(tmp_name, c)) return c;
s->dest_dsa.dns_name = tmp_name;
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index 6b63ebc8393..643b97bc8b6 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -698,7 +698,7 @@ struct composite_context *libnet_UnbecomeDC_send(struct libnet_context *ctx, TAL
/* Destination DSA dns_name construction */
tmp_name = strlower_talloc(s, s->dest_dsa.netbios_name);
if (composite_nomem(tmp_name, c)) return c;
- s->dest_dsa.dns_name = talloc_asprintf_append(tmp_name, ".%s",
+ s->dest_dsa.dns_name = talloc_asprintf_append_buffer(tmp_name, ".%s",
s->domain.dns_name);
if (composite_nomem(s->dest_dsa.dns_name, c)) return c;
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index a9e42f1eb6a..49cfd3a9fe1 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -200,15 +200,15 @@ _PUBLIC_ void ndr_print_string_helper(struct ndr_print *ndr, const char *format,
int i;
for (i=0;i<ndr->depth;i++) {
- ndr->private_data = talloc_asprintf_append(
+ ndr->private_data = talloc_asprintf_append_buffer(
(char *)ndr->private_data, " ");
}
va_start(ap, format);
- ndr->private_data = talloc_vasprintf_append((char *)ndr->private_data,
+ ndr->private_data = talloc_vasprintf_append_buffer((char *)ndr->private_data,
format, ap);
va_end(ap);
- ndr->private_data = talloc_asprintf_append((char *)ndr->private_data,
+ ndr->private_data = talloc_asprintf_append_buffer((char *)ndr->private_data,
"\n");
}
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index e82302585c6..dffba4aedfd 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -255,42 +255,42 @@ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b)
}
if (t_name != NULL) {
- s = talloc_asprintf_append(s, "%s:", t_name);
+ s = talloc_asprintf_append_buffer(s, "%s:", t_name);
if (s == NULL) {
return NULL;
}
}
if (b->host) {
- s = talloc_asprintf_append(s, "%s", b->host);
+ s = talloc_asprintf_append_buffer(s, "%s", b->host);
}
if (!b->endpoint && !b->options && !b->flags) {
return s;
}
- s = talloc_asprintf_append(s, "[");
+ s = talloc_asprintf_append_buffer(s, "[");
if (b->endpoint) {
- s = talloc_asprintf_append(s, "%s", b->endpoint);
+ s = talloc_asprintf_append_buffer(s, "%s", b->endpoint);
}
/* this is a *really* inefficent way of dealing with strings,
but this is rarely called and the strings are always short,
so I don't care */
for (i=0;b->options && b->options[i];i++) {
- s = talloc_asprintf_append(s, ",%s", b->options[i]);
+ s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]);
if (!s) return NULL;
}
for (i=0;i<ARRAY_SIZE(ncacn_options);i++) {
if (b->flags & ncacn_options[i].flag) {
- s = talloc_asprintf_append(s, ",%s", ncacn_options[i].name);
+ s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name);
if (!s) return NULL;
}
}
- s = talloc_asprintf_append(s, "]");
+ s = talloc_asprintf_append_buffer(s, "]");
return s;
}
diff --git a/source4/nbt_server/wins/wins_hook.c b/source4/nbt_server/wins/wins_hook.c
index e89e6b8d26b..090621d890d 100644
--- a/source4/nbt_server/wins/wins_hook.c
+++ b/source4/nbt_server/wins/wins_hook.c
@@ -67,7 +67,7 @@ void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec,
if (!cmd) goto failed;
for (i=0; rec->addresses[i]; i++) {
- cmd = talloc_asprintf_append(cmd, " %s", rec->addresses[i]->address);
+ cmd = talloc_asprintf_append_buffer(cmd, " %s", rec->addresses[i]->address);
if (!cmd) goto failed;
}
diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c
index 215ce77b77e..541303ff2d0 100644
--- a/source4/scripting/ejs/smbcalls_string.c
+++ b/source4/scripting/ejs/smbcalls_string.c
@@ -238,7 +238,7 @@ static int ejs_join(MprVarHandle eid, int argc, struct MprVar **argv)
goto failed;
}
for (i=1;list[i];i++) {
- ret = talloc_asprintf_append(ret, "%s%s", separator, list[i]);
+ ret = talloc_asprintf_append_buffer(ret, "%s%s", separator, list[i]);
if (ret == NULL) {
goto failed;
}
@@ -275,7 +275,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
ret = talloc_strdup(tmp_ctx, "");
/* avoid all the format string warnings */
- _asprintf_append = (_asprintf_append_t)talloc_asprintf_append;
+ _asprintf_append = (_asprintf_append_t)talloc_asprintf_append_buffer;
/*
hackity hack ...
@@ -284,7 +284,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
char *fmt2;
int len, len_count=0;
char *tstr;
- ret = talloc_asprintf_append(ret, "%*.*s",
+ ret = talloc_asprintf_append_buffer(ret, "%*.*s",
(int)(p-format), (int)(p-format),
format);
if (ret == NULL) goto failed;
@@ -299,7 +299,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
tstr--;
}
if (strcmp(tstr, "%") == 0) {
- ret = talloc_asprintf_append(ret, "%%");
+ ret = talloc_asprintf_append_buffer(ret, "%%");
if (ret == NULL) {
goto failed;
}
@@ -372,7 +372,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
format += len+1;
}
- ret = talloc_asprintf_append(ret, "%s", format);
+ ret = talloc_asprintf_append_buffer(ret, "%s", format);
mpr_Return(eid, mprString(ret));
talloc_free(tmp_ctx);
return 0;
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 05c613d6478..7709ccebcae 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1645,7 +1645,7 @@ static const char *bit_string(TALLOC_CTX *mem_ctx, const struct bit_value *bv, i
if (ret == NULL) {
ret = talloc_asprintf(mem_ctx, "%s", bv[i].name);
} else {
- ret = talloc_asprintf_append(ret, " | %s", bv[i].name);
+ ret = talloc_asprintf_append_buffer(ret, " | %s", bv[i].name);
}
}
}
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 9e870d9f266..c4b1a57ff1a 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -345,7 +345,7 @@ static NTSTATUS test_apply_schema(struct test_become_dc_state *s,
tmp_dns_name = GUID_string(s_dsa->other_info, &s_dsa->source_dsa_obj_guid);
NT_STATUS_HAVE_NO_MEMORY(tmp_dns_name);
- tmp_dns_name = talloc_asprintf_append(tmp_dns_name, "._msdcs.%s", c->forest->dns_name);
+ tmp_dns_name = talloc_asprintf_append_buffer(tmp_dns_name, "._msdcs.%s", c->forest->dns_name);
NT_STATUS_HAVE_NO_MEMORY(tmp_dns_name);
s_dsa->other_info->dns_name = tmp_dns_name;
@@ -642,7 +642,7 @@ static NTSTATUS test_become_dc_store_chunk(void *private_data,
tmp_dns_name = GUID_string(s_dsa->other_info, &s_dsa->source_dsa_obj_guid);
NT_STATUS_HAVE_NO_MEMORY(tmp_dns_name);
- tmp_dns_name = talloc_asprintf_append(tmp_dns_name, "._msdcs.%s", c->forest->dns_name);
+ tmp_dns_name = talloc_asprintf_append_buffer(tmp_dns_name, "._msdcs.%s", c->forest->dns_name);
NT_STATUS_HAVE_NO_MEMORY(tmp_dns_name);
s_dsa->other_info->dns_name = tmp_dns_name;
diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c
index a976d2fec2a..ac65b80071c 100644
--- a/source4/torture/rpc/session_key.c
+++ b/source4/torture/rpc/session_key.c
@@ -192,13 +192,13 @@ static struct torture_tcase *add_test(struct torture_suite *suite, uint32_t bind
else
name = talloc_strdup(suite, "unknown");
- name = talloc_asprintf_append(name, " keyexchange:%s", keyexchange?"yes":"no");
+ name = talloc_asprintf_append_buffer(name, " keyexchange:%s", keyexchange?"yes":"no");
settings->keyexchange = keyexchange;
- name = talloc_asprintf_append(name, " ntlm2:%s", ntlm2?"yes":"no");
+ name = talloc_asprintf_append_buffer(name, " ntlm2:%s", ntlm2?"yes":"no");
settings->ntlm2 = ntlm2;
- name = talloc_asprintf_append(name, " lm_key:%s", lm_key?"yes":"no");
+ name = talloc_asprintf_append_buffer(name, " lm_key:%s", lm_key?"yes":"no");
settings->lm_key = lm_key;
return torture_suite_add_simple_tcase(suite, name, test_secrets, settings);
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 6fa9d1b34b5..1fe1221b0d6 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -938,7 +938,7 @@ again:
}
if (!W_ERROR_IS_OK(r.out.result)) {
- invalidc = talloc_asprintf_append(invalidc, "%c", (char)n);
+ invalidc = talloc_asprintf_append_buffer(invalidc, "%c", (char)n);
}
talloc_free(name);
diff --git a/source4/utils/nmblookup.c b/source4/utils/nmblookup.c
index e9f48f8d414..affc38e3e77 100644
--- a/source4/utils/nmblookup.c
+++ b/source4/utils/nmblookup.c
@@ -86,16 +86,16 @@ static char *node_status_flags(TALLOC_CTX *mem_ctx, uint16_t flags)
ret = talloc_asprintf(mem_ctx, "%s %s", group, type);
if (flags & NBT_NM_DEREGISTER) {
- ret = talloc_asprintf_append(ret, " <DEREGISTERING>");
+ ret = talloc_asprintf_append_buffer(ret, " <DEREGISTERING>");
}
if (flags & NBT_NM_CONFLICT) {
- ret = talloc_asprintf_append(ret, " <CONFLICT>");
+ ret = talloc_asprintf_append_buffer(ret, " <CONFLICT>");
}
if (flags & NBT_NM_ACTIVE) {
- ret = talloc_asprintf_append(ret, " <ACTIVE>");
+ ret = talloc_asprintf_append_buffer(ret, " <ACTIVE>");
}
if (flags & NBT_NM_PERMANENT) {
- ret = talloc_asprintf_append(ret, " <PERMANENT>");
+ ret = talloc_asprintf_append_buffer(ret, " <PERMANENT>");
}
return ret;
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 8775bab2db3..6055670d77d 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -569,7 +569,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
struct security_token *token = session_info->security_token;
const char *sidstr = dom_sid_string(session_info,
token->sids[i]);
- grouplist = talloc_asprintf_append(grouplist, "%s,", sidstr);
+ grouplist = talloc_asprintf_append_buffer(grouplist, "%s,", sidstr);
}
mux_printf(mux_id, "GL %s\n", grouplist);
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index 150649e1bbd..d19a26ac0e6 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -82,7 +82,7 @@ static void http_output_headers(struct websrv_context *web)
web->output.response_code, response_string);
if (s == NULL) return;
for (i=0;web->output.headers[i];i++) {
- s = talloc_asprintf_append(s, "%s\r\n", web->output.headers[i]);
+ s = talloc_asprintf_append_buffer(s, "%s\r\n", web->output.headers[i]);
}
/* work out the content length */
@@ -92,7 +92,7 @@ static void http_output_headers(struct websrv_context *web)
fstat(web->output.fd, &st);
content_length += st.st_size;
}
- s = talloc_asprintf_append(s, "Content-Length: %u\r\n\r\n", content_length);
+ s = talloc_asprintf_append_buffer(s, "Content-Length: %u\r\n\r\n", content_length);
if (s == NULL) return;
b = web->output.content;
@@ -125,7 +125,7 @@ static const char *http_local_path(struct websrv_context *web,
if (path == NULL) return NULL;
if (directory_exist(path)) {
- path = talloc_asprintf_append(path, "/index.esp");
+ path = talloc_asprintf_append_buffer(path, "/index.esp");
}
return path;
}
diff --git a/source4/winbind/wb_cmd_list_users.c b/source4/winbind/wb_cmd_list_users.c
index fd446a56d2c..f67f1334888 100644
--- a/source4/winbind/wb_cmd_list_users.c
+++ b/source4/winbind/wb_cmd_list_users.c
@@ -143,7 +143,7 @@ static void cmd_list_users_recv_user_list(struct composite_context *ctx)
for (i = 0; i < user_list->out.count; ++i) {
DEBUG(5, ("Appending user '%s'\n", user_list->out.users[i].username));
- state->result = talloc_asprintf_append(state->result, "%s,",
+ state->result = talloc_asprintf_append_buffer(state->result, "%s,",
user_list->out.users[i].username);
}
diff --git a/source4/winbind/wb_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c
index e1f32b23f70..56a168ebb0e 100644
--- a/source4/winbind/wb_samba3_cmd.c
+++ b/source4/winbind/wb_samba3_cmd.c
@@ -252,7 +252,7 @@ static void userdomgroups_recv_groups(struct composite_context *ctx)
}
for (i=0; i<num_sids; i++) {
- sids_string = talloc_asprintf_append(
+ sids_string = talloc_asprintf_append_buffer(
sids_string, "%s\n", dom_sid_string(s3call, sids[i]));
}
@@ -319,7 +319,7 @@ static void usersids_recv_sids(struct composite_context *ctx)
}
for (i=0; i<num_sids; i++) {
- sids_string = talloc_asprintf_append(
+ sids_string = talloc_asprintf_append_buffer(
sids_string, "%s\n", dom_sid_string(s3call, sids[i]));
if (sids_string == NULL) {
status = NT_STATUS_NO_MEMORY;
@@ -620,7 +620,7 @@ static void list_trustdom_recv_doms(struct composite_context *ctx)
}
for (i=0; i<num_domains; i++) {
- result = talloc_asprintf_append(
+ result = talloc_asprintf_append_buffer(
result, "%s\\%s\\%s",
domains[i]->name, domains[i]->name,
dom_sid_string(s3call, domains[i]->sid));