The NetBSD Project

CVS log for src/lib/libc/resolv/res_init.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libc / resolv

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Thu Sep 30 12:35:55 2021 UTC (2 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.31: +28 -14 lines
Diff to previous 1.31 (unified) to selected 1.28 (unified)

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.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Apr 19 22:21:07 2017 UTC (6 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-20170426, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-socketcan-base1
Branch point for: netbsd-9
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (unified) to selected 1.28 (unified)

F_DUPFD* needs an argument (minfd) found by jmcneill

Revision 1.30 / (download) - annotate - [select for diffs], Tue Feb 24 17:56:20 2015 UTC (9 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.29: +3 -7 lines
Diff to previous 1.29 (unified) to selected 1.28 (unified)

belated removal of the advertising clause.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 16 01:29:48 2014 UTC (9 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (unified)

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

Revision 1.28 / (download) - annotate - [selected], Wed Jan 8 22:58:50 2014 UTC (10 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.27: +5 -3 lines
Diff to previous 1.27 (unified)

provide a patchable __res_conf_name for testing purposes.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Dec 9 09:35:16 2013 UTC (10 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (unified) to selected 1.28 (unified)

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

Revision 1.26 / (download) - annotate - [select for diffs], Sun Sep 9 18:04:26 2012 UTC (11 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.25: +5 -2 lines
Diff to previous 1.25 (unified) to selected 1.28 (unified)

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

Revision 1.25 / (download) - annotate - [select for diffs], Tue Mar 20 17:44:18 2012 UTC (12 years ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4
Changes since 1.24: +28 -22 lines
Diff to previous 1.24 (unified) to selected 1.28 (unified)

Use C89 Prototypes.
Remove use of __P

Revision 1.24 / (download) - annotate - [select for diffs], Tue Mar 13 21:13:43 2012 UTC (12 years ago) by christos
Branch: MAIN
Changes since 1.23: +10 -9 lines
Diff to previous 1.23 (unified) to selected 1.28 (unified)

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@

Revision 1.23 / (download) - annotate - [select for diffs], Sat Oct 15 23:00:02 2011 UTC (12 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache
Changes since 1.22: +4 -6 lines
Diff to previous 1.22 (unified) to selected 1.28 (unified)

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

Revision 1.22 / (download) - annotate - [select for diffs], Sat Oct 24 17:24:01 2009 UTC (14 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: matt-premerge-20091211, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.21: +12 -6 lines
Diff to previous 1.21 (unified) to selected 1.28 (unified)

expose res_check.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 24 05:35:37 2009 UTC (14 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.20: +62 -10 lines
Diff to previous 1.20 (unified) to selected 1.28 (unified)

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.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 20 14:42:12 2009 UTC (14 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.19: +24 -14 lines
Diff to previous 1.19 (unified) to selected 1.28 (unified)

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.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Apr 16 14:56:51 2009 UTC (14 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.18: +2 -4 lines
Diff to previous 1.18 (unified) to selected 1.28 (unified)

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

Revision 1.18 / (download) - annotate - [select for diffs], Sun Apr 12 19:43:37 2009 UTC (14 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (unified) to selected 1.28 (unified)

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

Revision 1.17 / (download) - annotate - [select for diffs], Sun Apr 12 17:07:17 2009 UTC (14 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.16: +55 -9 lines
Diff to previous 1.16 (unified) to selected 1.28 (unified)

merge libbind and bump.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jan 11 02:46:29 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (unified) to selected 1.28 (unified)

merge christos-time_t

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jun 21 23:37:53 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, christos-time_t-nbase, christos-time_t-base
Branch point for: netbsd-5-1, netbsd-5-0, netbsd-5, christos-time_t
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (unified) to selected 1.28 (unified)

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

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jun 21 20:41:48 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.13: +40 -20 lines
Diff to previous 1.13 (unified) to selected 1.28 (unified)

updates from bind-9-5-0

Revision 1.13 / (download) - annotate - [select for diffs], Fri Mar 30 20:23:04 2007 UTC (17 years ago) by ghen
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: wrstuden-revivesa
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (unified) to selected 1.28 (unified)

Resolve conflicts.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Feb 9 22:29:40 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (unified) to selected 1.28 (unified)

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.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Jan 28 07:54:01 2007 UTC (17 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (unified) to selected 1.28 (unified)

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

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jan 27 23:02:12 2007 UTC (17 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.9: +2 -4 lines
Diff to previous 1.9 (unified) to selected 1.28 (unified)

Fix minor compilation issues.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jan 27 22:26:44 2007 UTC (17 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.8: +74 -18 lines
Diff to previous 1.8 (unified) to selected 1.28 (unified)

merge in resolver portion of bind-9.4.0-rc2

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 19 03:10:08 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.7: +4 -2 lines
Diff to previous 1.7 (unified) to selected 1.28 (unified)

Coverity CID 618: Comment out dead code.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jan 24 17:39:44 2006 UTC (18 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.6: +4 -2 lines
Diff to previous 1.6 (unified) to selected 1.28 (unified)

don't re-define DEBUG

Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 15 23:33:41 2005 UTC (18 years, 6 months ago) by tsarna
Branch: MAIN
Changes since 1.5: +2 -15 lines
Diff to previous 1.5 (unified) to selected 1.28 (unified)

Rest of fix for PR#31184: getaddrinfo() now honors resolv.conf sortlist
directive for dns answers.

Also, unifdef the RESLVSORT (non-)option sillyness.

Reviewed by christos.

Revision 1.5 / (download) - annotate - [select for diffs], Fri May 21 16:03:05 2004 UTC (19 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (unified) to selected 1.28 (unified)

disable weak aliases for now; the resolver header file adds __ to all the
names.

Revision 1.4 / (download) - annotate - [select for diffs], Fri May 21 15:35:05 2004 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.3: +15 -2 lines
Diff to previous 1.3 (unified) to selected 1.28 (unified)

namespace protection for resolver routines.

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 20 19:43:39 2004 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.2: +6 -1 lines
Diff to previous 1.2 (unified) to selected 1.28 (unified)

netbsd rcsid.

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 20 17:41:00 2004 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (unified) to selected 1.28 (unified)

add casts to silence lint.

Revision 1.1 / (download) - annotate - [select for diffs], Thu May 20 17:18:55 2004 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Diff to selected 1.28 (unified)

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>