summaryrefslogtreecommitdiff
path: root/nscd
AgeCommit message (Collapse)Author
2009-01-29[BZ #9750]Ulrich Drepper
* nscd/mem.c (gc): Use alloca_count to get the real stack usage. * include/alloca.h (alloca_account): Define. * sysdeps/x86_64/stackinfo.h (stackinfo_get_sp): Define. (stackinfo_sub_sp): Define.
2009-01-28* nscd/connections.c (nscd_init): If database file access beUlrich Drepper
opened check whether this is due to permission problems and bail in that case.
2009-01-28[BZ #9741]Ulrich Drepper
2009-01-28 Ulrich Drepper <drepper@redhat.com> [BZ #9741] * nscd/mem.c (gc): Fix assignment of he_data in case malloc is used. Reported by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>.
2009-01-112009-01-10 Roland McGrath <roland@redhat.com>Roland McGrath
* nscd/nscd.c (parse_opt): Use argp_error for bad -i argument.
2009-01-02* posix/getconf.c: Update copyright year.Ulrich Drepper
* 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.
2008-12-29* nscd/nscd_gethst_r.c (nscd_gethst_r): Don't use nscd ifUlrich Drepper
LOCALDOMAIN is defined. * nscd/nscd_getai.c (__nscd_getai): Likewise.
2008-12-09[BZ #7067]Ulrich Drepper
2008-12-03 Petr Baudis <pasky@suse.cz> [BZ #7067] * nscd/connections.c (invalidate_cache): Use prune_run_lock instead of prune_lock. (nscd_run_prune): Before calling prune_cache, take prune_run_lock. * nscd/nscd.h (database_dyn): Add prune_run_cache.
2008-12-03* socket/sys/socket.h: Declare accept4.Ulrich Drepper
* socket/accept4.c: New file. * sysdeps/unix/sysv/linux/accept4.c: New file. * sysdeps/unix/sysv/linux/i386/accept4.S: New file. * socket/Makefile (routines): Add accept4. * socket/Versions: Export accept4 with version GLIBC_2.10. * socket/paccept.c: Removed. * sysdeps/unix/sysv/linux/paccept.c: Removed. * sysdeps/unix/sysv/linux/i386/paccept.S: Removed. * Versions.def: Define GLIBC_2.10 for libc. * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_ACCEPT4. * nscd/connections.c: Use accept4. * sysdeps/unix/sysv/linux/i386/socket.S: Fix comment.
2008-10-17* elf/Makefile: Add rules to build and run tst-tls17.cvs/fedora-glibc-20081019T1815Ulrich Drepper
* elf/tst-tls17.c: New test. * elf/tst-tlsmod17a.c: New file. * elf/tst-tlsmod17b.c: Likewise.
2008-09-30* nscd/connections.c: Disable use of paccept for now.Ulrich Drepper
2008-08-03(main_loop_poll): Pass a buffer which is guaranteed to be large enough to ↵Ulrich Drepper
read inotify event. Ignore EAGAIN error. Better error message. Add branch predicition. (main_loop_epoll): Likewise.
2008-07-30* nscd/connections.c (nscd_init): Type if preprocessor directive.Ulrich Drepper
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PACCEPT): Define.
2008-07-26* Makeconfig: Define pie-ccflag and PIE-ccflag variables.Ulrich Drepper
* elf/Makefile: Use pie-ccflag variable. * nscd/Makefile: Likewise. * sysdeps/sparc/Makefile: Set $(pie-ccflag) to -fPIE.
2008-07-25* nscd/connections.c (nscd_init): Clean up fcntl call.Ulrich Drepper
2008-07-25* nscd/nscd_helper.c (open_socket): Use SOCK_CLOEXEC andUlrich Drepper
SOCK_NONBLOCK if possible.
2008-07-25* sysdeps/unix/sysv/linux/kernel-features.h: DefineUlrich Drepper
__ASSUME_PACCEPT, __ASSUME_IN_NONBLOCK, and __ASSUME_PACCEPT if appropriate. * nscd/connections.c: Avoid fcntl calls to set close-on-exec flag and non-blocking mode by using socket, paccept, and inotify_init1.
2008-07-12* nscd/connections.c (main_loop_poll): Fix handling of read errorsUlrich Drepper
from inotify. (main_loop_epoll): Likewise.
2008-06-18* nscd/connections.c (main_loop_poll): Fix test for read error.Ulrich Drepper
(main_loop_epoll): Likewise.
2008-06-13* nscd/connections.c: Also recognize and handle changes to theUlrich Drepper
resolver configuration file.
2008-06-12* nscd/nscd.h (struct database_dyn): Add inotify_descr and clear_cacheUlrich Drepper
fields. * nscd/connections.c (inotify_fd): New variable. (nscd_init): Try to open an inotify descriptor. If successful, watch files for databases using inotify instead of having prune threads stat the files. (nscd_run_prune): Recognize clear_cache flag being set and call prune_cache appropriately. (main_loop_poll): Add inotify descriptor to wait set and handle the reported changes. (main_loop_epoll): Likewise. * nscd/cache.c (prune_cache): Don't stat files for databases if inotify is used. * sysdeps/unix/sysv/linux/Makefile [subdir=nscd] (CFLAGS-connections.c): Add -DHAVE_INOTIFY.
2008-06-12* nscd/grpcache.c (cache_addgr): Correctly compute size ofcvs/fedora-glibc-20080612T1619Ulrich Drepper
fixed-size portion of the record. * nscd/servicescache.c (cache_addserv): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise.
2008-06-12* nscd/mem.c (gc): Initialize obstack earlier so that if we jumpUlrich Drepper
out we don't use uninitialized memory. * nscd/hstcache.c (cache_addhst): Send correct number of bytes to the client.
2008-06-03* nscd/nscd_getserv_r.c (__nscd_getservbyport_r): Pass cp Jakub Jelinek
instead of portstr to nscd_getserv_r. Patch by Roman Kagan <rkagan@mail.ru>. 2008-06-03 Jakub Jelinek <jakub@redhat.com> * nscd/nscd_getserv_r.c (__nscd_getservbyport_r): Pass cp instead of portstr to nscd_getserv_r. Patch by Roman Kagan <rkagan@mail.ru>.
2008-05-18* nscd/cache.c (cache_add): Take additional parameter specifyingUlrich Drepper
whether this is in response of a cache refill. Check alignment of package data. Revamp waking of pruning thread. (prune_cache): Small optimization. * nscd/nscd.h: Adjust cache_add prototypes. * nscd/aicache.c: Adjust cache_add calls. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/pwdcache.c: Likewise. * nscd/servicescache.c: Likewise. * nscd/connections.c (restart): Really disable cache use before exec attempt. If it fails, reenable cache. (nscd_run_prune): Initialize wakeup_time. After wakeup, set wakeup time to max to be able to notice concurrent cache additions. Unlock prune_lock while performing gc. Afterwards compute wakeup time with current wakeup_time value in mind.
2008-05-18* nscd/mem.c (gc): Avoid stack overflow when allocating move list.cvs/fedora-glibc-20080518T1017Ulrich Drepper
2008-05-18* nscd/mem.c (gc): Correctly determine highest used array elementUlrich Drepper
in mark.
2008-05-18* nscd/mem.c (markrange): Add assert to check entries are allUlrich Drepper
aligned. Small cleanup in bitmap use.
2008-05-18* nscd/nscd.h (mem_in_flight): Replace blockaddr field withUlrich Drepper
blockoff of type nscd_ssize_t. * nscd/mem.c (gc): Simplify markrange call for on-flight blocks. (mempoll_alloc): Record block offset and not address.
2008-05-18* nscd/mem.c (gc): Fix test for stack overuse.Ulrich Drepper
2008-05-17* nscd/aicache.c (addhstaiX): Fix a few small problems, cleanups,Ulrich Drepper
more asserts.
2008-05-11* nscd/cache.c (cache_add): Before returning with failure and thisUlrich Drepper
is the first use of the record, mark it as unusable. * nscd/aicache.c: Don't touch the dataset after cache_add returns reporting a failure. * nscd/grpcache.c: Likewise * nscd/hstcache.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/pwdcache.c: Likewise. * nscd/servicecache.c: Likewise.
2008-05-11(cache_add): Before returning with failure and this is the first use of the ↵Ulrich Drepper
record, mark it as unusable.
2008-05-10* include/resolv.h: Adjust __libc_res_nquery and __libc_res_nsendUlrich Drepper
prototypes. * include/arpa/nameser_compat.h: Define T_UNSPEC. * nis/Versions (libnss_nis): Export _nss_nis_gethostbyname4_r. (libnss_nisplus): Export _nss_nisplus_gethostbyname4_r. * nis/nss_nis/nis-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_nis_gethostbyname4_r): New function. * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent): Change to also handle af==AF_UNSPEC. (get_tablename): New function. Use it to avoid duplication. (_nss_nisplus_gethostbyname4_r): New function. * nscd/aicache.c (addhstaiX): Use gethostbyname4_r function is available. * nss/Versions (libnss_files): Export _nss_files_gethostbyname4_r. * nss/nss.h: Define struct gaih_addrtuple. * nss/nss_files/files-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_files_gethostbyname4_r): New function. * resolv/Versions (libnss_dns): Export _nss_dns_gethostbyname4_r. * resolv/gethnmaddr.c: Adjust __libc_res_nsearch and __libc_res_nquery calls. * resolv/res_query.c (__libc_res_nquery): Take two additional parameters for second answer buffer. Handle type=T_UNSPEC to mean look up IPv4 and IPv6. Change all callers. * resolv/res_send.c (__libc_res_nsend): Take five aditional parameters for an additional query and answer buffer. Pass to send_vc and send_dg. (send_vc): Send possibly two requests and receive two answers. (send_dg): Likewise. * resolv/nss_dns/dns-host.c: Adjust calls to __libc_res_nsearch and __libc_res_nquery. (_nss_dns_gethostbyname4_r): New function. (gaih_getanswer_slice): Likewise. (gaih_getanswer): Likewise. * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Adjust __libc_res_nquery call. * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise. (_nss_dns_getnetbyname_r): Adjust __libc_res_nsearch call. * sysdeps/posix/getaddrinfo.c: Use gethostbyname4_r function is available.
2008-04-22* nscd/Makefile (nscd-cflags): Set back to -fpie.Ulrich Drepper
* nscd/nscd.h (mem_in_flight): Add attribute_tls_model_ie. * nscd/connections.c (mem_in_flight): Likewise. * nscd/nscd.h (dbs): Make hidden. * sysdeps/unix/sysv/linux/times.c (__times): Fix check for EFAULT. Avoid returning -1, return 0 instead.
2008-04-19[BZ #5209, BZ #5381]Ulrich Drepper
2008-04-15 Ulrich Drepper <drepper@redhat.com> [BZ #5209] * sysdeps/unix/sysv/linux/times.c: New file. [BZ #5381] * nscd/nscd.h: Define enum in_flight, mem_in_flight, and mem_in_flight_list variables. Add new parameter to mempool_alloc prototype. * nscd/mem.c (mempool_alloc): Take additional parameter. Initialize appropriate mem_in_flight element. (gc): Take allocations which have not yet been committed to the database into account. * nscd/cache.c (cache_add): Add new parameter to mempool_alloc call. Reset mem_in_flight before returning. * nscd/connections.c (nscd_run_worker): Initialize mem_in_flight and cue it up in mem_in_flight_list. * nscd/aicache.c: Adjust mempool_alloc call. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/pwdcache.c: Likewise. * nscd/servicescache.c: Likewise. * nscd/Makefile (nscd-flags): Until ld is fixed, use -fpic instead of -fpie. * nscd/connections.c (handle_request): Provide better error message in case SELinux forbids the service. * version.h (VERSION): Bump to 2.8.90.
2008-03-29[BZ #5979]Ulrich Drepper
* 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 Drepper
* 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 Jelinek
* 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 Drepper
* 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 Drepper
2007-11-26 Ulrich Drepper <drepper@redhat.com> * posix/unistd.h: Declare fsync also for Unix98.
2007-11-25Clear array before use.Ulrich Drepper
* 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 Drepper
* 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 Drepper
* 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 Drepper
to wake up in 24 hours.
2007-11-14* nscd/gai.c (__ioctl): Define. Include check_native.c.Ulrich Drepper
2007-11-06* nscd/selinux.c (nscd_request_avc_has_perm): When compiled withUlrich Drepper
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 Drepper
Patch by Szymon Siwek <sls@poczta.wp.pl>.
2007-11-06* nscd/aicache.c (addhstaiX): Check herrno after IPv4 lookup onlyUlrich Drepper
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 Drepper
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 Drepper