Subject: Re: re-reading /etc/resolv.conf on change
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-userlevel
Date: 01/06/2004 11:36:53
--Apple-Mail-12-621333291
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


On Jan 6, 2004, at 11:25 AM, Manuel Bouyer wrote:

> I guess gethostby* has to call the res_* functions if 
> /etc/nsswitch.conf
> tells it to (or maybe it's lower in the nsswitch functions, I don't 
> know).
> My intend it to add this at the same place the resolver routines are
> called.
> But I didn't look at the code yet.

gethostby*() calls a dispatch routine to "backend" functions that 
implement the various methods.

The questions are:

	* How does gethostby*()'s DNS back-end know to re-read resolv.conf?
	  I.e. how does it get the timestamp information about the resolv.conf
	  file for comparisons?

	* Does the user have to do something silly like touch a file
	  unrelated to resolv.conf to trigger the reread?

         -- Jason R. Thorpe <thorpej@wasabisystems.com>


--Apple-Mail-12-621333291
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQE/+w5WOpVKkaBm8XkRAkBXAKC1of1pkijlrBE3aNURZUKGkMk6mACgiLUR
rOmiiEQ463gMcvX6hHxo7Cw=
=W5Xs
-----END PGP SIGNATURE-----

--Apple-Mail-12-621333291--