Commit Graph

9 Commits

Author SHA1 Message Date
pfg
a052dbd989 nscd(8): let calloc(3) do the multiplying.
MFC after:	1 week
2017-03-13 20:34:53 +00:00
se
8b8c2303a1 Add the possibility to specify a threshold for the number of negative cache
results required to have the cache return lookup failure.

A new configuration parameter is introduced, which must be set to a value
greater than 1 to activate this feature. The default behavior is unchanged.

The purpose of this change is to allow probes for the existence of an entry
(which are expected to fail), before that entry is added to one of the
queried databases, without the cache returning the stale information from
the probe query until that cache entry expires. If, for example, a new user
account is created after checking that the new account name is available,
the negative cache entry would prevent immediate access to the account.

For that example, the new configuration option

negative-confidence-threshold passwd 2

will require a second negative query result to consider the negative cache
entry for a passwd entry valid, but if the user account has been created
between the queries, then the positive query result from the second query
will be cached and returned.
2012-07-04 09:02:12 +00:00
des
feee7c0482 Remove casts from {c,m,re}alloc() and simplify sizeof().
MFC after:	1 week
2009-06-13 13:07:56 +00:00
des
3301650689 Explain to the compiler why the aliasing we're doing is OK.
MFC after:	1 week
2009-06-13 01:22:56 +00:00
des
698cfdd8ea Change hashtable_index_t to unsigned.
Generate prototypes for our hash table.

MFC after:	1 week
2009-06-13 00:54:52 +00:00
des
34e7507e65 Further #include cleanup.
MFC after:	1 week
2009-06-13 00:43:56 +00:00
delphij
4274559e69 Slightly adjust code logic: we allocate a "size"ed length of memory, not
size+1.  Use strlcpy() to avoid using - 1 as length for strncpy().
2008-10-23 00:31:15 +00:00
delphij
43ddac3f1e Reduce code duplication: use calloc instead of allocing and memset
afterward.

Approved by:	bushman
2008-10-12 00:44:27 +00:00
ume
e14f1c3b3b - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Sponsored by:	Google Summer of Code 2005
2006-04-28 12:03:38 +00:00