Commit 364cabf4 authored by Evan Hunt's avatar Evan Hunt

[master] revert dlzexternal changes for portability

parent c59bf663
......@@ -33,13 +33,8 @@ OBJS =
CFLAGS = @CFLAGS@ @SO_CFLAGS@
SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@
ISCLIBS = ../../../../lib/isc/libisc.@A@
SO_STRIP = @SO_STRIP@
driver.@SO@: ${SO_OBJS} ${ISCLIBS}
CLEANED=`echo "${ISCLIBS} ${LIBS}" | ${SO_STRIP}`; \
${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ ${SO_OBJS} \
$${CLEANED}
driver.@SO@: ${SO_OBJS}
${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ driver.@O@
clean distclean::
rm -f ${TARGETS}
......
/*
* Copyright (C) 2011-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2011-2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -231,7 +231,6 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[],
char soa_data[1024];
const char *extra;
isc_result_t result;
size_t znsize;
int n;
UNUSED(dlzname);
......@@ -256,17 +255,15 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[],
}
/* Ensure zone name is absolute */
znsize = strlen(argv[1]) + 2;
state->zone_name = malloc(znsize);
state->zone_name = malloc(strlen(argv[1]) + 2);
if (state->zone_name == NULL) {
free(state);
return (ISC_R_NOMEMORY);
}
if (argv[1][strlen(argv[1]) - 1] == '.') {
strlcpy(state->zone_name, argv[1], znsize);
} else {
snprintf(state->zone_name, znsize, "%s.", argv[1]);
}
if (argv[1][strlen(argv[1]) - 1] == '.')
strcpy(state->zone_name, argv[1]);
else
sprintf(state->zone_name, "%s.", argv[1]);
if (strcmp(state->zone_name, ".") == 0)
extra = ".root";
......@@ -329,7 +326,7 @@ dlz_findzonedb(void *dbdata, const char *name,
char addrbuf[100];
char absolute[1024];
strlcpy(addrbuf, "unknown", sizeof(addrbuf));
strcpy(addrbuf, "unknown");
if (methods != NULL &&
methods->sourceip != NULL &&
methods->version - methods->age <= DNS_CLIENTINFOMETHODS_VERSION &&
......@@ -458,7 +455,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
}
if (strcmp(name, "source-addr") == 0) {
strlcpy(buf, "unknown", sizeof(buf));
strcpy(buf, "unknown");
if (methods != NULL &&
methods->sourceip != NULL &&
(methods->version - methods->age <=
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment