mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-12 05:32:42 -04:00
[v9_11] revert dlzexternal changes for portability
This commit is contained in:
parent
2b5e8ac281
commit
a3b6dcd418
2 changed files with 10 additions and 18 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* 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 <=
|
||||
|
|
|
|||
Loading…
Reference in a new issue