Commit Graph

30 Commits

Author SHA1 Message Date
christos
ce2c90c7c1 fix incomplete initializers 2006-10-15 16:14:46 +00:00
christos
03256c6e55 WARNS=4 2005-11-29 03:11:58 +00:00
thorpej
1fc5e9b8c4 _nsdispatching needs to count, not just be 1 or 0. Also shuffle around
its use a little to eliminate some duplication.
2005-06-26 16:27:36 +00:00
lukem
5994f053ec * Improve the comments in <nsswitch.h>
* Provide some more useful default ns_src arrays.
2004-11-10 07:23:32 +00:00
lukem
25d91a60fb * Re-number NS_FORCEALL from 1<<7 to 1<<8, moving it out of the "public"
bitrange for nsdispatch(3) return values.
* Tweak documentation comments in nsswitch.h
* Ensure the result from the back-end method is masked with
  NS_STATUSMASK before nsdispatch(3) returns it.
2004-10-04 04:02:27 +00:00
lukem
e775b9e35a Implement NS_FORCEALL, which may be set in defaults[0].flags by a caller of
nsdispatch(3) to indicate that all available database methods for a source
will be invoked.  This is useful for functions such as endgrent(3).
2004-09-29 02:47:32 +00:00
lukem
3d2c2adc4d also ensure defaults != NULL 2004-09-28 11:51:42 +00:00
simonb
965b11f656 Fix non-ELF case in _nsloadmod(). 2004-09-08 10:52:56 +00:00
thorpej
a2bbd45143 Prevent a deadlock that could occur if we try to update the configuration
data structures during a recursive call to nsdispatch() by keeping a record
of which threads are inside nsdispatch() at any given time.
2004-08-02 00:19:34 +00:00
thorpej
43d6d8d887 Add support for dynamically loading nsswitch modules on ELF platforms.
Adapted from FreeBSD.  Maintains full backward API / ABI compatbility
with built-in-only nsdispatch().

While here, also make nsdispatch() itself thread-safe.
2004-07-24 18:42:51 +00:00
thorpej
b8b64b05f9 Use ANSI function decls. 2004-07-16 16:11:43 +00:00
christos
cbebf25ae4 remove stray NSUNLOCK(); pointed out by Brian Ginsbach. 2004-05-24 16:16:26 +00:00
christos
94564d94a6 make this thread-safe. 2004-05-23 16:53:22 +00:00
wiz
e3e4fede44 __STDC__ is always defined on NetBSD. 2002-05-26 14:48:19 +00:00
christos
663f790f35 remove redundant declarations. 2000-12-20 20:51:08 +00:00
mycroft
605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
lukem
2468bbbf42 don't use err(); instead pass an error condition back to a higher
layer to warn() about.
1999-11-28 05:46:15 +00:00
lukem
d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem
2393f50e9e return NS_UNAVAIL if args are dodgy 1999-09-16 23:43:52 +00:00
lukem
b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
christos
8fe3352a10 sprinkle argsused till lint smiles at you. 1999-05-03 15:17:13 +00:00
lukem
257ec2e899 specifically include stdarg/varargs.h 1999-04-18 02:27:53 +00:00
lukem
645b10c9c4 add rcsids 1999-01-25 00:16:17 +00:00
lukem
0da2aba208 minor knf; don't exceed 80 columns ;) 1999-01-20 23:31:02 +00:00
christos
4e07a5c03b - add ARGSUSED
- remove unnecessary casts
- const poisoning
1999-01-20 13:05:29 +00:00
lukem
c8851d63a0 weak_alias nsdispatch 1999-01-20 11:49:33 +00:00
lukem
37df672063 * support extra two arguments to nsdispatch():
const char *method		/* method name for dynamic linking */
	const ns_src defaults[]		/* list of defaults */
* document above, and expand other docco.
1999-01-19 07:58:05 +00:00
lukem
29f39a2ca1 fix thinko introduced in last rototilling of nsdispatch; _nsdbtget()
would always return the entry for the first entry looked up.  noted by
andrew gillham (manifesting itself as ftp failing to lookup names).
1999-01-17 04:49:04 +00:00
lukem
6c5df78e61 remove debugging override of _PATH_NS_CONF 1999-01-16 01:21:01 +00:00
lukem
de3b78d72a merge nsswitch into main branch 1999-01-15 12:48:41 +00:00