Subject: Re: nsswitch implementation questions...
To: None <current-users@NetBSD.ORG>
From: Frank van der Linden <frank@fwi.uva.nl>
List: current-users
Date: 01/16/1996 12:14:39
Quoting Luke Mewburn,

> In the present implementation, an external program parses
> /etc/nsswitch.conf into /etc/nsswitch.db, so that programs have fast
> lookup.

> Some people aren't happy with this, so I'll outline the different
> methods of interpreting the configuration file that I know of, and
> the various pros and cons of each.

[...]

> 4. Reading a pre-parsed database on each lookup (e.g, my implementation)

[...]

> I prefer method 4 (of course ;). I feel that because the nsswitch
> will be used all the time, it needs to be fast. That is also why the
> passwd database was converted to a 'db' database in 4.4BSD.

Method 4 seems the best to me too, and it's in line with how some other
config files are handled. One thing that worries me though, is that
there is a 1:1 mapping of config files/utilities, so the number of
*_mkdb programs may become confusing to the user. Although a solution
like mount vs. mount_xxx would help, i.e. an 'mkdb' program that
calls the appropriate special purpose programs?

- Frank