]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] revert dlzexternal changes for portability
authorEvan Hunt <each@isc.org>
Thu, 14 Sep 2017 18:33:24 +0000 (11:33 -0700)
committerEvan Hunt <each@isc.org>
Thu, 14 Sep 2017 18:33:24 +0000 (11:33 -0700)
bin/tests/system/dlzexternal/Makefile.in
bin/tests/system/dlzexternal/driver.c

index 08cfed6f72646dec1365a98b6d438d6b8af87c16..2a1a6d14344518d81e474d9f154071956ec294b1 100644 (file)
@@ -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}
index 79ce22909fe2cfaa4bdf72757466664f0445c38c..5377c9c8dc1dc963c97de1cc6aae173d4fb8ca8e 100644 (file)
@@ -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 <=