summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-12 17:25:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:40:30 -0500
commite0efa2c97a24be68cf93784c954f7313e1bc591f (patch)
tree7b592436ef4156ebbb7fe87462e98945e854b2e0 /source4/libnet
parent33f894664005544b80a6640c34dbf133edbe363d (diff)
downloadsamba-e0efa2c97a24be68cf93784c954f7313e1bc591f.tar.gz
samba-e0efa2c97a24be68cf93784c954f7313e1bc591f.tar.bz2
samba-e0efa2c97a24be68cf93784c954f7313e1bc591f.zip
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)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_become_dc.c11
1 files changed, 5 insertions, 6 deletions
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;