Commit Graph

42 Commits

Author SHA1 Message Date
joel
572226da3d Remove end of line whitespace. 2012-07-04 10:17:02 +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
uqs
415a3a9b96 Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
uqs
e644199c18 mdoc: consistently spell our email addresses <foo@FreeBSD.org>
Reviewed by:	ru
2010-05-19 08:57:53 +00:00
gavin
e284ab29fb The default hash table size is 257 not 255. Reword the rest of the line
slightly while here.

PR:		bin/121671
Submitted by:	Artis Caune  artis.caune gmail.com
Approved by:	ed (mentor)
2010-01-03 19:28:51 +00:00
des
2a7596aeee Remove "extern" from function prototypes, and fix some (but not all)
style(9) violations.

MFC after:	1 week
2009-06-13 14:12:55 +00:00
des
306af13a03 Wrap some macros that needed wrapping.
MFC after:	1 week
2009-06-13 13:54:03 +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
8adb2bbd23 nscd builds cleanly at WARNS level 3.
MFC after:	1 week
2009-06-13 01:23:34 +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
4523b4f7c6 Fix a large number of signed - unsigned comparison warnings.
MFC after:	1 week
2009-06-13 00:56:17 +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
1a324d6674 #include the right header so we get prototypes for our own functions.
MFC after:	1 week
2009-06-13 00:46:07 +00:00
des
34e7507e65 Further #include cleanup.
MFC after:	1 week
2009-06-13 00:43:56 +00:00
des
b0bb75a321 Make the debugging macros expand to (void)0 instead of simply nothing
when debugging is turned off.
Rename debugging functions due to namespace violation.

MFC after:	1 week
2009-06-13 00:13:44 +00:00
des
79af22e74c #include cleanup
MFC after:	1 week
2009-06-13 00:06:52 +00:00
des
f27ad68328 Provide correct prototypes for functions with no arguments.
MFC after:	1 week
2009-06-12 23:39:05 +00:00
des
70758298f7 _nss_cache_cycle_prevention_function doesn't actually need to be a function,
it just needs to have external linkage.

MFC after:	1 week
2009-06-12 23:27:31 +00:00
maxim
2bfbc199a4 o Correct a database name: "group" not "groups".
PR:		docs/129853
Submitted by:	Denis Barov
MFC after:	1 week
2008-12-22 13:36:15 +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
be08be711c Use strlcpy() before strlen() instead of strncpy(). 2008-10-23 00:28:21 +00:00
delphij
5c9667b50c Since we are going to strlen() on the string, it is supposed to be
NUL-terminated, so use strlcpy() instead of strncpy() here.
2008-10-23 00:27:35 +00:00
delphij
5aab1041be Replace malloc() + memset() with calloc. This corrects a misuse of
memset() as a side effect.
2008-10-23 00:15:00 +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
bushman
bf73e5badc Removing startup banner. 2008-10-10 22:40:05 +00:00
jb
5582e69034 These are the things that the tinderbox has problems with because it
doesn't use the default CFLAGS which contain -fno-strict-aliasing.

Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.
2007-11-20 02:07:30 +00:00
simon
19aa36cbf7 Remove file which was accidently repo-copied to the wrong destination
file-name.  The file will be nuked entirely from the repository later.

Approved by:	re (kensmith)
2007-10-10 17:34:29 +00:00
bushman
134f3ad3d3 - Renaming repocopied cached to nscd
Approved by:	re (kensmith), brooks (mentor)
2007-08-09 13:06:12 +00:00
ru
815d860c2f - When building world WITHOUT_LIBPTHREAD, link libthr to libpthread.
- Don't build ngctl(8) and cached(8) if threading libs aren't built.
- Fix various issues in a cached(8) makefile.
2006-11-26 14:36:34 +00:00
ru
99849399c0 Revise markup. 2006-09-30 19:07:03 +00:00
ru
16cdb2382c Fix usage(). 2006-09-30 18:11:59 +00:00
ume
1075788769 If perform-actual-lookups is enabled, getservbyname() matches an entry
even when proto is not valid.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
2006-05-05 15:01:25 +00:00
ume
90151bff3d Fix alignment problem on AMD64.
Reported by:	Pascal Hofstee <caelian__at__gmail.com>
Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Tested by:	Pascal Hofstee <caelian__at__gmail.com>
2006-05-02 23:02:32 +00:00
maxim
894e8fd910 o Sort .Xrs. 2006-04-30 21:31:52 +00:00
maxim
5117112e9a o Reformat FILES section. 2006-04-30 21:30:25 +00:00
maxim
6e0d278f17 o Add missed commas. 2006-04-30 21:22:01 +00:00
maxim
a9bf15ea48 o Silence mdoc(7) warnings: remove an empty line, add missed .El macro.
New sentence - new line.
2006-04-30 21:14:48 +00:00
matteo
837df5219a Specify default values for positive-policy and negative-policy . 2006-04-30 18:34:48 +00:00
ceri
7ce19d80fb Typo. 2006-04-30 12:40:30 +00:00
trhodes
cae6dfae7d Reword a sentence modified in my previous commit. This new one is probably
better.

Hinted by:	ceri
2006-04-30 01:53:57 +00:00
trhodes
e56faa8cbe Follow FreeBSD mdoc(7) conventions:
- Remove hard sentence breaks;
- Avoid using double negatives or "sexist" language;
- Expand contractions;
- Remove a blank line;
- Some grammar changes.

Usually we do not "hard code" requests to submit bugs to the author, but
I will leave this go for now.
2006-04-29 01:34:03 +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