Commit Graph

82 Commits

Author SHA1 Message Date
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
kre 6b0ab5c5ab More cases to disable gcc-8 warnings only when we're using gcc>=8 2019-10-10 08:37:16 +00:00
christos c60bf2342e Add -Wno-error for gcc-8 warnings 2019-10-09 23:39:20 +00:00
maya 62523467d4 Remove unused macro 2018-12-13 08:45:29 +00:00
christos 5e3f85208a PR/52578: Benjamin M. Schwartz Set the AD bit when DNSSEC is enabled
(RFC 6840 Section 5.7).
2017-09-28 23:32:01 +00:00
christos 6ad75611ab F_DUPFD* needs an argument (minfd) found by jmcneill 2017-04-19 22:21:07 +00:00
christos 4d416d886b belated removal of the advertising clause. 2015-02-24 17:56:20 +00:00
christos ff104b2e4b PR/48475: YAMAGUCHI Takanori: EDNS option broken with unbound. struct
querybuf in net/gethnamaddr.c defines MAXPACKET to 64K. This in turn
gets passed down until it reached res_nopt(..., answer, anslen), where
the size of the buffer must fit in 16 bits. Unfortunately we end up
being one more than the max so we end up sending a 0 as the size and
unbound does not like that. Instead we clip now to 64K - 1, and everyone
is happy.
XXX: Pullup to 7.
2014-11-11 03:29:24 +00:00
christos d7c0fb8fbb close on exec hostaliases 2014-09-16 01:30:00 +00:00
christos 9a0178b83d Mark the dup of the resolv fd for close on exec. 2014-09-16 01:29:48 +00:00
christos cc46e26df3 "soon" is "now". Remove all __indr_reference crap. 2014-01-16 20:31:42 +00:00
christos 173d90915f provide a patchable __res_conf_name for testing purposes. 2014-01-08 22:58:50 +00:00
wiz d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
para bc91d7fa79 two more type casts after type changes 2013-02-16 13:45:45 +00:00
christos 61fab15480 more type changes 2013-02-16 13:37:01 +00:00
christos 72e5329b53 using the proper types eliminate a whole bunch of casts 2013-02-16 13:29:34 +00:00
christos 650d188146 - make all filedescriptors close-on-exec
- use SOCK_NOSIGPIPE.
- add kqueue handling (not enabled by default, from FreeBSD)
- add RES_INSECURE1 handling (from FreeBSD)
2013-02-15 14:08:25 +00:00
christos 2a7b0a49fb add a check-names option, now that the default is no-check-names 2012-09-09 18:04:26 +00:00
abs 9e66e6d75e Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
2012-06-25 22:32:43 +00:00
christos a8d19c80ee time_t casts 2012-03-21 00:34:54 +00:00
matt 504f867176 Use C89 Prototypes.
Remove use of __P
2012-03-20 17:44:17 +00:00
christos c5e820cae4 PR/45989: Martin Husemann: lint invocation does include -w only on i386
- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@
2012-03-13 21:13:30 +00:00
christos 9292cfb210 close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
  fopen(db, "re")
2011-10-15 23:00:01 +00:00
christos 01fb81a616 fix the rest of libc mi gcc-4.5 hacks. portmasters should fix the md ones. 2011-08-17 09:53:53 +00:00
joerg 608276435f Remove self-assignment of an argument that is later used. 2011-05-23 14:34:29 +00:00
pooka 79b560da8c Don't do highestFD check with USE_POLL. It provides no benefit
but causes a dependency between RLIMIT_NOFILE and rumphijack FDOFF.

christos ok
2011-02-09 09:46:59 +00:00
mbalmer 25c6d8b7c2 the doo doo doo, the daa daa daa... 2009-11-22 18:04:37 +00:00
christos 3b0d9a876a don't read hostaliases using unbuffered reads. there is no security benefit. 2009-10-24 21:37:57 +00:00
christos e942b6ecb2 expose res_check. 2009-10-24 17:24:01 +00:00
christos 249296c41c Add a knote to keep track when resolv.conf gets changed and re-initialize.
While here fix a memory leak when calling res_vinit with an already inited
res_state.
2009-10-24 05:35:37 +00:00
christos 2cca8c559f Bring back binary compatibility with the previous version of the resolver.
There was no room to allocate 16 bytes for _rnd in the struct in the _LP64
case, so we dynamically allocate now. Also put the _rnd field last, so that
we are bitwise compatible too. Now of course we've run out of space, so
next time will need to perform more evil tricks to fit.
2009-04-20 14:42:12 +00:00
christos 1408cbc26a we are not guaranteed that the ext pointer is going to be null at this point
so don't attempt to free.
2009-04-16 14:56:51 +00:00
christos 50ce2a6bdf fix lint issues and actual bugs lint found (missing break statements) 2009-04-12 19:43:37 +00:00
christos 59a755a40f merge libbind and bump. 2009-04-12 17:07:16 +00:00
christos c6497e5b5f libc portion of libbind from external/bsd/libbind 2009-04-12 16:35:44 +00:00
mrg 798e718222 fix a very old resolver bug:
when looping over the current list of sockets we're connected to,
use getpeername() not getsockname() to find out who the remote
end is.  avoid spurious close()s and (rare) failure.

apparently known as ISC bug #18625, and fixed in libbind 6.0
2009-01-27 05:13:23 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
christos 7ce5e09d1b - protect DEBUG again because we should be able to set it from the Makefile
- add a missing cast to pacify lint.
2008-06-21 23:37:53 +00:00
christos 3873655b27 updates from bind-9-5-0 2008-06-21 20:41:48 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ghen 1c80da3072 Re-add missing file (removed by cvs import because it was added manually by
christos).

Hi Veego!
2007-03-30 20:40:52 +00:00
ghen 225c5452c3 Resolve conflicts. 2007-03-30 20:23:03 +00:00
ghen e0bee3891d Import bind 9.4.0. 2007-03-30 20:16:18 +00:00
christos 59bba4a15c Although we don't have a kqueue implementation yet, there is no point in
limiting the max fd in the poll case. Pointed out by Jan Schaumann, original
patch from FreeBSD/John Baldwin.
2007-03-02 22:56:15 +00:00
christos 233898bdaa Only try free-ing a version of res if it is not supposed to be pre-inited
like before. Fixes issues with programs passing random uninitialized data
as res_state.
2007-02-09 22:29:40 +00:00
christos 41b0e71e94 Don't check for ext being NULL to destroy the res_state. Instead check
the option bits like we did before.
2007-01-28 07:54:01 +00:00
christos 5959955102 we don't need <irs.h> 2007-01-28 02:14:05 +00:00
christos 619824ce6d try again. 2007-01-28 02:13:29 +00:00
christos e519b45a11 missed one more file. 2007-01-28 02:11:44 +00:00
christos 91eccc4aa8 Fix minor compilation issues. 2007-01-27 23:02:12 +00:00