aboutsummaryrefslogtreecommitdiff
path: root/nscd
AgeCommit message (Collapse)AuthorFilesLines
2008-03-29[BZ #5979]Ulrich Drepper1-1/+1
* sunrpc/auth_unix.c: Unify printed strings. * sunrpc/clnt_tcp.c: Likewise. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/svc_tcp.c: Likewise. * sunrpc/svc_udp.c: Likewise. * sunrpc/svc_unix.c: Likewise. * sunrpc/xdr.c: Likewise. * sunrpc/xdr_array.c: Likewise. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_ref.c: Likewise. * locale/programs/ld-time.c (time_finish): Unify messages. * locale/programs/locfile.c (handle_copy): Fix typo. * nscd/nscd.c (options): Fix typo.
2008-03-04[BZ #5818]Ulrich Drepper4-27/+37
* nscd/connections.c (dbs): Add initializers for .suggested_module. (verify_persistent_db): Remove one unnecessary test and add a new one for bad configuration. (nscd_init): Improve error reported when persistent database cannot be reused. * nscd/nscd.h (DEFAULT_SUGGESTED_MODULE): Define. * nscd/nscd_conf.c (nscd_parse_file): Provide default values for .suggested_module and .max_db_size and case config file says the values are zero. * nscd/nscd_helper.c (get_mapping): Fail if hash table module is zero.
2008-01-05[BZ #5112] Jakub Jelinek1-2/+3
* nscd/connections.c (restart): Fix condition. 2008-01-05 Jakub Jelinek <jakub@redhat.com> [BZ #5112] * nscd/connections.c (restart): Fix condition.
2008-01-02* posix/getconf.c: Update copyright year.Ulrich Drepper1-2/+2
* nss/getent.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c: Likewise. * elf/ldconfig.c: Likewise. * catgets/gencat.c: Likewise. * csu/version.c: Likewise. * elf/ldd.bash.in: Likewise. * elf/sprof.c (print_version): Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * nscd/nscd.c (print_version): Likewise. * debug/xtrace.sh: Likewise. * malloc/memusage.sh: Likewise. * malloc/mtrace.pl: Likewise. * debug/catchsegv.sh: Likewise.
2007-11-26Declare fsync also for Unix98.Ulrich Drepper1-1/+1
2007-11-26 Ulrich Drepper <drepper@redhat.com> * posix/unistd.h: Declare fsync also for Unix98.
2007-11-25Clear array before use.Ulrich Drepper5-1/+11
* nscd/hstcache.c (cache_addhst): Likewise. * nscd/grpcache.c (cache_addgr): Likewise. * nscd/servicescache.c (cache_addserv): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise.
2007-11-25* nscd/nscd.h (MAX_STACK_USE): Define.Ulrich Drepper4-7/+33
* nscd/mem.c (MAX_STACK_USE): Remove definition here. (gc): Initialize stack_used based on allocation in prune_cache. * nscd/cache.c (prune_cache): Use heap for mark array if necessary. Clear array bfore use. * nscd/aicache.c (addhstaiX): Update statistics counter in case memory allocate failed.
2007-11-23[BZ #5382]Ulrich Drepper3-6/+55
* nscd/nscd.h (NSCD_THREAD_STACKSIZE): Define. * nscd/connections.c (start_threads): Use NSCD_THREAD_STACKSIZE. * nscd/mem.c (gc): Don't allocate arrays on stack if it can overflow it. * sysdeps/unix/sysv/linux/nscd_setup_thread.c (setup_thread): Return zero in case thread library is not NPTL.
2007-11-14* nscd/cache.c (prune_cache): If cache is empty, instruct callerUlrich Drepper1-2/+5
to wake up in 24 hours.
2007-11-14* nscd/gai.c (__ioctl): Define. Include check_native.c.Ulrich Drepper1-0/+2
2007-11-06* nscd/selinux.c (nscd_request_avc_has_perm): When compiled withUlrich Drepper1-0/+8
old headers, don't call avc_has_perm if we don't have the permission information.
2007-11-06* time/tzfile.c (__tzfile_read): Fix check for version 0 data files.Ulrich Drepper1-1/+1
Patch by Szymon Siwek <sls@poczta.wp.pl>.
2007-11-06* nscd/aicache.c (addhstaiX): Check herrno after IPv4 lookup onlyUlrich Drepper6-106/+145
when the lookup call failed. * nscd/nscd.h (struct database_dyn): Rename prunelock to prune_lock. Add prune_cond and wakeup_time. (CACHE_PRUNE_INTERNAL): Define. Update declarations of prune_cache and setup_thread. * nscd/connections.c (dbs): Update initializers. (CACHE_PRUNE_INTERNAL): Moved to nscd.h. (nscd_init): Default number of threads is now 4. (invalidate_cache): Take lock before calling prune_cache. (handle_request): If SELinux forbids the request, say so. (readylist_cond): Use static initializer. (nscd_run_prune): New function. Used only by pruning threads. (nscd_run_worder): Renamed from nscd_run. Remove support for pruning here. (fd_ready): Update nscd_run reference. (start_threads): No need to initialize readylist_cond. Start pruning threads separately. * nscd/nscd_setup_thread.c: Change return value type to int and always return 0. * sysdeps/unix/sysv/linux/nscd_setup_thread.c: Change return value type to int and return nonzero value if we can use the TID address hack. * nscd/cache.c (cache_add): If next wakeup time of cleanup thread for the database is later than the new entry's timeout, update the wakeup time and wake the cleanup thread. (prune_cache): Return seconds the next entry in the database is still valid. Remove locking for pruning here. * nscd/nscd.conf: Document default number of threads.
2007-10-30* nscd/Makefile (nscd-modules): Replace gethstbynm2_r withUlrich Drepper5-24/+53
gethstbynm3_r. * nscd/gethstbynm2_r.c: Remove. * nscd/gethstbynm3_r.c: New file. * nscd/aicache.c (addhstaiX): Use __gethostbyaddr2_r instead of __gethostbyaddr_r. * nscd/gethstbyad_r.c: Generate __gethostbyaddr2_r function. Define __gethostbyaddr_r compatibility wrapper. * nscd/hstcache.c (cache_addhst): Add ttl parameter. Use it when determining timeout of entry. (lookup): Take new parameter and pass it to __gethostbyname3_r and __gethostbyaddr2_r. (addhstbyX): Pass reference to variable for TTL to lookup and cache_addhst. * nss/Versions [glibc] (GLIBC_PRIVATE): Export __nss_passwd_lookup2, __nss_group_lookup2, __nss_hosts_lookup2, __nss_services_lookup2, and __nss_next2. Remove __nss_services_lookup. * nss/XXX-lookup.c: Name function now *_lookup2. Add new parameter. Add compat wrapper. * nss/getXXbyYY_r.c: Changes to call new *_lookup2 functions and __nss_next2. * nss/getXXent_r.c: Likewise. * nss/getnssent_r.c: Likewise. * nss/nsswitch.c (__nss_lookup): Add new parameter. If first function does not exist in module, try the optional second name. (__nss_next2): New function. (__nss_next): Now wrapper around __nss_next2. * nss/nsswitch.h: Adjust __nss_lookup prototype. Declare __nss_next2. Adjust definition of db_lookup_function type. * nss/service-lookup.c: Define NO_COMPAT. * include/netdb.h: Declare __gethostbyaddr2_r and __gethostbyname3_r. * inet/ether_hton.c: Use __nss_next2 instead of __nss_next. * inet/ether_ntoh.c: Likewise. * sunrpc/netname.c: Likewise. * sunrpc/publickey.c: Likewise. * inet/getnetgrent.c: Likewise. Adjust calls to __nss_lookup. * inet/gethstbyad_r.c (DB_LOOKUP_FCT): Change to __nss_hosts_lookup2. * inet/gethstbynm2_r.c (DB_LOOKUP_FCT): Likewise. * inet/gethstbynm_r.c (DB_LOOKUP_FCT): Likewise. * inet/gethstent_r.c (DB_LOOKUP_FCT): Likewise. * nscd/aicache.c (addhstaiX): Fix default TTL handling. * inet/getnetgrent.c (setup): Encrypt static pointer.
2007-10-26(prune_cache): Move test for modified file outside of locking.Ulrich Drepper1-16/+22
2007-10-15* nscd/nscd_getgr_r.c (nscd_getgr_r): Store result of successfulUlrich Drepper1-10/+8
read from nscd.
2007-10-14* include/time.h: Declare __tzset_parse_tz and __tzset_compute.Ulrich Drepper1-20/+20
* time/tzset.c (tzset_internal): Break TZ string parsing out into __tzset_parse_tz and updating of daylight, timezone, tzname into update_vars. (__tz_compute): Renamed from tz_compute. Take additional parameters. (__tz_convert): Updating of tm_isdst, tm_zone, and tm_gmtoff now happens in __tz_compute. * time/tzfile.c (__tzfile_read): Also read TZ string. (find_transition): Fold into __tzfile_compute. (__tzfile_compute): For times beyond the last transition try to use the TZ string. * timezone/tst-timezone.c: Information in daylight and tzname does change for Asia/Tokyo timezone with more concrete information. Remove the test. * include/stdio.h: Add libc_hidden_proto for ftello. * libio/ftello.c: Add libc_hidden_def.
2007-10-13[BZ #3195]Ulrich Drepper6-11/+11
* nscd/nscd_getai.c (__nscd_getai): Set errno to 0 in case we found no entry. * nscd/nscd_getgr.c (nscd_getgr_r): Likewise. * nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise. * nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise. * nscd/nscd_getserv_r.c (nscd_getserv_r): Likewise.
2007-10-13* nscd/nscd_getgr_r.c (nscd_getgr_r): Optimize a bit: use simplerUlrich Drepper1-43/+59
read mechanism when there are no group members and avoid no-op read syscall in this case.
2007-10-13[BZ #3242]Ulrich Drepper1-35/+68
2007-10-13 Ulrich Drepper <drepper@redhat.com> [BZ #3242] * nscd/nscd_helper.c (wait_on_socket): Take timeout as parameter. (__readall): If reading failed due to EAGAIN error wait a bit and possibly try again. (__readvall): Likewise.
2007-10-07[BZ #3924]Ulrich Drepper2-6/+25
* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix a few more little bugs in creating the stack frame when pltexit has to be called.
2007-10-06* nscd/connections.c (verify_persistent_db): Recognize circular lists.Ulrich Drepper1-1/+6
2007-10-06* nscd/nscd_helper.c (__nscd_cache_search): Prevent endless loops.Ulrich Drepper1-1/+6
2007-10-05[BZ #5112]Ulrich Drepper1-7/+8
* nscd/connections.c (restart): Don't resync if database is disabled. Patch mostly by Brian De Wolf <bldewolf@csupomona.edu>.
2007-08-29* nscd/connections.c (send_ro_fd): Also transfer file size.Ulrich Drepper2-15/+31
* nscd/nscd_helper.c (get_mapping): If nscd also transfers the file size don't call fstat.
2007-08-29* nscd/nscd_helper.c (get_mapping): Avoid the pread call, just goUlrich Drepper1-30/+29
ahead and map the file. This should always be correct and we can catch problems later.
2007-08-22[BZ #4946]Ulrich Drepper1-1/+1
* nscd/connections.c (handle_request): Using sendfile always requires that mmap is used for the database. Patch by Petr Baudis <pasky@suse.cz>.
2007-08-22[BZ #4905]Ulrich Drepper1-13/+19
* nscd/hstcache.c (cache_addhst): When reloading an entry which suddenly has two or more addresses, ignore it and remove the old entry.
2007-08-22[BZ #4814]Ulrich Drepper5-4/+20
* resolv/res_hconf.c: Prepare for compiling outside libc. * nscd/res_hconf.c: New file. * nscd/Makefile (nscd-modules): Add res_hconf. Add rules to build the new file. * nscd/gethstbynm2_r.c (NEED__RES_HCONF): Define. * nscd/gethstbyad_r.c (NEED__RES_HCONF): Likewise.
2007-08-22* nscd/hstcache.c (cache_addhst): Minimal optimization.Ulrich Drepper1-1/+1
2007-08-13* nscd/servicescache.c: Include kernel-features.h.Ulrich Drepper2-0/+3
* nscd/gai.c: Likewise. * sysdeps/unix/sysv/linux/statfs64.c: Likewise. * sysdeps/unix/sysv/linux/fstatfs64.c: Likewise. * sysdeps/unix/sysv/linux/fxstatat.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/xstatconv.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Likewise. * sysdeps/unix/sysv/linux/ifaddrs.c: Likewise.
2007-08-11* nscd/connections.c: Use O_CLOEXEC is possible. Use mkostempUlrich Drepper1-6/+21
instead of mkstemp. * misc/Makefile (routines): Add mkostemp and mkostemp64. * misc/Versions: Export mkostemp and mkostemp64 for GLIBC_2.7. * misc/mkostemp.c: New file. * misc/mkostemp64.c: New file. * stdlib/stdlib.h: Declare the new functions. * sysdeps/posix/tempname.c: Add new parameter which is added to the flags for open. Remove __GT_BIGFILE handling. * stdio-common/tempname.c: Likewise. * include/stdio.h: Adjust __gen_tempname prototype. Renumber __GT_* constants. * libio/oldtmpfile.c: Adjust for __gen_tempname interface change. * misc/mkdtemp.c: Likewise. * misc/mkstemp.c: Likewise. * misc/mkstemp64.c: Likewise. * misc/mktemp.c: Likewise. * stdio-common/tempnam.c: Likewise. * stdio-common/tmpfile.c: Likewise. * stdio-common/tmpfile64.c: Likewise. * stdio-common/tmpnam.c: Likewise. * stdio-common/tmpnam_r.c: Likewise.
2007-07-28* nscd/selinux.c (preserve_capabilities): Initialize new_capsUlrich Drepper1-1/+1
to avoid warning. * iconv/gconv_open.c (__gconv_open): Initialize ptr to avoid warning. * nis/nis_subr.c (nis_getnames): Initialize saveptr to avoid warning. * resolv/inet_ntop.c (inet_ntop6): Initialize best.len and cur.len to avoid warnings.
2007-07-21* nscd/nscd_helper.c (get_mapping): Use MSG_CMSG_CLOEXEC forUlrich Drepper1-1/+5
descriptor received from nscd.
2007-07-16* elf/ldconfig.c: Allow GPLv2 or any later version.Roland McGrath22-44/+66
* elf/readlib.c: Likewise. * elf/chroot_canon.c: Likewise. * elf/cache.c: Likewise. * nscd/mem.c: Likewise. * nscd/getpwuid_r.c: Likewise. * nscd/grpcache.c: Likewise. * nscd/aicache.c: Likewise. * nscd/getsrvbynm_r.c: Likewise. * nscd/nscd.c: Likewise. * nscd/servicescache.c: Likewise. * nscd/getsrvbypt_r.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/gethstbyad_r.c: Likewise. * nscd/gethstbynm2_r.c: Likewise. * nscd/getgrnam_r.c: Likewise. * nscd/nscd_setup_thread.c: Likewise. * nscd/getpwnam_r.c: Likewise. * nscd/gai.c: Likewise. * nscd/connections.c: Likewise. * nscd/dbg_log.c: Likewise. * nscd/cache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/nscd_conf.c: Likewise. * nscd/getgrgid_r.c: Likewise. * nscd/pwdcache.c: Likewise. * catgets/gencat.c: Likewise. * locale/programs/linereader.h: Likewise. * locale/programs/locarchive.c: Likewise. * locale/programs/ld-paper.c: Likewise. * locale/programs/locfile-kw.h: Likewise. * locale/programs/ld-address.c: Likewise. * locale/programs/xmalloc.c: Likewise. * locale/programs/ld-time.c: Likewise. * locale/programs/localedef.c: Likewise. * locale/programs/simple-hash.c: Likewise. * locale/programs/xstrdup.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/locfile-kw.gperf: Likewise. * locale/programs/ld-collate.c: Likewise. * locale/programs/charmap-kw.gperf: Likewise. * locale/programs/charmap.h: Likewise. * locale/programs/charmap-kw.h: Likewise. * locale/programs/config.h: Likewise. * locale/programs/locfile.c: Likewise. * locale/programs/ld-ctype.c: Likewise. * locale/programs/charmap.c: Likewise. * locale/programs/ld-messages.c: Likewise. * locale/programs/repertoire.h: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/ld-name.c: Likewise. * locale/programs/linereader.c: Likewise. * locale/programs/locfile.h: Likewise. * locale/programs/3level.h: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-measurement.c: Likewise. * locale/programs/charmap-dir.c: Likewise. * locale/programs/ld-identification.c: Likewise. * locale/programs/localedef.h: Likewise. * locale/programs/charmap-dir.h: Likewise. * locale/programs/repertoire.c: Likewise. * locale/programs/simple-hash.h: Likewise. * locale/programs/ld-telephone.c: Likewise. * locale/programs/locale-spec.c: Likewise. * locale/programs/locfile-token.h: Likewise. * posix/getconf.c: Likewise. * iconv/dummy-repertoire.c: Likewise. * iconv/iconv_charmap.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c: Likewise. * malloc/memusagestat.c: Likewise. * sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise.
2007-05-29* sysdeps/unix/sysv/linux/internaltypes.h: IntroduceUlrich Drepper1-2/+2
COND_NWAITERS_SHIFT. * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS. * pthread_cond_init.c: Likewise. * pthread_cond_timedwait.c: Likewise. * pthread_cond_wait.c: Likewise. * pthread_condattr_getclock.c: Likewise. * pthread_condattr_setclock.c: Likewise. * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2007-05-29* nscd/nscd_helper.c (get_mapping): Handle short replies insteadUlrich Drepper1-3/+4
of crashing. When this is the case or if the reply is malformed, don't try to close the new file descriptor since it does not exist. Patch in part by Guillaume Chazarain <guichaz@yahoo.fr>.
2007-05-21* nscd/aicache.c (addhstaiX): If reported TTL is zero don't cacheUlrich Drepper1-17/+5
the entry.
2007-03-26* scripts/check-local-headers.sh: Filter out sys/capability.h.cvs/fedora-glibc-20070331T1609Ulrich Drepper2-8/+12
2007-03-22 Jakub Jelinek <jakub@redhat.com> * config.h.in (HAVE_LIBCAP): Add. * nscd/selinux.h: Include sys/capability.h rather than non-existent sys/capabilities.h. * nscd/selinux.c (preserve_capabilities): Use cap_free instead of free_caps. Cast away const from 4th cap_set_flag argument.
2007-03-18* nscd/gai.c: Include alloca.h.Ulrich Drepper1-0/+3
(__libc_use_alloca): Define.
2007-02-21* nscd/hstcache.c (cache_addhst): Remove unnecessary conditional.Ulrich Drepper3-4/+5
* nscd/servicescache.c (cache_addserv): Likewise. * nscd/grpcache.c (cache_addgr): In case a record changed on refresh, adjust key_copy.
2007-02-21[BZ #4074]Ulrich Drepper1-0/+1
* nscd/pwdcache.c (cache_addpw): In case a record changed on refresh, adjust key_copy.
2007-02-16* nscd/nscd.c (parse_opt): One more conversion to use send insteadUlrich Drepper1-16/+20
of writev.
2007-02-16* nscd/nscd_helper.c (open_socket): Don't send padding bytes fromUlrich Drepper1-2/+3
reqdata.
2007-02-02* nscd/nscd_helper.c (open_socket): Minor size optimization.Ulrich Drepper1-8/+8
2007-02-02* nscd/nscd_helper.c (open_socket): Use __gettimeofday instead of Jakub Jelinek1-2/+2
gettimeofday. 2007-02-02 Jakub Jelinek <jakub@redhat.com> * nscd/nscd_helper.c (open_socket): Use __gettimeofday instead of gettimeofday.
2007-02-01* sysdeps/unix/sysv/linux/i386/sysdep.h (PTR_MANGLE): Roll value beforecvs/fedora-glibc-20070202T0923Ulrich Drepper1-1/+0
returning. (PTR_DEMANGLE): Real definition now that it's not the same as PRT_MANGLE anymore. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * string/strerror_l.c: New file. * string/Makefile (routines): Add strerror_l. * string/string.h: Declare strerror_l. * string/Versions: Export strerror_l for GLIBC_2.6. * nscd/connections.c (nscd_run): Don't define MAXKEYLEN here.
2007-01-31* nscd/nscd_helper.c (open_socket): Now takes request type and keyUlrich Drepper1-52/+72
as parameter. Construct request record. Try sending request before the first poll use, it usually succeeds. Adjust all callers. * nscd/nscd-client.h: Define MAXKEYLEN.
2007-01-31Define MAXKEYLEN.Ulrich Drepper1-0/+3
2007-01-31Do recend check before realigning on strict alignment arches, as otherwise ↵Jakub Jelinek1-4/+4
it was comparing a stack address + offset with a mmap address.