Add nsswitch support.
authorPeter Avalos <pavalos@theshell.com>
Mon, 22 Dec 2008 02:24:07 +0000 (21:24 -0500)
committerPeter Avalos <pavalos@theshell.com>
Sun, 28 Dec 2008 04:17:05 +0000 (23:17 -0500)
commited5d57202ebab0e923eb8e9d967a9f97792a6e8f
tree3b97a65ddb9d85523f6a35e37d4e9d4996602d40
parent8b8bd88793f2f52709056380e619e79ccf393cfd
Add nsswitch support.

The nsswitch.conf(5) manual page has a description of nsswitch.
Curiously, we already had this manual page, even though we didn't
support it.

/etc/host.conf is removed from src/, but if host.conf exists and
nsswitch.conf does not, nsswitch.conf will be created using its
contents.

Included in this commit is a framework for nsswitch caching, nscd(8),
but it relies on a few upcoming changes to our libc before it will work.
For now, it's turned off.

Also this commit includes hesiod support which is not compiled by
default.  Add WANT_HESIOD=true to make.conf to get it working.

Obtained-from: FreeBSD
133 files changed:
Makefile.inc1
etc/Makefile
etc/defaults/make.conf
etc/defaults/rc.conf
etc/host.conf [deleted file]
etc/hosts
etc/nscd.conf [new file with mode: 0644]
etc/rc.d/Makefile
etc/rc.d/nscd [new file with mode: 0644]
etc/rc.d/nsswitch [new file with mode: 0644]
include/Makefile
include/dlfcn.h
include/grp.h
include/hesiod.h [new file with mode: 0644]
include/netdb.h
include/nss.h [new file with mode: 0644]
include/nsswitch.h [new file with mode: 0644]
include/pwd.h
include/rpc/rpcent.h
include/stdlib.h
lib/libc/Makefile.inc
lib/libc/gen/Makefile.inc
lib/libc/gen/dlfunc.c [new file with mode: 0644]
lib/libc/gen/dlopen.3
lib/libc/gen/getgrent.3
lib/libc/gen/getgrent.c
lib/libc/gen/getgrouplist.c
lib/libc/gen/getpwent.3
lib/libc/gen/getpwent.c
lib/libc/gen/getusershell.3
lib/libc/gen/getusershell.c
lib/libc/gen/pw_scan.c [moved from usr.sbin/pwd_mkdb/pw_scan.c with 65% similarity]
lib/libc/gen/pw_scan.h [copied from usr.sbin/pwd_mkdb/pw_scan.h with 78% similarity]
lib/libc/gen/pwcache.3
lib/libc/gen/pwcache.c
lib/libc/include/namespace.h
lib/libc/include/nscache.h [new file with mode: 0644]
lib/libc/include/nscachedcli.h [new file with mode: 0644]
lib/libc/include/nss_tls.h [new file with mode: 0644]
lib/libc/include/un-namespace.h
lib/libc/net/Makefile.inc
lib/libc/net/getaddrinfo.c
lib/libc/net/gethostbydns.c
lib/libc/net/gethostbyht.c
lib/libc/net/gethostbyname.3
lib/libc/net/gethostbynis.c
lib/libc/net/gethostnamadr.c
lib/libc/net/getipnodebyname.3
lib/libc/net/getnetbydns.c
lib/libc/net/getnetbyht.c
lib/libc/net/getnetbynis.c
lib/libc/net/getnetent.3
lib/libc/net/getnetnamadr.c
lib/libc/net/getproto.c
lib/libc/net/getprotoent.c
lib/libc/net/getprotoname.c
lib/libc/net/getservbyname.c [deleted file]
lib/libc/net/getservent.c
lib/libc/net/hesiod.3 [new file with mode: 0644]
lib/libc/net/hesiod.c [new file with mode: 0644]
lib/libc/net/name6.c
lib/libc/net/netdb_private.h [new file with mode: 0644]
lib/libc/net/nscache.c [new file with mode: 0644]
lib/libc/net/nscachedcli.c [new file with mode: 0644]
lib/libc/net/nsdispatch.3 [new file with mode: 0644]
lib/libc/net/nsdispatch.c [new file with mode: 0644]
lib/libc/net/nslexer.l [new file with mode: 0644]
lib/libc/net/nsparser.y [new file with mode: 0644]
lib/libc/net/nss_backends.h [copied from lib/libc/net/getproto.c with 54% similarity]
lib/libc/net/nss_compat.c [new file with mode: 0644]
lib/libc/rpc/getrpcent.c
share/man/man5/Makefile
share/man/man5/group.5
share/man/man5/hesiod.conf.5 [new file with mode: 0644]
share/man/man5/hosts.5
share/man/man5/make.conf.5
share/man/man5/nsswitch.conf.5
share/man/man5/passwd.5
share/man/man8/yp.8
usr.bin/Makefile
usr.bin/chpass/chpass.c
usr.bin/chpass/edit.c
usr.bin/chpass/pw_copy.c
usr.bin/hesinfo/Makefile [new file with mode: 0644]
usr.bin/hesinfo/hesinfo.1 [new file with mode: 0644]
usr.bin/hesinfo/hesinfo.c [new file with mode: 0644]
usr.bin/passwd/Makefile
usr.sbin/Makefile
usr.sbin/nscd/Makefile [new file with mode: 0644]
usr.sbin/nscd/agent.c [new file with mode: 0644]
usr.sbin/nscd/agent.h [new file with mode: 0644]
usr.sbin/nscd/agents/Makefile.inc [new file with mode: 0644]
usr.sbin/nscd/agents/group.c [new file with mode: 0644]
usr.sbin/nscd/agents/group.h [copied from lib/libc/net/getproto.c with 57% similarity]
usr.sbin/nscd/agents/passwd.c [new file with mode: 0644]
usr.sbin/nscd/agents/passwd.h [copied from lib/libc/net/getproto.c with 57% similarity]
usr.sbin/nscd/agents/services.c [new file with mode: 0644]
usr.sbin/nscd/agents/services.h [copied from lib/libc/net/getproto.c with 57% similarity]
usr.sbin/nscd/cachelib.c [new file with mode: 0644]
usr.sbin/nscd/cachelib.h [new file with mode: 0644]
usr.sbin/nscd/cacheplcs.c [new file with mode: 0644]
usr.sbin/nscd/cacheplcs.h [new file with mode: 0644]
usr.sbin/nscd/config.c [new file with mode: 0644]
usr.sbin/nscd/config.h [new file with mode: 0644]
usr.sbin/nscd/debug.c [new file with mode: 0644]
usr.sbin/nscd/debug.h [new file with mode: 0644]
usr.sbin/nscd/hashtable.h [new file with mode: 0644]
usr.sbin/nscd/log.c [new file with mode: 0644]
usr.sbin/nscd/log.h [copied from lib/libc/net/getproto.c with 54% similarity]
usr.sbin/nscd/mp_rs_query.c [new file with mode: 0644]
usr.sbin/nscd/mp_rs_query.h [copied from lib/libc/net/getproto.c with 57% similarity]
usr.sbin/nscd/mp_ws_query.c [new file with mode: 0644]
usr.sbin/nscd/mp_ws_query.h [copied from lib/libc/net/getproto.c with 57% similarity]
usr.sbin/nscd/nscd.8 [new file with mode: 0644]
usr.sbin/nscd/nscd.c [new file with mode: 0644]
usr.sbin/nscd/nscd.conf.5 [new file with mode: 0644]
usr.sbin/nscd/nscdcli.c [new file with mode: 0644]
usr.sbin/nscd/nscdcli.h [moved from usr.sbin/pwd_mkdb/pw_scan.h with 52% similarity]
usr.sbin/nscd/parser.c [new file with mode: 0644]
usr.sbin/nscd/parser.h [moved from lib/libc/net/getservbyport.c with 50% similarity]
usr.sbin/nscd/protocol.c [new file with mode: 0644]
usr.sbin/nscd/protocol.h [new file with mode: 0644]
usr.sbin/nscd/query.c [new file with mode: 0644]
usr.sbin/nscd/query.h [new file with mode: 0644]
usr.sbin/nscd/singletons.c [copied from lib/libc/net/getproto.c with 57% similarity]
usr.sbin/nscd/singletons.h [copied from lib/libc/net/getproto.c with 57% similarity]
usr.sbin/pwd_mkdb/Makefile
usr.sbin/pwd_mkdb/pwd_mkdb.8
usr.sbin/pwd_mkdb/pwd_mkdb.c
usr.sbin/rarpd/Makefile
usr.sbin/rarpd/rarpd.8
usr.sbin/rarpd/rarpd.c
usr.sbin/ypserv/ypserv.8