svn commit: samba r20714 - in branches/SAMBA_4_0/source/libnet: .
metze at samba.org
metze at samba.org
Fri Jan 12 17:25:43 GMT 2007
Author: metze
Date: 2007-01-12 17:25:43 +0000 (Fri, 12 Jan 2007)
New Revision: 20714
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20714
Log:
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
Modified:
branches/SAMBA_4_0/source/libnet/libnet_become_dc.c
Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_become_dc.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_become_dc.c 2007-01-12 17:19:48 UTC (rev 20713)
+++ branches/SAMBA_4_0/source/libnet/libnet_become_dc.c 2007-01-12 17:25:43 UTC (rev 20714)
@@ -2154,13 +2154,12 @@
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;
More information about the samba-cvs
mailing list