From 82e68ffbf0b68ca3392cdbbae18cc57a843e635a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 6 Jun 2018 12:02:40 +0200 Subject: [PATCH] Add VALIDATION_DEFAULT to Windows Configure script --- bin/named/Makefile.in | 1 - config.h.in | 3 +++ config.h.win32 | 3 +++ configure | 27 ++++++++++----------------- configure.in | 17 ++++------------- win32utils/Configure | 12 +++++++++++- 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in index bb0ee8d1b4..f48e74928a 100644 --- a/bin/named/Makefile.in +++ b/bin/named/Makefile.in @@ -130,7 +130,6 @@ config.@O@: config.c -DDYNDB_LIBDIR=\"@libdir@/bind\" \ -DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \ -DNAMED_SYSCONFDIR=\"${sysconfdir}\" \ - -DVALIDATION_DEFAULT=\"@VALIDATION_DEFAULT@\" \ -c ${srcdir}/config.c server.@O@: server.c diff --git a/config.h.in b/config.h.in index 5c07e18977..7d89fe0ae8 100644 --- a/config.h.in +++ b/config.h.in @@ -617,6 +617,9 @@ int sigwait(const unsigned int *set, int *sig); non-blocking. */ #undef USE_FIONBIO_IOCTL +/* the default value of dnssec-validation option */ +#undef VALIDATION_DEFAULT + /* Define to enable very verbose query trace logging. */ #undef WANT_QUERYTRACE diff --git a/config.h.win32 b/config.h.win32 index c62b30ecc6..32ab4f280c 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -402,6 +402,9 @@ typedef __int64 off_t; /* Large system tuning */ @TUNE_LARGE@ +/* the default value of dnssec-validation option */ +@VALIDATION_DEFAULT@ + /* Verbose query trace logging */ @WANT_QUERYTRACE@ diff --git a/configure b/configure index 2115254fde..304065bd16 100755 --- a/configure +++ b/configure @@ -677,7 +677,6 @@ BIND9_ISCCFG_BUILDINCLUDE BIND9_ISCCC_BUILDINCLUDE BIND9_ISC_BUILDINCLUDE BIND9_TOP_BUILDDIR -VALIDATION_DEFAULT UNITTESTS ATFLIBS ATFBIN @@ -22558,27 +22557,21 @@ esac # # Was --disable-auto-validation specified? # +validation_default=auto # Check whether --enable-auto-validation was given. if test "${enable_auto_validation+set}" = set; then : - enableval=$enable_auto_validation; want_autoval="$enableval" + enableval=$enable_auto_validation; : else - want_autoval="yes" + enable_auto_validation=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable DNSSEC validation by default" >&5 -$as_echo_n "checking whether to enable DNSSEC validation by default... " >&6; } -case "$want_autoval" in -no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - VALIDATION_DEFAULT=yes - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - VALIDATION_DEFAULT=auto - ;; -esac +if test "$enable_auto_validation" = "no"; then : + validation_default=yes +fi + +cat >>confdefs.h <<_ACEOF +#define VALIDATION_DEFAULT "$validation_default" +_ACEOF # diff --git a/configure.in b/configure.in index 3b1bf70270..15db7a1e32 100644 --- a/configure.in +++ b/configure.in @@ -4625,22 +4625,13 @@ esac # # Was --disable-auto-validation specified? # +validation_default=auto AC_ARG_ENABLE(auto-validation, AS_HELP_STRING([--enable-auto-validation], [turn on DNSSEC validation by default, using the IANA root key [default=yes]]), - want_autoval="$enableval", want_autoval="yes") -AC_MSG_CHECKING([whether to enable DNSSEC validation by default]) -case "$want_autoval" in -no) - AC_MSG_RESULT(no) - VALIDATION_DEFAULT=yes - ;; -*) - AC_MSG_RESULT(yes) - VALIDATION_DEFAULT=auto - ;; -esac -AC_SUBST(VALIDATION_DEFAULT) + [:],[enable_auto_validation=yes]) +AS_IF([test "$enable_auto_validation" = "no"],[validation_default=yes]) +AC_DEFINE_UNQUOTED([VALIDATION_DEFAULT], ["$validation_default"], [the default value of dnssec-validation option]) # # Substitutions diff --git a/win32utils/Configure b/win32utils/Configure index 0266929dbc..fd10519ce8 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -223,7 +223,8 @@ my @substdefh = ("AES_CC", "ISC_LIST_CHECKINIT", "TUNE_LARGE", "WANT_QUERYTRACE", - "WITH_IDN"); + "WITH_IDN", + "VALIDATION_DEFAULT"); # for platform.h @@ -486,6 +487,7 @@ my $use_ed448 = "auto"; my $use_aes = "auto"; my $cookie_algorithm = "aes"; my $use_gssapi = "no"; +my $validation_default = "auto"; my $gssapi_path = "C:\\Program\ Files\\MIT\\Kerberos\\"; my $use_geoip = "no"; my $geoip_path = ""; @@ -702,6 +704,10 @@ sub myenable { if ($val =~ /^no$/i) { $enable_rpz_nsdname = "no"; } + } elsif ($key =~ /^auto-validation$/i) { + if ($val =~ /^no$/i) { + $validation_default = "yes"; + } } else { $want_unknown = "yes"; if ($val eq "no") { @@ -2032,6 +2038,9 @@ if ($use_gssapi ne "yes") { $configdefd{"USE_ISC_SPNEGO"} = "USE_ISC_SPNEGO"; } +# disable-auto-validation +$configdefh{"VALIDATION_DEFAULT"} = "\"$validation_default\""; + # with-geoip if ($use_geoip eq "no") { if ($verbose) { @@ -3249,6 +3258,7 @@ exit 0; # --enable-full-report supported by verbose # --enable-dnstap not supported (requires libfstrm support on WIN32) # --enable-afl not supported (not yet available on Visual Studio C++) +# --disable-auto-validation supported # --with-python supported # --with-openssl supported # --with-pkcs11 supported