Subject: heads up: nsswitch modifications to support defaults
To: None <>
From: Luke Mewburn <>
List: current-users
Date: 01/19/1999 18:51:08
after discussion with other developers and users regarding how the
default lookup is determine in the case of a missing nsswitch.conf,
the following solution has been implemented:

* nsdispatch(3) now takes two extra arguments:
	const char	*method;
	const ns_src	 defaults[];
  the `method' argument is set to the name of the invoking function
  (this will be used by the 

  the `defaults' argument is a list of sources and dispatch rules

* a global constant - const nssrc __nsdefaultsrc[] - contains the
  sources to simulate a default of `files'. a caller of nsdispatch(3)
  can use this rather than creating a local variable containing this

* gethostbyname() and gethostbyaddr() invoke nsdispatch with a
  defaults argument that is set to lookup from `dns files'

* currently, all other code calles nsdispatch() with defaults set
  to __nsdefaultsrc

this allow callers of nsdispatch(3) to retain prior functionality
without encoding any knowledge of a caller's defaults into the
nsswitch back-end.

i've committed the code to do this. as the only callers of nsdispatch
are currently internal to libc, it was felt that it wasn't necessary
to `version' the function signature.