r25175: Change to talloc_asprintf_append_buffer().
authorJeremy Allison <jra@samba.org>
Fri, 14 Sep 2007 23:21:00 +0000 (23:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:06:46 +0000 (15:06 -0500)
Jeremy.

22 files changed:
source/client/client.c
source/lib/talloc/testsuite.c
source/lib/util/util_strlist.c
source/libcli/cldap/cldap.c
source/libcli/nbt/nbtname.c
source/libcli/security/sddl.c
source/libcli/util/asn1.c
source/libnet/libnet_become_dc.c
source/libnet/libnet_unbecome_dc.c
source/librpc/ndr/ndr.c
source/librpc/rpc/dcerpc_util.c
source/nbt_server/wins/wins_hook.c
source/scripting/ejs/smbcalls_string.c
source/torture/basic/denytest.c
source/torture/libnet/libnet_BecomeDC.c
source/torture/rpc/session_key.c
source/torture/rpc/srvsvc.c
source/utils/nmblookup.c
source/utils/ntlm_auth.c
source/web_server/http.c
source/winbind/wb_cmd_list_users.c
source/winbind/wb_samba3_cmd.c

index 6a4a9c1040591fdea0678048b0567bbeb201b866..cd81f8c832404722b571e891cc4bdbef975f3040 100644 (file)
@@ -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) {
index ddf6865b1a5621a61e580c3df00d916bbe2c157a..e16c91f8b9c27cb0b3f308ff42a2d13ae5413eb4 100644 (file)
@@ -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);
index ed4ab000316b03f03e4bc88720924278f19361d8..1f1cc17d00b27e0e49359fab8366c81d5b38fef8 100644 (file)
@@ -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;
index 4c41e1301452bf45fe589045bf8acafc4b5d1713..9381e80934dc3dd72406c2c5fb67af2aed1ac356 100644 (file)
@@ -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;
index 911eb0cb5fc1785db95c2c9c5d18cc138b9ce177..416814220b90fb4a4a522cd3dfd1593b751cff09 100644 (file)
@@ -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;
index 4342a7b87a5f068a90c0137948ed986d57e1ab5c..d4efab9b641e9346fe44a014cd2901dbff3d5083 100644 (file)
@@ -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;
        }
 
index 8bd091a3195730f9f8aecf9dfb61937cb449cc34..7e2d54fcbd8b02d9a74b7c882530deb9049f761b 100644 (file)
@@ -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;
index 13d20202e12d935b3bdf98d4ec620aa7a7fd841d..b06573448e374a9cfc6c09ade1d7831fe2029f52 100644 (file)
@@ -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;
 
index 6b63ebc8393c5b7bc531fadbc214952205d65af1..643b97bc8b675d6ec15538045cb062a06f6f8a12 100644 (file)
@@ -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;
 
index a9e42f1eb6a961f6defa9ab52c7a1c84688003b7..49cfd3a9fe11792ca0074d205326ee39ee336c39 100644 (file)
@@ -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");
 }
 
index e82302585c66afcd60451baeca7a3a04d389ba7d..dffba4aedfd2031a5617848f9db9bbfcb45b87b4 100644 (file)
@@ -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;
 }
index e89e6b8d26badd4e712d732c76b13a64ade4ee06..090621d890d00bd8e2f68d5b7b7e5c3b9e9b60c6 100644 (file)
@@ -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;
        }
 
index 215ce77b77e163e20f4beaeaea3428dc4be95609..541303ff2d0ecf3d9b920b9f4f1eb68c1d4abe8c 100644 (file)
@@ -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;          
index 05c613d64786d2e41e37687f9e7b9df4e1484e87..7709ccebcae38a3debe7ac74fe85ddeed5e942af 100644 (file)
@@ -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);
                        }
                }
        }
index 9e870d9f266971c88522a5d0b10b8129c27895ab..c4b1a57ff1a8185075a800f12c2b813831c0eaf7 100644 (file)
@@ -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;
 
index a976d2fec2a03a3f0e73d5f516957c14720ae5f9..ac65b80071c05c4433191166febf93c2e4a5b712 100644 (file)
@@ -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);
index 6fa9d1b34b546fe7f3f1473f13f374c71f8e033a..1fe1221b0d67c2a18ca2d709dc2ca56ef2b7968d 100644 (file)
@@ -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);
index e9f48f8d41447c8455b846423776b40448343472..affc38e3e7744355ef477e15332da4f2ac5e52ef 100644 (file)
@@ -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;
index 8775bab2db3b04a0795aec9b18e2bcd373eab845..6055670d77ddf2ebc7a0b61b0f764515e3c80aae 100644 (file)
@@ -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);
index 150649e1bbdc0d4a20827442f9b8b534b0bd5a2d..d19a26ac0e60ac25944f564586e2da7bcd38f97a 100644 (file)
@@ -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;
 }
index fd446a56d2c5b4884a909225a622a8b0cb5f3885..f67f13348887fc31e0b4d8f6ad224f1ab6b25791 100644 (file)
@@ -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);
        }
 
index e1f32b23f70840d160386a44739a471fc6be7e7c..56a168ebb0ed65386a4a7bedca61ace7c2bca8ed 100644 (file)
@@ -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));