"H. Peter Anvin" wrote:
>
> Dan Mack wrote:
> >
> > On Fri, Jul 07, 2000 at 10:54:20AM -0700, H. Peter Anvin wrote:
> >
> > > > What are the problems with getting nsswitch.conf to be used by autofs?
> > > >
> > >
> > > There is no API to get to it, so it means writing your own parser for
> > > everything you want to use it.
> >
> > So you are telling me that all the current use of nsswitch.conf by
> > getpw* and others is all being done ad-hoc?
> >
>
> No, they're done deep inside the C library. There doesn't seem to be
> any way to use the C library approach to add new "databases", although
> you can add new "services" (such as NIS, NIS+, LDAP...) (Am I the only
> one who think this terminology is completely backwards?)
It seems correct to me, fwiw - though I would call them "methods"
instead of "services". The data constitutes the data "base", it can be
stored using a variety of methods.
Anyway, I've been poking around a bit on a solaris machine and it seems
that it provides a generic interface via the "netdir...()" series of
functions, but I simply don't understand how it works. I may be
completely off base. However, I can do:
:/lib# nm -D libc.so.6 | grep nss
000aacd0 T __nss_configure_lookup
000aaaa0 T __nss_database_lookup
000abca0 T __nss_group_lookup
000abbc0 T __nss_hosts_lookup
000aac10 T __nss_next
000abd10 T __nss_passwd_lookup
0007b930 T _nss_files_parse_grent
0007ca20 T _nss_files_parse_pwent
000a3f00 T _nss_files_parse_spent
and conclude that even within the GNU C library itself, the
functionality is limited. (nss_database_lookup would be interesting to
see).
Personally, I am against the "+" syntax since it is supposed to be
obsoleted by the switch. I realize it allows more fine grained control,
but it really just doesn't belong in that file (any of them).
Until libc support is added, though, if it's really needed, it should be
added as an NIS-only 'service' (for historical consistency) purposes.
Now, I have my autofs maps distributed via NIS - are people having a
problem with this or do they just want to add a "+" to an existing map?
Christopher