summaryrefslogtreecommitdiff
path: root/nscd
AgeCommit message (Collapse)Author
2006-04-25[BZ #2571]Ulrich Drepper
* nscd/nscd_helper.c (__nscd_get_map_ref): Make mapptr argument a volatile pointer so that the mapptr->mapped value is re-read after the lock is retrieved. * nscd/nscd-client.h: Update __nscd_get_map_ref prototype. * sysdeps/unix/sysv/linux/ia64/clone2.S: Check for NULL stack
2006-04-07* libio/fmemopen.c (fmemopen): Free stream memory in case ofUlrich Drepper
invalid length [Coverity CID 106]. * nss/nss_files/files-key.c (search): Close stream before successful return [Coverity CID 107]. * io/fts.c (fts_open): Don't allocate parent if *argv==NULL [Coverity CID 108]. * sunrpc/rpc_cout.c (inline_struct): Free sizestr after use [Coverity CID 110, 109]. * sunrpc/rpc_scan.c (docppline): Free file string if it is not going to be used [Coverity CID 111]. * sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free memory if socket level value cannot be retrieved [Coverity CID 112]. * nis/nis_clone_dir.c (nis_clone_directory): Free all memory in error case [Coverity CID 114]. * nis/nis_clone_res.c (nis_clone_result): Free all memory in the error cases [Coverity CID 115]. * sunrpc/rpc_parse.c (get_definition): Free defp if tok == TOK_EOF [Coverity CID 116]. * sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free memory if socket level value cannot be retrieved [Coverity CID 117]. * elf/cache.c (save_cache): Initialize pad to avoid writing uninitialized data to disk. * elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118]. * intl/finddomain.c (_nl_find_domain): Avoid strdup of expand locale name, use strdupa. Remove free call [Coverity CID 119]. * sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and the resulting leak [Coverity CID 121]. * sunrpc/rpc_main.c (mkfile_output): Free all allocated memory [Coverity CID 122]. * sunrpc/rpc_main.c (h_output): Free guard after we are done [Coverity CID 123]. * sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation fails [Coverity CID 126]. * sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error cases [Coverity CID 127]. * nis/nis_table.c (__create_ib_request): Free ibreq in case strdup fails [Coverity CID 128]. * nis/nis_getservlist.c (nis_getservlist): Free all memory in case of an error [Coverity CID 130, 129]. * nis/nis_print_group_entry.c (nis_print_group_entry): If nis_lookup call failed, return. Free lookup result in error cases [Coverity CID 131]. * nis/nis_removemember.c (nis_removemember): Free all memory in error cases [Coverity CID 132]. * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): Always free lookup result [Coverity CID 134]. * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r): Always free lookup result [Coverity CID 135]. * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r): Always free lookup result [Coverity CID 136]. * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r): Before retrying, free old result [Coverity CID 137]. * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user): Free res in case UID is zero [Coverity CID 138]. * nis/ypclnt.c (yp_update): Always free master string [Coverity CID 140]. * nis/nis_creategroup.c (nis_creategroup): Free all memory in error cases [Coverity CID 143, 142, 141]. * nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result if yp_match call succeeded [Coverity CID 155]. * nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string allocated in yp_match at all times [Coverity CID 157, 156]. * nscd/nscd.c (write_pid): Close stream also if writing failed [Coverity CID 165]. * nis/nis_table.c (nis_add_entry): Move test for NULL parameter ahead of first use [Coverity CID 167]. * nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test for NULL parameter ahead of first use [Coverity CID 168]. * intl/finddomain.c (_nl_find_domain): We never return NULL if we found the locale [Coverity CID 169]. * inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set herrno [Coverity CID 178]. * nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned freed object [Coverity CID 182].
2006-04-04[BZ #2508]Roland McGrath
* nscd/Makefile ($(objpfx)nscd_stat.o: sysincludes): Move setting inside [$(have-selinux) = yes]. ($(objpfx)selinux.o: sysincludes): Likewise.
2006-04-02[BZ #2501]Ulrich Drepper
* nscd/nscd_helper.c (get_mapping): Rewrite code to send request so it uses send and not writev.
2006-04-01[BZ #2498]Ulrich Drepper
2006-04-01 Ulrich Drepper <drepper@redhat.com> [BZ #2498] * nscd/connections.c (main_loop_poll): If the connection cannot be accepted because of user-imposed limits close the descriptor.
2006-03-01* nscd/nscd_helper.c: Include <time.h> for `time' declaration.Roland McGrath
2006-02-22* nscd/selinux.c (audit_init): Print error string in the failureRoland McGrath
message.
2006-01-06[BZ #2114]Ulrich Drepper
* ncsd/aicache.c: Don't use sendfile for records on the stack. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/pwdcache.c: Likewise. Patch by dmueller@suse.com.
2006-01-03(nscd_init): Remove if block which should have been removed as part of the ↵Ulrich Drepper
-S option removal.
2006-01-01Update copyright year.Ulrich Drepper
2005-12-30Remove last remnants of -S option support.Ulrich Drepper
2005-12-29* nscd/selinux.c (log_callback): Use audit_log_user_avc_message.Ulrich Drepper
Don't do anything if audit_fd is invalid. (audit_init): Don't complain if kernel support is missing. Patch by Steve Grubb <sgrubb@redhat.com>.
2005-12-16* nscd/Makefile: Don't build nscd_nischeck.Ulrich Drepper
* nscd/nscd_nischeck.c: Removed.
2005-12-14Moved to csu/errno-loc.c.Ulrich Drepper
2005-12-07* catgets/gencat.c: Use GPL, not LGPL.Ulrich Drepper
* elf/cache.c: Likewise. * elf/chroot_canon.c: Likewise. * elf/ldconfig.c: Likewise. * elf/readlib.c: Likewise. * iconv/dummy-repertoire.c: Likewise. * iconv/iconv_charmap.c: Likewise. * iconv/iconv_prog.c: Likewise. * iconv/iconvconfig.c: Likewise. * locale/programs/3level.h: Likewise. * locale/programs/charmap-dir.c: Likewise. * locale/programs/charmap-dir.h: Likewise. * locale/programs/charmap-kw.gperf: Likewise. * locale/programs/charmap.c: Likewise. * locale/programs/charmap.h: Likewise. * locale/programs/config.h: Likewise. * locale/programs/ld-address.c: Likewise. * locale/programs/ld-collate.c: Likewise. * locale/programs/ld-ctype.c: Likewise. * locale/programs/ld-identification.c: Likewise. * locale/programs/ld-measurement.c: Likewise. * locale/programs/ld-messages.c: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-name.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/ld-paper.c: Likewise. * locale/programs/ld-telephone.c: Likewise. * locale/programs/ld-time.c: Likewise. * locale/programs/linereader.c: Likewise. * locale/programs/linereader.h: Likewise. * locale/programs/locale-spec.c: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * locale/programs/localedef.h: Likewise. * locale/programs/locarchive.c: Likewise. * locale/programs/locfile-kw.gperf: Likewise. * locale/programs/locfile-token.h: Likewise. * locale/programs/locfile.c: Likewise. * locale/programs/locfile.h: Likewise. * locale/programs/repertoire.c: Likewise. * locale/programs/repertoire.h: Likewise. * locale/programs/simple-hash.c: Likewise. * locale/programs/simple-hash.h: Likewise. * locale/programs/xmalloc.c: Likewise. * locale/programs/xstrdup.c: Likewise. * malloc/memusagestat.c: Likewise. * nscd/aicache.c: Likewise. * nscd/cache.c: Likewise. * nscd/connections.c: Likewise. * nscd/dbg_log.c: Likewise. * nscd/gai.c: Likewise. * nscd/getgrgid_r.c: Likewise. * nscd/getgrnam_r.c: Likewise. * nscd/gethstbyad_r.c: Likewise. * nscd/gethstbynm2_r.c: Likewise. * nscd/getpwnam_r.c: Likewise. * nscd/getpwuid_r.c: Likewise. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/mem.c: Likewise. * nscd/nscd.c: Likewise. * nscd/nscd_conf.c: Likewise. * nscd/pwdcache.c: Likewise. * posix/getconf.c: Likewise. * sysdeps/generic/nscd_setup_thread.c: Likewise. * sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise.
2005-11-22* nscd/connections.c (sendfileall): Define.Ulrich Drepper
(handle_request): Use it instead of sendfile call. * nscd/nscd-client.h: Declare sendfileall. * nscd/aicache.c: Use sendfileall instead of sendfile. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/pwdcache.c: Likewise.
2005-11-21Pretty printing.Ulrich Drepper
2005-11-19* sysdeps/unix/sysv/linux/ia64/bits/shm.h (shmatt_t): New type.cvs/fedora-glibc-20051119T1959Ulrich Drepper
(struct shmid_ds): Use it for shm_nattch field. 2005-11-18 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If FILE is NULL, set access and modification times of the file referenced by FD. * sysdeps/generic/futimesat.c (futimesat): Don't return EINVAL if FILE is NULL. Don't check FD if FILE is absolute path. 2005-11-19 Ulrich Drepper <drepper@redhat.com> * nscd/nscd_gethst_r.c (nscd_gethst_r): Avoid unnecesary read call if there are no aliases. * sysdeps/unix/sysv/linux/Makefile (CFLAGS-connections.c, CFLAGS-pwdcache.c, CFLAGS-grpcache.c, CFLAGS-hstcache.c, CFLAGS-aicache.c, CFLAGS-initgrcache.c): Add -DHAVE_SENDFILE. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SENDFILE): Define. * nscd/pwdcache.c [HAVE_SENDFILE]: Include <sys/sendfile.h> and <kernel-features.h>. [HAVE_SENDFILE] (cache_addpw): Use sendfile to transmit positive result. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/aicache.c: Likewise. * nscd/initgrcache.c: Likewise. * nscd/connectionc.c: Likewise.
2005-11-19(nscd_gethst_r): Avoid unnecesary read call if there are no aliases.Ulrich Drepper
2005-11-182005-11-18 Paul Brook <paul@codesourcery.com>Roland McGrath
* nscd/grpcache.c: Include <sys/socket.h>. * nscd/nscd_stat.c: Likewise. * nscd/pwdcache.c: Likewise. * sysdeps/unix/sysv/linux/unlinkat.c: Include <stdlib.h>, <sysdep.h>.
2005-11-12[BZ #1294]Ulrich Drepper
2005-11-11 Ulrich Drepper <drepper@redhat.com> [BZ #1294] * locales/pt_BR: Set p_cs_precedes and n_cs_precedes to 1.
2005-09-22(nscd_getpw_r): Remove incorrectly C&Ped free call in code handling ↵Ulrich Drepper
detection of GC runs.
2005-09-20* nscd/dbg_log.c (init_logfile): Use fopen64 rather than fopen.Roland McGrath
2005-08-24* nscd/nscd.c (main): Use error while process isn't running in thecvs/fedora-glibc-20050829T1854cvs/fedora-glibc-20050824T0705Ulrich Drepper
background, not dbg_log. * nscd/nscd_conf.c (nscd_parse_file): Likewise. Mark messages with _(). Unify testing for database name. * sysdeps/unix/sysv/linux/Versions: Export inotify_* syscalls.
2005-08-23* nscd/connection.c (DEFAULT_DATASIZE_PER_BUCKET): Move to nscd.h.Ulrich Drepper
(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.
2005-08-16* nscd/cache.c (prune_cache): Add more debug output. Only forUlrich Drepper
debug level 3 and higher and very verbose.
2005-08-16* nscd/cache.c (prune_cache): Use stat64 not stat.Ulrich Drepper
* nscd/connections.c (nscd_init): Likewise.
2005-08-09* nscd/connections.c (main_loop_epoll): Pass NULL as eventUlrich Drepper
argument for epoll_ctl(EPOLL_CTL_DEL) calls.
2005-08-09* nscd/nscd_stat.c (receive_print_stats): Really print values ofUlrich Drepper
thread number, paranoia, and restart interval the server is using.
2005-08-08(cache_add): Comment hash table and header to disk.Ulrich Drepper
2005-08-08* nscd/mem.c (mempool_alloc): Use posix_fallocate instead of ftruncate.Ulrich Drepper
* nscd/connections.c (nscd_init): Likewise.
2005-08-08* posix/bits/unistd.h (confstr, getgroups, ttyname_r, gethostname,Ulrich Drepper
getdomainname): Add __NTH. * stdlib/bits/stdlib.h (ptsname_r, wctomb, mbstowcs, wcstombs): Likewise. (realpath): Likewise. Use __const instead of const. Add __restrict keywords. * socket/bits/socket2.h (recvfrom): Add __restrict keyword to __buf. * wcsmbs/bits/wchar2.h (wmemcpy, wmemmove, wmempcpy, wmemset, wcscpy, wcpcpy, wcsncpy, wcpncpy, wcscat, wcsncat, vswprintf, wcrtomb, mbsrtowcs, wcsrtombs, mbsnrtowcs, wcsnrtombs): Add __NTH. * string/bits/string3.h (__memset_ichk): Likewise. (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, __strcpy_ichk, __stpcpy_ichk, __strncpy_ichk, stpncpy, __strcat_ichk, __strncat_ichk): Likewise. Use __const instead of const. (__stpncpy_chk): Use __const instead of const. (__stpncpy_alias): Use __REDIRECT_NTH instead of __REDIRECT. 2005-08-08 Ulrich Drepper <drepper@redhat.com> Jakub Jelinek <jakub@redhat.com> * nscd/mem.c (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): Move definitions to... * nscd/nscd.h (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): ...here. * nscd/connections.c (usekey): New enum. (check_use, verify_persistent_db): New functions. (nscd_init): If persistent database is corrupted, unlink it and recreate rather than falling back to non-persistent database. Call verify_persistent_db. Avoid overflows in total computation. 2005-08-08 Ulrich Drepper <drepper@redhat.com> * iconvdata/utf-16.c (PREPARE_LOOP): Minor cleanups to make code better readable. Avoid passing var to loop function, it's not necessary at all.
2005-07-22* nscd/Makefile ($(objpfx)nscd): Pass $(nscd-cflags) to $(LINK.o).Roland McGrath
2005-07-19* configure.in: Check for -fstack-protector gcc option.Ulrich Drepper
* config.make.in (have-ssp): Add template. * nscd/Makefile (nscd-cflags): Add -fstack-protector if supported. * nscd/nscd.c (main): Don't ignore result of chdir call.
2005-07-19(main): Don't ignore result of chdir call.Ulrich Drepper
2005-07-18* nscd/Makefile (nscd-cflags): Add _FORTIFY_SOURCE.Ulrich Drepper
* nscd/connections.c: Fix a few wur warnings.
2005-07-18* nscd/grpcache.c (cache_addgr): Use correct maximum for group IDUlrich Drepper
length. Patch by Ivan Gyurdiev <ivg2@cornell.edu>. * debug/confstr_chk.c: New file. * debug/getdomainname_chk.c: New file. * debug/getgroups_chk.c: New file. * debug/gethostname_chk.c: New file. * debug/getlogin_r_chk.c: New file. * debug/ttyname_r_chk.c: New file. * posix/bits/unistd.h: Add definitions for new debug versions. * debug/tst-chk1.c: Add tests for new functions. * debug/Versions: Export new functions. * debug/Makefile (routines): Add new files. * stdlib/bits/stdlib.h: Fix typo. * manual/Makefile (libc/index.html): Depend on dir-add.texi.
2005-07-14* nscd/nscd_helper.c: Add a few __builtin_expect.Ulrich Drepper
2005-07-14* nscd/connections.c (send_ro_fd): Make sure BUF is aligned correctly.Ulrich Drepper
2005-07-13* nscd/nscd_helper.c (wait_on_socket): New function.Ulrich Drepper
(get_mapping): Use wait_on_socket instead of poll. The former handles EINTR of poll correctly. (__nscd_open_socket): Likewise. (get_mapping): Make sure BUF is aligned correctly. (get_mapping): Use munmap on correct pointer.
2005-06-26* nscd/nscd_stat.c (receive_print_stats): Replace YESSTR/NOSTRUlrich Drepper
with own translation. * sunrpc/xdr.c (xdr_hyper, xdr_u_hyper): When decoding, cast t2 to uint32_t instead of ulong. * sunrpc/Makefile (tests): Add tst-xdrmem. * sunrpc/tst-xdrmem.c: New test.
2005-06-20* nscd/nscd.init: Get more in line with lsb3.cvs/fedora-glibc-20050620T1530cvs/fedora-glibc-20050620T1522Ulrich Drepper
* nscd/nscd.c: Adjust some error codes to fit in better with lsb3. * nscd/connections.c: Likewise.
2005-06-14* configure.in: Add test for availability of libaudit.Ulrich Drepper
* config.h.in: Define HAVE_LIBAUDIT. * config.make.in: Define have-libaudit. * nscd/Makefile: If libaudit is available, link nscd with it. * nscd/selinux.c: If HAVE_LIBAUDIT is defined, log using libaudit. Patch by Steve Grubb <sgrubb@redhat.com>.
2005-04-29Help losers who use --with-headers.Ulrich Drepper
2005-04-28* nscd/connections.c (nscd_run): Use time() value in prune_cachecvs/fedora-glibc-20050428T0846Ulrich Drepper
call, not timeout value, since the latter might be from another clock.
2005-04-15[BZ #253]cvs/fedora-glibc-20050415T0909Roland McGrath
2005-04-14 Roland McGrath <roland@redhat.com> * MakeTAGS ($P/$(domain).pot): Depend on distinfo file as well. (extract): Filter-out distinfo file name. [BZ #253] * MakeTAGS (text-srcs): Match %.bash.in files too. [BZ #253] * nscd/Makefile (all-nscd-modules): New variable, include selinux module regardless of configuration. (distribute): Use that instead of $(nscd-modules).
2005-03-17* nscd/aicache.c (addhstaiX): Tweak type to avoid warning.Roland McGrath
2005-02-22* nscd/nscd-client.h: Include sys/uio.h.Ulrich Drepper
(__readall, __readvall, writeall): New prototypes. * nscd/connections.c (writeall): New function. (handle_request): Use it. * nscd/aicache.c (addhstaiX): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/grpcache.c (cache_addgr): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. * nscd/nscd_helper.c (__readall, __readvall): New functions. * nscd/nscd_getai.c (__nscd_getai): Use them. * nscd/nscd_getpw_r.c (__nscd_getpw_r): Likewise. * nscd/nscd_getgr_r.c (__nscd_getgr_r): Likewise. * nscd/nscd_gethst_r.c (__nscd_gethst_r): Likewise. * nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise.
2005-02-22Include sys/uio.h. (__readall, __readvall, writeall): New prototypes.Ulrich Drepper
2005-02-21* nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop toUlrich Drepper
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.