diff --git a/configure b/configure index c819b7bf1..9a96bb232 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.12.0. +# Generated by GNU Autoconf 2.69 for unbound 1.12.1. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.12.0' -PACKAGE_STRING='unbound 1.12.0' +PACKAGE_VERSION='1.12.1' +PACKAGE_STRING='unbound 1.12.1' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -1459,7 +1459,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.12.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.12.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1524,7 +1524,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.12.0:";; + short | recursive ) echo "Configuration of unbound 1.12.1:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.12.0 +unbound configure 1.12.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2461,7 +2461,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.12.0, which was +It was created by unbound $as_me 1.12.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2813,11 +2813,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=12 -UNBOUND_VERSION_MICRO=0 +UNBOUND_VERSION_MICRO=1 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=10 +LIBUNBOUND_REVISION=11 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2895,6 +2895,7 @@ LIBUNBOUND_AGE=1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 # 1.12.0 had 9:10:1 +# 1.12.1 had 9:11:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -21702,7 +21703,7 @@ _ACEOF -version=1.12.0 +version=1.12.1 date=`date +'%b %e, %Y'` @@ -22221,7 +22222,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.12.0, which was +This file was extended by unbound $as_me 1.12.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22287,7 +22288,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.12.0 +unbound config.status 1.12.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 7d9879294..2bd44353d 100644 --- a/configure.ac +++ b/configure.ac @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[12]) -m4_define([VERSION_MICRO],[0]) +m4_define([VERSION_MICRO],[1]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=10 +LIBUNBOUND_REVISION=11 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -96,6 +96,7 @@ LIBUNBOUND_AGE=1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 # 1.12.0 had 9:10:1 +# 1.12.1 had 9:11:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary diff --git a/dnstap/dnstap.c b/dnstap/dnstap.c index 0c8c6c4d4..b8a321670 100644 --- a/dnstap/dnstap.c +++ b/dnstap/dnstap.c @@ -134,15 +134,13 @@ dt_create(struct config_file* cfg) if(cfg->dnstap && cfg->dnstap_socket_path && cfg->dnstap_socket_path[0] && (cfg->dnstap_ip==NULL || cfg->dnstap_ip[0]==0)) { - char* p = fname_after_chroot(cfg->dnstap_socket_path, cfg, 1); - if(!p) { - log_err("malloc failure"); - return NULL; - } + char* p = cfg->dnstap_socket_path; + if(cfg->chrootdir && cfg->chrootdir[0] && strncmp(p, + cfg->chrootdir, strlen(cfg->chrootdir)) == 0) + p += strlen(cfg->chrootdir); verbose(VERB_OPS, "attempting to connect to dnstap socket %s", p); check_socket_file(p); - free(p); } env = (struct dt_env *) calloc(1, sizeof(struct dt_env)); diff --git a/dnstap/dtstream.c b/dnstap/dtstream.c index b0918c52c..f1ace3c34 100644 --- a/dnstap/dtstream.c +++ b/dnstap/dtstream.c @@ -341,15 +341,19 @@ int dt_io_thread_apply_cfg(struct dt_io_thread* dtio, struct config_file *cfg) dtio->is_bidirectional = cfg->dnstap_bidirectional; if(dtio->upstream_is_unix) { + char* nm; if(!cfg->dnstap_socket_path || cfg->dnstap_socket_path[0]==0) { log_err("dnstap setup: no dnstap-socket-path for " "socket connect"); return 0; } + nm = cfg->dnstap_socket_path; + if(cfg->chrootdir && cfg->chrootdir[0] && strncmp(nm, + cfg->chrootdir, strlen(cfg->chrootdir)) == 0) + nm += strlen(cfg->chrootdir); free(dtio->socket_path); - dtio->socket_path = fname_after_chroot(cfg->dnstap_socket_path, - cfg, 1); + dtio->socket_path = strdup(nm); if(!dtio->socket_path) { log_err("dnstap setup: malloc failure"); return 0; diff --git a/doc/Changelog b/doc/Changelog index 87f796398..035d040a9 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,12 @@ +9 October 2020: Wouter + - Fix dnstap socket and the chroot not applied properly to the dnstap + socket path. + +8 October 2020: Wouter + - Tag for 1.12.0 release. + - Current repo is version 1.12.1 in development. + - Fix #319: potential memory leak on config failure, in rpz config. + 1 October 2020: Wouter - Current repo is version 1.12.0 for release. Tag for 1.12.0rc1. diff --git a/services/rpz.c b/services/rpz.c index ba5dd186d..13304652c 100644 --- a/services/rpz.c +++ b/services/rpz.c @@ -440,6 +440,8 @@ err: respip_set_delete(r->respip_set); if(r->taglist) free(r->taglist); + if(r->region) + regional_destroy(r->region); free(r); } return NULL;