From e0efa2c97a24be68cf93784c954f7313e1bc591f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 12 Jan 2007 17:25:43 +0000 Subject: r20714: we can use talloc_asprintf_append() again, because strupper_talloc() creates string with the correct memory size without padding zero bytes at the end metze (This used to be commit df8e97014bf67e59ab9a88ce225819d6057dfb08) --- source4/libnet/libnet_become_dc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source4/libnet/libnet_become_dc.c') diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index b95aae1fa4..89c993eb77 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -2154,13 +2154,12 @@ struct composite_context *libnet_BecomeDC_send(struct libnet_context *ctx, TALLO if (composite_nomem(s->dest_dsa.netbios_name, c)) return c; /* Destination DSA dns_name construction */ - tmp_name = strlower_talloc(s, s->dest_dsa.netbios_name); + 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(s, "%s.%s", - tmp_name, - s->domain.dns_name); - talloc_free(tmp_name); - if (composite_nomem(s->dest_dsa.dns_name, c)) return c; + tmp_name = talloc_asprintf_append(tmp_name, ".%s",s->domain.dns_name); + if (composite_nomem(tmp_name, c)) return c; + s->dest_dsa.dns_name = tmp_name; + /* Callback function pointers */ s->callbacks = r->in.callbacks; -- cgit