(dbs): Initialize max_db_size fields.
(nscd_init): When mapping the database, use max_db_size as the
mapping size even if it is bigger than the file size.
* nscd/mem.c (mempool_alloc): When resizing the file make sure the
limit in max_db_size is not exceeded. Don't use mremap, just
posix_fallocate is enough (according to Linus). Use posix_fallocate
correctly.
* nscd/nscd.conf: Add max-db-size parameters.
* nscd/nscd.h (struct database_dyn): Add max_db_size field.
Define DEFAULT_MAX_DB_SIZE and DEFAULT_DATASIZE_PER_BUCKET.
Temporarily define TEMP_FAILURE_RETRY_VAL here.
* nscd/nscd_conf.c (nscd_parse_file): Parse max-db-size parameter
and add sanity checks for it.
* nscd/aicache.c (addhstaiX): Use send with MSG_NOSIGNAL not write to
send reply.
* nscd/connection.c (writeall): Likewise.
(handle_request): Likewise.
* nscd/grpcache.c (cache_addgr): Likewise.
* nscd/hstcache.c (cache_addhst): Likewise.
* nscd/initgrcache.c (addinitgroupsX): Likewise.
* nscd/nscd.c (parse_opt): Likewise.
* nscd/nscd_stat.c (send_stats): Likewise.
(receive_print_stats): Likewise.
* nscd/pwdcache.c (cache_addpw): Likewise.
NETDB_INTERNAL if buffer is too small.
* nscd/hstcache.c (INCR): Remove.
(addhstbyX): Double buflen in each iteration rather than add INCR.
* nscd/grpcache.c: Likewise.
* nscd/pwdcache.c: Likewise.
* nscd/connections.c: Implement r/o sharing of nscd's cache with client
processes via shared memory.
* nscd/nscd-client.h: Likewise.
* nscd/nscd.h: Likewise.
* nscd/nscd_conf.c: Likewise.
* nscd/nscd_getgr_r.c: Likewise.
* nscd/nscd_getpw_r.c: Likewise.
* nscd/nscd_gethst_r.c: Likewise.
* nscd/nscd.conf: Add new config parameters.
* nscd/Makefile (aux): Add nscd_helper.
* nscd/nscd_helper.c: New file.
* nscd/mem.c (gc): Indicate beginning and end of the gc cycle.
* nscd/hstcache.c: Simplify a lot. We cache only the request itself,
no derived information.
* connections.c (nscd_init): Fix bug in testing size of the persistent.
* nis/Makefile (aux): Add nis_hash.
* nis/nis_hash.c: New file. Split out from nis_util.c.
* nis/nis_util.c: Move __nis_hash code in separate file.
* csu/tst-atomic.c: Improve atomic_increment_val test which would
not have found a ppc bug.
2004-08-26 Ulrich Drepper <drepper@redhat.com>
* nscd/cache.c: Major rewrite. The data is now optionally kept in
a mmaped memory region which is automatically mirrored on disk.
This implements persistent data storage. The Memory handled
needed to be completely revamped, it now uses a garbage collection
mechanism instead of malloc.
* nscd/connections.c: Likewise.
* nscd/nscd.c: Likewise.
* nscd/nscd.h: Likewise.
* nscd/nscd_conf.c: Likewise.
* nscd/nscd_stat.c: Likewise.
* nscd/grpcache.c: Likewise.
* nscd/hstcache.c:: Likewise.
* nscd/pwdcache.c:: Likewise.
* nscd/Makefile: Add rules to build mem.c.
* nscd/mem.c: New file.
* nscd/nscd.conf: Describe new configuration options.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Consolidate writing of the
request with one writev call. Protect all read calls with
TEMP_FAILURE_RETRY.
* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
* nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise.
* nscd/hstcache.c: Use extend_alloca to reallocate alloca'd buffer.
Protect writev calls with TEMP_FAILURE_RETRY.
* nscd/grpcache.c: Likewise.
* nscd/pwdcache.c: Likewise.
* sysdeps/unix/sysv/linux/wait.c: Don't include <nptl/pthreadP.h> or
<tls.h> here, no need for it.
* sysdeps/unix/sysv/linux/waitpid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fcntl.c (do_fcntl): Take ARG as void *
parameter, not varargs parameter.
* sysdeps/generic/sysdep-cancel.h (LIBC_CANCEL_RESET): Evaluate the
argument so it's not an unused variable.
* resolv/resolv.h (__p_key_syms, __p_cert_syms, __p_class_syms,
__p_type_syms, __p_rcode_syms): Remove decls, never really intended
for users.
* resolv/Versions (libresolv: GLIBC_2.3.2): New set, add __p_rcode.
2002-12-15 Art Haas <ahaas@airmail.net>
* nscd/connections.c: C99 initializer conversion.
* nscd/grpcache.c: Same.
* nscd/hstcache.c: Same.
* nscd/pwdcache.c: Same.
* nscd/hstcache.c (cache_addhst): Add new parameter saying whether
entry was for getaddr* lookup or not. Add only matching cache
entry. Change all callers [PR libc/4317].
* libio/bug-rewind.c: Fix creation of temp file.
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
2000-09-29 David Mosberger <davidm@hpl.hp.com>
* sysdeps/unix/sysv/linux/ia64/sysdep.S (__ia64_syscall): Cleanup.
* sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Implement.
2000-06-10 David Mosberger <davidm@hpl.hp.com>
* sysdeps/unix/sysv/linux/ia64/setjmp.S: Fix it so it actually
works: call to __sigjmp_save must be done unconditionally to
ensure jmp_buf is initialized properly.
2000-09-27 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Synch with Linux
2.4.0-test9-pre7.
2000-09-29 Jakub Jelinek <jakub@redhat.com>
* nscd/nscd-client.h (NSCD_VERSION): Bump to 3.
Use int32_t where appropriate.
* nscd/nscd_gethst_r.c (nscd_gethst_r): Use uint32_t instead of size_t
where appropriate.
* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
* nscd/hstcache.c (cache_addhst): Likewise.
* nscd/grpcache.c (cache_addgr): Likewise.
2000-02-17 Ulrich Drepper <drepper@redhat.com>
* nscd/hstcache.c (cache_addhst): Don't cache name->record entries
if more than one IP address is available.
1999-07-11 H.J. Lu <hjl@gnu.org>
* nscd/grpcache.c: Add prefix "__" to get[a-z]*_r () to get
nscd's own strong version of the get[a-z]*_r function.
* nscd/hstcache.c: Likwise.
* nscd/pwdcache.c: Likwise.
1999-06-11 Thorsten Kukuk <kukuk@suse.de>
* nscd/nscd.c: Add -S options for separate caching of data for
every user. So one user couldn't see the data another user
has gotten with his credentials.
* nscd/nscd.h: Add new prototypes.
* nscd/cache.c: Compare owner of cache entry if in secure mode.
* nscd/connections.c: Check on shutdown if caller really was root.
In secure mode get uid of caller.
* nscd/grpcache.c: Add support for new secure group mode.
* nscd/hstcache.c: Add support for new secure hosts mode.
* nscd/pwdcache.c: Add support for new secure passwd mode.
1999-02-06 Ulrich Drepper <drepper@cygnus.com>
* Versions.def: Add versions for ld.so.
* csu/Versions: Remove __libc_stack_end here.
* elf/Versions: Split libc definitions in libc and ld.so definitions.
* elf/Makefile (ld-map): Change to ld.so.map.
* scripts/versions.awk: Recognize dot in library names.
* ctype/ctype.h: Remove definitions of __tolower and __toupper.
Don't use __tolower and __toupper in inline functions.
Add optimizing macros for tolower and toupper.
* ctype/ctype-extn.c (_tolower): Don't use __tolower.
(_toupper): Don't use __toupper.
* ctype/ctype.c (tolower): Don't use __tolower.
(toupper): Don't use toupper.
* nscd/cache.c (prune_cache): Correct printing of debugging messages.
* resolv/Versions (libresolv): Export __ns_name_unpack and
__ns_name_ntop.
* resolv/res_comp.c: Rename ns_name_unpack to __ns_name_unpack and
make it global. Change all users. Similar for ns_name_ntop.
* resolv/nss_dns/dns-host.c: Don't use dn_expand when extracting in
user-provided buffer. Use __ns_name_unpack and __ns_name_ntop
directly to detect too small buffer.
* stdio-common/Makefile (tests): Add scanf12.
* stdio-common/scanf12.c: New file.
* stdio-common/scanf12.input: New file.
* stdio-common/vfscanf.c (__vfscanf): Handle +/- at beginning of
floating-point correctly if the number is invalid.
* stdio-common/vfscanf.c: Don't use non-reentrant multibyte conversion
* stdio-common/printf_fphex.c: Likewise.
* stdio-common/vfprintf.c: Likewise.
See ChangeLog.9 for earlier changes.
1998-10-18 Ulrich Drepper <drepper@cygnus.com>
* resolv/nss_dns/dns-host.c: Add missing errnop parameter to the
NSS functions.
* resolv/nss_dns/dns-network.c: Likewise.
* grp/Makefile: Don't search for linuxhtreads in add-ons, use
have-thread-library to determine whether threads are available.
* pwd/Makefile: Remove wrong comment.
* inet/Makefile: Define CFLAGS-gethstbyad_r.c, CFLAGS-gethstbynm_r.c,
and CFLAGS-gethstbynm2_r.c to -DUSE_NSCD=1.
* locale/C-messages.c: Define default strings for YESTR and NOSTR.
* nss/Versions: Add __nss_hosts_lookup.
* nss/getXXbyYY.c: Remove unneeded assignment.
* nss/getXXbyYY_r.c: Include nscd/nscd_proto.h only if needed.
Almost complete rewrite of the NSCD to make it smaller, faster,
add more functionnality and make it easier to extend.
* nscd/Makfile (routines): Add nscd_gethst_r.
(nscd-modules): Add hstcache, gethstbyad_r, gethstbynm2_r, and cache.
* nscd/cache.c: New file.
* nscd/gethstbyad_r.c: New file.
* nscd/gethstbynm2_r.c: New file.
* nscd/hstcache.c: New file.
* nscd/nscd_gethst_r.c: New file.
* nscd/connections.c: Rewritten. Don't start new thread for every
new connection. Use a fixed set of threads which handle all
connections and also the cache cleanup.
* nscd/grpcache.c: Rewritten to use generic cache handling functions
in cache.c.
* nscd/nscd.c: Recognize new parameter nthreads. Adjust initialization
for rewrite. Remove handle_requests function.
* nscd/nscd.h (NSCD_VERSION): Bump to 2.
Define new data structure for the new unified cache and the host
database entries.
* nscd/nscd_conf.c: Rewrite parsing partly to allow adding of more
databases easily. Recognize check-files and threads definitions.
* nscd/nscd.conf: Add definition of enable-cache and check-files to
passwd and group definitions. Add new set of definitions for hosts.
* nscd/nscd_getgr_r.c: Rewrite for new protocol.
* nscd/nscd_getpw_r.c: Likewise.
* nscd/nscd_proto.h: Add prototype for host database functions.
* nscd/nscd_stat.c: Rewrite to simplify printing of information
for many databases.
* nscd/dbg_log.c: Remove unnecessary variable initializations.
Global variable debug_flag is renamed to dbg_level.
* nscd/dbg_log.h: Declare set_logfile.