2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00

383 Commits

Author SHA1 Message Date
Mark Andrews
3fe7fa3db2 Output timestamps in yaml to the microsecond if -u is specified. 2020-09-30 23:56:18 +10:00
Evan Hunt
dcee985b7f update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
Mark Andrews
1d55bd943b 'dig +bufsize=0' no longer disables EDNS as a side effect.
Additionally 'dig +bufsize' restores the default EDNS buffer size.
2020-09-02 16:58:43 +02:00
Evan Hunt
23f2ab4543 add "dig +qid" option to set QID to desired value 2020-05-26 00:47:18 -07:00
Evan Hunt
b89decfcc9 replace fputs() with fprintf() 2020-05-04 09:14:58 +02:00
Ondřej Surý
978c7b2e89 Complete rewrite the BIND 9 build system
The rewrite of BIND 9 build system is a large work and cannot be reasonable
split into separate merge requests.  Addition of the automake has a positive
effect on the readability and maintainability of the build system as it is more
declarative, it allows conditional and we are able to drop all of the custom
make code that BIND 9 developed over the years to overcome the deficiencies of
autoconf + custom Makefile.in files.

This squashed commit contains following changes:

- conversion (or rather fresh rewrite) of all Makefile.in files to Makefile.am
  by using automake

- the libtool is now properly integrated with automake (the way we used it
  was rather hackish as the only official way how to use libtool is via
  automake

- the dynamic module loading was rewritten from a custom patchwork to libtool's
  libltdl (which includes the patchwork to support module loading on different
  systems internally)

- conversion of the unit test executor from kyua to automake parallel driver

- conversion of the system test executor from custom make/shell to automake
  parallel driver

- The GSSAPI has been refactored, the custom SPNEGO on the basis that
  all major KRB5/GSSAPI (mit-krb5, heimdal and Windows) implementations
  support SPNEGO mechanism.

- The various defunct tests from bin/tests have been removed:
  bin/tests/optional and bin/tests/pkcs11

- The text files generated from the MD files have been removed, the
  MarkDown has been designed to be readable by both humans and computers

- The xsl header is now generated by a simple sed command instead of
  perl helper

- The <irs/platform.h> header has been removed

- cleanups of configure.ac script to make it more simpler, addition of multiple
  macros (there's still work to be done though)

- the tarball can now be prepared with `make dist`

- the system tests are partially able to run in oot build

Here's a list of unfinished work that needs to be completed in subsequent merge
requests:

- `make distcheck` doesn't yet work (because of system tests oot run is not yet
  finished)

- documentation is not yet built, there's a different merge request with docbook
  to sphinx-build rst conversion that needs to be rebased and adapted on top of
  the automake

- msvc build is non functional yet and we need to decide whether we will just
  cross-compile bind9 using mingw-w64 or fix the msvc build

- contributed dlz modules are not included neither in the autoconf nor automake
2020-04-21 14:19:48 +02:00
Ondřej Surý
08f4c7d6c0 Add C11 localtime_r and gmtime_r shims for Windows
On Windows, C11 localtime_r() and gmtime_r() functions are not
available.  While localtime() and gmtime() functions are already thread
safe because they use Thread Local Storage, it's quite ugly to #ifdef
around every localtime_r() and gmtime_r() usage to make the usage also
thread-safe on POSIX platforms.

The commit adds wrappers around Windows localtime_s() and gmtime_s()
functions.

NOTE: The implementation of localtime_s and gmtime_s in Microsoft CRT
are incompatible with the C standard since it has reversed parameter
order and errno_t return type.
2020-03-17 13:28:15 -07:00
Ondřej Surý
3178974f0c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
Evan Hunt
0002377dca adjust the clang-format penalties to reduce string breaking
this corrects some style glitches such as:
```
        long_function_call(arg, arg2, arg3, arg4, arg5, "str"
                                                        "ing");
```
...by adjusting the penalties for breaking strings and call
parameter lists.
2020-02-17 14:23:58 -08:00
Ondřej Surý
3832e3ecc9 Fixup the missing clang-format bits 2020-02-16 17:34:24 +01:00
Ondřej Surý
5777c44ad0 Reformat using the new rules 2020-02-14 09:31:05 +01:00
Evan Hunt
e851ed0bb5 apply the modified style 2020-02-13 15:05:06 -08:00
Ondřej Surý
056e133c4c Use clang-tidy to add curly braces around one-line statements
The command used to reformat the files in this commit was:

./util/run-clang-tidy \
	-clang-tidy-binary clang-tidy-11
	-clang-apply-replacements-binary clang-apply-replacements-11 \
	-checks=-*,readability-braces-around-statements \
	-j 9 \
	-fix \
	-format \
	-style=file \
	-quiet
clang-format -i --style=format $(git ls-files '*.c' '*.h')
uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h')
clang-format -i --style=format $(git ls-files '*.c' '*.h')
2020-02-13 22:07:21 +01:00
Ondřej Surý
f50b1e0685 Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
Ondřej Surý
c73e5866c4 Refactor the isc_buffer_allocate() usage using the semantic patch
The isc_buffer_allocate() function now cannot fail with ISC_R_MEMORY.
This commit removes all the checks on the return code using the semantic
patch from previous commit, as isc_buffer_allocate() now returns void.
2020-02-03 08:29:00 +01:00
Ondřej Surý
b218bf5227 Fix the concurrent access to batchname in dig.c 2019-12-20 03:43:04 +00:00
Mark Andrews
9936462f31 dns_master_indent and dns_master_indentstr must not be global
The indentation for dumping the master zone was driven by two
global variables dns_master_indent and dns_master_indentstr.  In
threaded mode, this becomes prone to data access races, so this commit
converts the global variables into a local per-context tuple that
consist of count and string.
2019-11-26 13:52:18 +01:00
Mark Andrews
e98157b7fe add +[no]yaml to usage() 2019-11-23 00:02:52 +11:00
Mark Andrews
4906fe975c Don't print ';;' comments in yaml mode. 2019-09-06 14:14:20 +10:00
Diego dos Santos Fronza
bc53d68ae6 Added documentation for dig's +unexpected command line option. 2019-09-03 10:15:25 -03:00
Diego dos Santos Fronza
460d4d63ee Added +unexpected option so dig will print replies from unexpected
sources.
2019-09-03 10:14:15 -03:00
Evan Hunt
71325852f1 add "dig +yaml" output format 2019-08-25 16:41:14 -07:00
Evan Hunt
9679c8c20a clarify descriptions of comment-related options in dig usage and man page 2019-08-05 21:30:34 -07:00
Evan Hunt
6d50f7d924 always check 'printcmd' before printing cmdline message 2019-08-05 21:26:32 -07:00
Mark Andrews
2a047af31e set DNS_STYLEFLAG_EXPANDAAAA flag in say_message if appropriate 2019-07-30 21:05:56 -04:00
Mark Andrews
e65d4989a1 Recurse to find the root server list with 'dig +trace'. 2019-05-22 13:02:15 +10:00
Mark Andrews
d8798098e8 support printing AAAA in expanded form 2019-05-06 21:50:38 -07:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
Tony Finch
fdb74fed9e dig: a -r option to disable .digrc 2018-11-15 11:09:04 +11:00
Mark Andrews
ba5d28dcfe add -q to dash_opts 2018-11-14 10:50:34 +11:00
Mark Andrews
75fa84b67b dig and mdig failed to properly preparse dash value pairs when value was a seperate argument and started with a dash. 2018-11-14 08:39:05 +11:00
Ondřej Surý
7697923eab Change the dig documentation 2018-11-06 12:48:08 +07:00
Tony Finch
3064d3d0ef Abolish ip6.int support in dig and mdig 2018-11-05 19:07:31 -05:00
Bhargava Shastry
1c57b73e34 oss-fuzz: Improve interaction with fuzzing tools and add new tests in fuzz/ directory 2018-08-23 10:07:28 +02:00
Witold Kręcicki
5cdb38c2c7 Remove unthreaded support 2018-08-16 17:18:52 +02:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Ondřej Surý
c3b8130fe8 Make OpenSSL mandatory 2018-07-19 12:47:03 -04:00
Bill Parker
408bcf9c07 check code is non NULL 2018-07-11 11:22:26 -07:00
Michał Kępień
a0571d3851 Rework libidn2 detection
Clean up the parts of configure.in responsible for handling libidn2
detection and adjust other pieces of the build system to match these
cleanups:

  - use pkg-config when --with-libidn2 is used without an explicit path,

  - look for idn2_to_ascii_lz() rather than idn2_to_ascii_8z() as the
    former is used in BIND while the latter is not,

  - do not look for idn2_to_unicode_8zlz() as it is present in all
    libidn2 versions which have idn2_to_ascii_lz(),

  - check whether the <idn2.h> header is usable,

  - set LDFLAGS in the Makefile for dig so that, if specified, the
    requested libidn2 path is used when linking with libidn2,

  - override CPPFLAGS when looking for libidn2 components so that the
    configure script does not produce warnings when libidn2 is not
    installed system-wide,

  - merge the AS_CASE() call into the AS_IF() call below it to simplify
    code,

  - indicate the default value of --with-libidn2 in "./configure --help"
    output,

  - use $with_libidn2 rather than $use_libidn2 to better match the name
    of the configure script argument,

  - stop differentiating between IDN "in" and "out" support, i.e. make
    dig either support libidn2 or not; remove WITH_* Autoconf macros and
    use a new one, HAVE_LIBIDN2, to determine whether libidn2 support
    should be enabled.
2018-07-10 14:34:35 +02:00
Evan Hunt
9147a31b94 copyrights 2018-05-23 12:39:40 -04:00
Mark Andrews
92e540df1e Silence clang static analyzer warnings; Consolidate multiple instances of splitting of batchline in dig into a single function. 2018-05-11 10:54:21 +10:00
Mark Andrews
8801c65a4b insist option != NULL and initalise last to NULL 2018-05-03 11:08:59 -04:00
Evan Hunt
0cc7aa250e change "key" to "tsigkey" to silence "short global name" warning 2018-04-20 19:51:00 -04:00
Mark Andrews
58c103e09c dig: add the ability to set RA and TC in queries 2018-04-20 14:17:58 -07:00
Tony Finch
286a7b6b9a Allow TTL values when configuring TTLs and time intervals.
Options updated to use ttlvals: max-cache-ttl, max-ncache-ttl,
max-policy-ttl, fstrm-set-reopen-interval, interface-interval, and
min-update-interval.
2018-04-13 11:46:06 -07:00
Ondřej Surý
5311a3b7b5 We use too old Visual Compiler to use scoped variables 2018-04-12 10:37:33 +02:00
Ondřej Surý
921d05ddcf Replace usage of strsep with POSIX strtok_r() 2018-04-12 10:37:33 +02:00
Witold Kręcicki
e2a06db7f3 libdns refactoring: get rid of multiple versions of dns_master_loadfile, dns_master_loadfileinc, dns_master_dump, dns_master_dumpinc, dns_master_dumptostream, dns_master_stylecreate 2018-04-06 08:04:41 +02:00