summaryrefslogtreecommitdiff
path: root/lib/addns/dnsutils.c
diff options
context:
space:
mode:
authorAndriy Syrovenko <andriys@gmail.com>2012-05-26 23:41:16 +0300
committerAndrew Bartlett <abartlet@samba.org>2012-05-27 13:15:56 +1000
commitc85f33458fff24c472ad440de3bbc15ee8f94f53 (patch)
tree05f4ddf5780c368f7b2ac68301f1f8e7d9d0e370 /lib/addns/dnsutils.c
parent6634360ce55a84319f197be44d47fc4f4c3ef4d5 (diff)
downloadsamba-c85f33458fff24c472ad440de3bbc15ee8f94f53.tar.gz
samba-c85f33458fff24c472ad440de3bbc15ee8f94f53.tar.bz2
samba-c85f33458fff24c472ad440de3bbc15ee8f94f53.zip
Eliminate dependency on an external uuid library.
Diffstat (limited to 'lib/addns/dnsutils.c')
-rw-r--r--lib/addns/dnsutils.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/addns/dnsutils.c b/lib/addns/dnsutils.c
index 5a63c61f14..3eeb6ab9e2 100644
--- a/lib/addns/dnsutils.c
+++ b/lib/addns/dnsutils.c
@@ -22,12 +22,13 @@
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>
-#ifdef HAVE_SYS_UUID_H
-#include <sys/uuid.h>
-#endif
static DNS_ERROR LabelList( TALLOC_CTX *mem_ctx,
const char *name,
@@ -137,17 +138,10 @@ char *dns_generate_keyname( TALLOC_CTX *mem_ctx )
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