Subject: Re: /etc/default
To: None <current-users@NetBSD.ORG>
From: matthew green <mrg@mame.mu.Oz.Au>
List: current-users
Date: 07/26/1995 12:18:06
theo said:
   > > Nsswitch is AFAIK done via /etc/resolv.conf, no need to start hacking that.
   > 
   > I disagree.  There are lots more databases that need to be configured
   > than just hosts...
   > 
   > I believe that a nsswitch.conf-like mechanism where the adminstrator
   > can select the type (file, dns, yp, hesiod, etc.) and resolution order
   > of database services for passwd, group, hosts, networks, protocols,
   > rpc, ethers, etc. would be a good thing.
   
   and many of those databases already have methods to say how/when they
   should lookup.

yeah, scattered all over the place, with different ways of specifying
the lookup method.  this isn't desirable.
   
   basically, nsswitch.conf is wrong for (at least) passwd, group, and ethers
   because those files quite specifically in them say WHEN YP should be pulled
   in. YP should be pulled in with you hit the +. it is a lie to specify in
   nsswitch.conf that YP should be looked up first.

how do you add arbitrary database lookup methods here?  the way that
solaris does things here is *really* nice (at least, imo).

if you say

hosts: files dns

then it uses /usr/lib/nss_files.so and then /usr/lib/nss_dns.so to look
up those hosts, using some (arbitrary) interface.
   
   so what needs the nsswitch.conf? perhaps the other databases you mention.
   but it isn't hard to make the other databases also understand a + in them.
   or, as i've suggested many times before, @ for hesiod.

but then you have to keep adding more and more things to all of these
databases to make them understand "new" lookup methods.

the "+" in a file is a nice idea, and i don't see how this functionality
can be added to nsswitch, but i think it's more useful to have the
power of nsswitch than the "+" stuff.

.mrg.