summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/nsdispatch.c
Commit message (Collapse)AuthorAgeFilesLines
* The previous commit changed the behavior of nsdispatch() in thenectar2004-04-011-3/+1
| | | | | | | | | | | | | | case where an /etc/nsswitch.conf file was present, but could not be opened (e.g. due to permissions). Previously, the open failure condition was suppressed, and the built-in defaults were used. In revision 1.11, however, propagated the open failure causing all nsdispatch() invocations to return NS_UNAVAIL, and thus many APIs including getpwnam and gethostbyname unconditionally failed. This commit restores the previous behavior. Pointy hat: nectar (+1 for obstinance; ache had to use clue bat) Reported by: ache
* When a dynamic NSS module is built and linked against a threadnectar2004-03-301-20/+39
| | | | | | | | | | | | | library, it may pull in that thread library at run time. If the process started out single-threaded, this could cause attempts to release locks that do not exist. Guard against this possibility by checking __isthreaded before invoking thread primitives. A similar problem remains if the process is linked against one thread library, but the NSS module is linked against another. This can only be avoided by careful design of the NSS module. Submitted by: Sean McNeil <sean@mcneil.com> (mostly; bugs are mine)
* Make this compile with -O2. A proper fix would use a struct to representdes2004-03-151-22/+22
| | | | | vectors, instead of requiring the caller to keep track of element size and count and pass them in by reference.
* Whitespace nits.des2004-03-151-4/+4
|
* Don't complain about missing NSS methods when built statically. It isnectar2003-04-241-1/+3
| | | | | | annoying and not very useful. Sponsored by: DARPA, Network Associates Laboratories
* = Implement name service switch modules (NSS modules). NSS modulesnectar2003-04-171-115/+469
| | | | | | | | | | | | | | | | | | | | | may be built into libc (`static NSS modules') or dynamically loaded via dlopen (`dynamic NSS modules'). Modules are loaded/initialized at configuration time (i.e. when nsdispatch is called and nsswitch.conf is read or re-read). = Make the nsdispatch(3) core thread-safe. = New status code for nsdispatch(3) `NS_RETURN', currently used to signal ERANGE-type issues. = syslog(3) problems, don't warn/err/abort. = Try harder to avoid namespace pollution. = Implement some shims to assist in porting NSS modules written for the GNU C Library nsswitch interface. Sponsored by: DARPA, Network Associates Laboratories
* Eliminate 19 warnings in libc (at level WARNS=2) of thenectar2003-02-271-0/+2
| | | | `implicit declaration of function' variety.
* Assume __STDC__, remove non-__STDC__ code.alfred2002-05-281-14/+0
| | | | Submitted by: keramida
* Fix the style of the SCM ID's.obrien2002-03-221-4/+1
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove __P() usage.obrien2002-03-211-2/+2
|
* Fixed namespace pollution related to `err' in libc in the same way as forbde2001-11-111-2/+2
| | | | | | | | `warn'. Now a whole 2 members of the err() family don't cause pollution. This fixes world breakage in awk for NOSHARED worlds. contrib/awk/msg.c has had its own version of err() for a long time, but this somehow didn't cause problems until the update to awk-3.1.0.
* Add nsswitch support. By creating an /etc/nsswitch.conf file, you cannectar2000-09-061-0/+270
configure FreeBSD so that various databases such as passwd and group can be looked up using flat files, NIS, or Hesiod. = Hesiod has been added to libc (see hesiod(3)). = A library routine for parsing nsswitch.conf and invoking callback functions as specified has been added to libc (see nsdispatch(3)). = The following C library functions have been modified to use nsdispatch: . getgrent, getgrnam, getgrgid . getpwent, getpwnam, getpwuid . getusershell . getaddrinfo . gethostbyname, gethostbyname2, gethostbyaddr . getnetbyname, getnetbyaddr . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr = host.conf has been removed from src/etc. rc.network has been modified to warn that host.conf is no longer used at boot time. In addition, if there is a host.conf but no nsswitch.conf, the latter is created at boot time from the former. Obtained from: NetBSD
OpenPOWER on IntegriCloud