1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-25 14:50:24 +03:00

Eliminate dependency on an external uuid library.

This commit is contained in:
Andriy Syrovenko 2012-05-26 23:41:16 +03:00 committed by Andrew Bartlett
parent 6634360ce5
commit c85f33458f
5 changed files with 11 additions and 24 deletions

View File

@ -42,10 +42,6 @@
#include <time.h>
#include <netdb.h>
#ifdef HAVE_UUID_UUID_H
#include <uuid/uuid.h>
#endif
#include <talloc.h>
/*******************************************************************

View File

@ -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;
struct GUID guid;
/*
* uuid_unparse gives 36 bytes plus '\0'
*/
if (!(result = talloc_array(mem_ctx, char, 37))) {
return NULL;
}
uuid_generate( uuid );
uuid_unparse( uuid, result );
guid = GUID_random();
result = GUID_string(mem_ctx, &guid);
#endif

View File

@ -3,4 +3,5 @@
import Options
def configure(conf):
conf.CHECK_HEADERS('sys/uuid.h')
pass
#conf.CHECK_HEADERS('sys/uuid.h')

View File

@ -2,6 +2,6 @@
bld.SAMBA_LIBRARY('addns',
source='dnsquery.c dnsrecord.c dnsutils.c dnssock.c dnsgss.c dnsmarshall.c error.c',
public_deps='dnshostsfile samba-util gssapi uuid resolv',
public_deps='dnshostsfile samba-util gssapi ndr resolv',
private_library=True,
vars=locals())

View File

@ -785,11 +785,7 @@ int i; i = PAM_RADIO_TYPE;
mandatory=True,
msg="Checking whether setuidx is available")
if Options.options.with_dnsupdate:
conf.CHECK_HEADERS('uuid/uuid.h')
conf.CHECK_FUNCS_IN('uuid_generate', 'uuid')
if not conf.CONFIG_SET('HAVE_UUID_UUID_H') and not conf.CONFIG_SET('HAVE_UUID_GENERATE'):
Logs.warn("--with-dnsupdate=yes but uuid support not sufficient")
elif not conf.CONFIG_SET('HAVE_KRB5'):
if not conf.CONFIG_SET('HAVE_KRB5'):
Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient")
else:
conf.DEFINE('WITH_DNS_UPDATES', 1)