History log of /netbsd/lib/libc/resolv/res_init.c (Results 1 – 25 of 32)
Revision Date Author Comments
# 6567229d 30-Sep-2021 christos <christos@NetBSD.org>

kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fo

kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.
An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.

show more ...


# 05f1fd86 19-Apr-2017 christos <christos@NetBSD.org>

F_DUPFD* needs an argument (minfd) found by jmcneill


# 52799bbf 24-Feb-2015 christos <christos@NetBSD.org>

belated removal of the advertising clause.


# ec55a43c 16-Sep-2014 christos <christos@NetBSD.org>

Mark the dup of the resolv fd for close on exec.


# 7c30e82a 08-Jan-2014 christos <christos@NetBSD.org>

provide a patchable __res_conf_name for testing purposes.


# f6e9fe77 09-Dec-2013 wiz <wiz@NetBSD.org>

Fix typo ("then" instead of "than")


# bd6f6002 09-Sep-2012 christos <christos@NetBSD.org>

add a check-names option, now that the default is no-check-names


# 94a48f81 20-Mar-2012 matt <matt@NetBSD.org>

Use C89 Prototypes.
Remove use of __P


# e826745e 13-Mar-2012 christos <christos@NetBSD.org>

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 t

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@

show more ...


# 7c24c648 15-Oct-2011 christos <christos@NetBSD.org>

close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
fopen(db, "re")


# e942b6ec 24-Oct-2009 christos <christos@NetBSD.org>

expose res_check.


# 249296c4 24-Oct-2009 christos <christos@NetBSD.org>

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.


# 2cca8c55 20-Apr-2009 christos <christos@NetBSD.org>

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 th

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.

show more ...


# 1408cbc2 16-Apr-2009 christos <christos@NetBSD.org>

we are not guaranteed that the ext pointer is going to be null at this point
so don't attempt to free.


# 50ce2a6b 12-Apr-2009 christos <christos@NetBSD.org>

fix lint issues and actual bugs lint found (missing break statements)


# 59a755a4 12-Apr-2009 christos <christos@NetBSD.org>

merge libbind and bump.


# 461a86f9 11-Jan-2009 christos <christos@NetBSD.org>

merge christos-time_t


# 7ce5e09d 21-Jun-2008 christos <christos@NetBSD.org>

- protect DEBUG again because we should be able to set it from the Makefile
- add a missing cast to pacify lint.


# 3873655b 21-Jun-2008 christos <christos@NetBSD.org>

updates from bind-9-5-0


# 225c5452 30-Mar-2007 ghen <ghen@NetBSD.org>

Resolve conflicts.


# 233898bd 09-Feb-2007 christos <christos@NetBSD.org>

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.


# 41b0e71e 28-Jan-2007 christos <christos@NetBSD.org>

Don't check for ext being NULL to destroy the res_state. Instead check
the option bits like we did before.


# 91eccc4a 27-Jan-2007 christos <christos@NetBSD.org>

Fix minor compilation issues.


# d73eb73d 27-Jan-2007 christos <christos@NetBSD.org>

merge in resolver portion of bind-9.4.0-rc2


# 23b08f89 19-Mar-2006 christos <christos@NetBSD.org>

Coverity CID 618: Comment out dead code.


12