summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bind/bin/dig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Finish moving of dig(1) to /usr/bin/dig by removing the sources in theflorian2020-02-119-9523/+0
| | | | | old location. dig(1) sources can be found in src/usr.bin/dig. ok deraadt@
* Replace atoi with strtonum for stricter and safer integer parsing.florian2020-02-051-9/+15
| | | | | | | | | | | | | | | | -N ndots: 0, INT_MAX The upper limit is a bit silly, everything bigger than a small number will force domain names to be interpretet as relative. -R retries INT_MIN, INT_MAX - 1 Specifically documented to accept negative numbers. -W wait 0, INT_MAX One could interpret the documentation as meaning that it accepts negative numbers but that failes later on with an error message from the timer code.. with deraadt, OK kn, input & OK tedu
* just use netdb.h directlyflorian2020-02-041-14/+7
|
* Remove unused typedefs that got left behind in previousflorian2020-02-041-4/+2
| | | | | | | | shreddings from types.h and get rid of offset.h while here by just using off_t in the one place where it's needed. However offset.h brought in limits.h and sys/types.h so sprinkle some includes over the tree to have various _MAX and intX_t defined.
* Get rid of getopt(3) compat code.florian2020-02-042-31/+28
|
* Nuke autohell from orbit. It's the only way to be sure.florian2020-01-281-111/+0
| | | | OK sthen
* Switch to Makefile based builds.florian2020-01-286-13/+28
| | | | | | | | Delete a bunch of files that were no longer built but still lying around. Since there are no subdirectories below obj any more we need to prefix dns/{log,time,result}.c with dns_ to not conflict with the same names used by lib/isc/. OK sthen
* Support for queries on ports != 53jca2020-01-263-5/+5
| | | | | | | | | | | | | | - dig(1) -p now works, as already supported by dig(1) from ports/net/isc-bind thanks to sthen@ - "set port=..." also works in nslookup(1) - host(1) has no support for alternate destination ports This adds "inet" to the pledge promises of all three programs, a compromise deemed reasonable and suggested by deraadt@; instead of slightly more complicated patches by myself and florian@ to avoid "inet" in the general case. Suggested by deraadt@, ok florian@ sthen@
* Remove now unused unix/file.c and unix/fsaccess.cflorian2020-01-261-2/+2
| | | | OK jca, tedu
* unifdef sigchase. It is deprecated and never enabled on openbsd.florian2020-01-255-2381/+2
|
* The config parser lets us know when the key file can't be found.florian2020-01-251-4/+1
| | | | Not need to check beforehand and enter a race.
* Since we are no longer using config.h we can remove a lot of featureflorian2020-01-241-9/+7
| | | | | | | | | checks from configure. Work started by tedu, I tossed a bunch more. "go ahead" tedu This is not comprehensive but returns where diminishing in terms of saved build time. The next step would probably be to remove configure entirely.
* We can always create IPv4 and IPv6 sockets.florian2020-01-231-13/+3
| | | | | While here cleanup net.h. OK deraadt
* config.h and platform.h are unused nowflorian2020-01-224-7/+7
|
* unifdef the last config.h bitsflorian2020-01-222-5/+1
| | | | OK millert
* remove mutex.h etc. since this code is now unthreaded.tedu2020-01-211-55/+1
| | | | ok florian
* remove -m from usage();jmc2020-01-211-2/+2
|
* We no longer support "memory usage" debugging.florian2020-01-201-5/+3
|
* Rip out custom memory allocator.florian2020-01-205-160/+110
| | | | OK otto
* As millert@ points out we can replace isc_string_touint64 withflorian2020-01-204-6/+6
| | | | | strtoull(3) and then get rid of lib/isc/string.c OK millert
* Fix a address family desynchronisation between lwres_conf andflorian2020-01-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | dig_serverlist. In one of the first shredding commits lwres unintentionally lost the ability to track if the user requested IPv4 only or IPv6 only operations. Parsing of /etc/resolv.conf would add all nameservers, ignoring their address family. When dig(1) later populated server_list it would pay attention to the address family. If /etc/resolv.conf contains only IPv4 nameservers and it has 3 or more and the user requests IPv6 only operations dig would fail with "add_nameserver failed". This happens because lwres_conf already contains 3 nameservers but server_list is empty so dig tries to add ::1 to lwres_conf. It feels like this is very convoluted but it restores previous behavoir the way it was implemented before. Thus sidestepping some refactoring. OK millert
* Reduce tsig support to what is needed by dig et al by removing theflorian2020-01-201-4/+4
| | | | | | server side support and keyrings. This allows us to get rid of a red-black-tree implementation. OK millert
* Handle documentation of the remaining, more complicated defaultsschwarze2020-01-102-32/+32
| | | | | | | | | | | of query options: * Add some missing information and improve some wordings. * List the supported opcodes. * Mention that +nosubnet is valid. * Stop documenting the confusing +noednsflags because it does the same as +ednsflags. Using feedback from florian@ and wording help from jmc@; OK jmc@.
* Remove readline support from nslookup.florian2020-01-091-26/+0
| | | | OK millert, deraadt
* Use normal int types like int32_t instead of isc_int32_t.florian2020-01-095-54/+54
| | | | OK millert
* We use __dead for functions that do not return.florian2020-01-093-9/+9
| | | | OK millert
* Replace entropy.c, random.c and an outdated arc4random copy withflorian2020-01-091-19/+8
| | | | | | calls to libc's arc4random. Minus about 3k lines. prodding deraadt@
* unifdef WITH_IDN; prodding deraadt@florian2020-01-094-224/+2
|
* Assorted unifdefs:florian2020-01-093-38/+2
| | | | | | | | | | | | | | | | | | | | #define ISC_PLATFORM_NEEDSYSSELECTH 1 #define ISC_PLATFORM_HAVESTATNSEC 1 #define ISC_PLATFORM_RLIMITTYPE rlim_t #define ISC_PLATFORM_HAVELONGLONG 1 #undef ISC_PLATFORM_BRACEPTHREADONCEINIT #undef ISC_PLATFORM_USEDECLSPEC #define ISC_PLATFORM_HAVESYSUNH 1 #define ISC_PLATFORM_HAVESTRINGSH 1 #define ISC_PLATFORM_WANTAES 1 #define ISC_PLATFORM_USESIT 1 #define LIBISC_EXTERNAL_DATA #define LIBDNS_EXTERNAL_DATA #define LIBISCCFG_EXTERNAL_DATA #define LIBBIND9_EXTERNAL_DATA #define LIBTESTS_EXTERNAL_DATA prodding deraadt@
* unifdef pkcs11:florian2020-01-092-28/+4
| | | | | | | | | | | | | | | | | #undef USE_PKCS11 #undef PKCS11_TOOLS #undef PKCS11CRYPTO #undef HAVE_PKCS11_GOST #undef HAVE_PKCS11_ECDSA #undef HAVE_PKCS11_ED25519 #undef HAVE_PKCS11_ED448 #define PK11_DH_DISABLE #define PK11_DSA_DISABLE #define PK11_FLAVOR #define PK11_MD5_DISABLE #undef PK11_SOFTHSMV2_FLAVOR prodding deraadt@
* unifdef printf and string functions:florian2020-01-095-13/+13
| | | | | | | | | | | | | | #undef ISC_PLATFORM_NEEDVSNPRINTF #undef ISC_PLATFORM_NEEDSPRINTF #undef ISC_PLATFORM_NEEDPRINTF #undef ISC_PLATFORM_NEEDFPRINTF #define ISC_PLATFORM_QUADFORMAT "ll" #undef ISC_PLATFORM_NEEDSTRSEP #undef ISC_PLATFORM_NEEDSTRLCPY #undef ISC_PLATFORM_NEEDSTRLCAT #undef ISC_PLATFORM_NEEDSTRTOUL #undef ISC_PLATFORM_NEEDMEMMOVE #undef ISC_PLATFORM_NEEDSTRCASESTR
* Remove backtrace support. Minus 800 lines.florian2020-01-071-2/+1
| | | | OK millert
* We are not windows. Minus 500 lines.florian2020-01-071-15/+1
| | | | OK millert
* Remove thread support. Minus 4k lines.florian2020-01-071-5/+1
| | | | OK millert
* We don't need libbind9 if we remove a thick wrapper around getaddrinfoflorian2020-01-062-12/+70
| | | | | and move the remaining bits to dighost.c. Minus 4k lines. OK sthen
* We only need the config parser from liblwres.florian2020-01-061-33/+8
| | | | | | | | | | | | This pulls out the config object (lwres_conf_t) from the context (lwres_context_t), switches to libc functions (lwres_net_ntop vs inet_ntop etc ) and removes a lwres_ prefix from number types (lwres_uint8_t vs uint8_t etc). With that we can nearly empty out lib/lwres and lose about 20k lines in the process. OK sthen
* document the defaults for several query options;schwarze2020-01-061-15/+13
| | | | OK jmc@
* Jason suggested that stating defaults with a postfix "(on/off by default)"schwarze2020-01-041-74/+32
| | | | | | is as clear, more concise, and reads better. In a few cases, it also allows shortening text that said the same twice. Tweak and OK jmc@.
* Avoid the misleading term "toggle". There are no query optionsschwarze2020-01-041-12/+19
| | | | | | that toggle anything. Quite to the contrary, all those touched in this commit are idempotent. OK florian@ jmc@
* Correct information about default options: by default, +besteffortschwarze2020-01-021-4/+6
| | | | | is on, +dnsnegotiation is off, +timeout is 5s for UDP and 10s for TCP. OK florian@
* another simple case of a default that i missed: +adflagschwarze2020-01-021-2/+3
|
* jmc@ suggested to just say "The default is +opt" rather than repeatingschwarze2020-01-021-27/+53
| | | | | | the explanation of what +opt does, improving both conciseness and clarity, so let's do this in many trivial cases, and improve some markup in the vicinity while there
* simple markup fixes:schwarze2020-01-021-25/+45
| | | | | use .Cm for keywords, .Ar for placeholders, .Xr for resolv.conf, and use imperative rather than indicative
* Correct the markup of option arguments involving = signs.schwarze2020-01-021-9/+10
| | | | | | Mostly, move the equal sign out of .Cm and .Ar because we consider it punctuation. Besides, use .Cm rather than .Ar for keywords like "ixfr" and do not mark up literal integer numbers with .Ar.
* manual page: drop +sit because it is merely a deprecated alias for +cookieschwarze2020-01-022-39/+18
| | | | | | usage(): drop +defname because it is merely an alias for +search both: correct option spelling +cl -> +class, +time -> +timeout feedback and OK sthen@, OK jmc@
* totally sync the manpage queryopts with usage(); i've adopted the usagejmc2019-12-312-40/+42
| | | | | pattern of "###" for argument names evrywhere it makes sense, but shortened it to "#";
* tidy up the query options list, sync it as best as possible with usage,jmc2019-12-301-99/+56
| | | | and remove some unneccessary text;
* add a list of valid queryopts to usage, and change "dig -h" to just displayjmc2019-12-302-102/+16
| | | | | | this new usage; update the description of -h accordingly; SYNOPSIS remains unchanged, since the reader has a list of queryopts with explanations a few screens down
* tidy up the page;jmc2019-12-271-95/+81
|
* use a standard synopsis/usage() layout, and tidy up the man page a little;jmc2019-12-272-97/+62
| | | | | some macro simplifications from schwarze ok schwarze deraadt kn