summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-05 21:22:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:03 -0500
commit927e1636702351d183cd76c8ff34c82c5e80c51f (patch)
treeced098441e940986deacd9a8335a668b5824b121 /source4
parent21664e91abe0a06a9716e59076a0f3dcf638ded7 (diff)
downloadsamba-927e1636702351d183cd76c8ff34c82c5e80c51f.tar.gz
samba-927e1636702351d183cd76c8ff34c82c5e80c51f.tar.bz2
samba-927e1636702351d183cd76c8ff34c82c5e80c51f.zip
r20570: use talloc_asprintf() instead of talloc_asprintf_append()
because talloc_asprintf_append() doesn't work like talloc_append_string() which uses strlen() on the old string instead of (tc->size - 1) This matter in this case because strlower_talloc() over allocates tridge: how should we fix this in lib/talloc/? metze (This used to be commit 1748af20b1f7b325048619a1e66a1c8b69474c5f)
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_become_dc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index c5e959f309..97be186f72 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -2151,10 +2151,11 @@ 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;
- s->dest_dsa.dns_name = talloc_asprintf_append(tmp_name, ".%s",
- s->domain.dns_name);
+ s->dest_dsa.dns_name = talloc_asprintf(s, "%s.%s",
+ tmp_name,
+ s->domain.dns_name);
+ talloc_free(tmp_name);
if (composite_nomem(s->dest_dsa.dns_name, c)) return c;
-
/* Callback function pointers */
s->callbacks = r->in.callbacks;