License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "includes.h"
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/ndr_misc.h"
+
#include "dns.h"
#include <ctype.h>
+
static DNS_ERROR LabelList( TALLOC_CTX *mem_ctx,
const char *name,
struct dns_domain_label **presult )
return ERROR_DNS_INVALID_NAME;
}
- if (!(result = TALLOC_ZERO_P(mem_ctx, struct dns_domain_label))) {
+ if (!(result = talloc_zero(mem_ctx, struct dns_domain_label))) {
return ERROR_DNS_NO_MEMORY;
}
char *result = NULL;
#if defined(WITH_DNS_UPDATES)
- uuid_t uuid;
-
- /*
- * uuid_unparse gives 36 bytes plus '\0'
- */
- if (!(result = talloc_array(mem_ctx, char, 37))) {
- return NULL;
- }
+ struct GUID guid;
- uuid_generate( uuid );
- uuid_unparse( uuid, result );
+ guid = GUID_random();
+ result = GUID_string(mem_ctx, &guid);
#endif