summaryrefslogtreecommitdiff
path: root/nscd
AgeCommit message (Collapse)Author
2015-01-23Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
Conflicts: hurd/hurdsocket.h sysdeps/mach/hurd/errno-loc.c
2014-01-27Avoid undefined behaviour in netgroupcacheSiddhesh Poyarekar
Using a buffer after it has been reallocated is undefined behaviour, so get offsets of the triplets in the old buffer before reallocating it.
2014-01-24Adjust pointers to triplets in netgroup query data (BZ #16474)Siddhesh Poyarekar
The _nss_*_getnetgrent_r query populates the netgroup results in the allocated buffer and then sets the result triplet to point to strings in the buffer. This is a problem when the buffer is reallocated since the pointers to the triplet strings are no longer valid. The pointers need to be adjusted so that they now point to strings in the reallocated buffer.
2014-01-16Don't use alloca in addgetnetgrentX (BZ #16453)Siddhesh Poyarekar
addgetnetgrentX has a buffer which is grown as per the needs of the requested size either by using alloca or by falling back to malloc if the size is larger than 1K. There are two problems with the alloca bits: firstly, it doesn't really extend the buffer since it does not use the return value of the extend_alloca macro, which is the location of the reallocated buffer. Due to this the buffer does not actually extend itself and hence a subsequent write may overwrite stuff on the stack. The second problem is more subtle - the buffer growth on the stack is discontinuous due to block scope local variables. Combine that with the fact that unlike realloc, extend_alloca does not copy over old content and you have a situation where the buffer just has garbage in the space where it should have had data. This could have been fixed by adding code to copy over old data whenever we call extend_alloca, but it seems unnecessarily complicated. This code is not exactly a performance hotspot (it's called when there is a cache miss, so factors like network lookup or file reads will dominate over memory allocation/reallocation), so this premature optimization is unnecessary. Thanks Brad Hubbard <bhubbard@redhat.com> for his help with debugging the problem.
2014-01-04nscd: list all tables in usage()Sami Kerola
Usage output for option --invalidate=TABLE is not helpful without list of tables. The list is also missing from nscd(8) manual which made it pretty difficult to know what are the tables.
2014-01-02Fix return code from getent netgroup when the netgroup is not found (bz #16366)Siddhesh Poyarekar
nscd incorrectly returns a success even when the netgroup in question is not found and adds a positive result in the cache. this patch fixes this behaviour by adding a negative lookup entry to cache and returning an error when the netgroup is not found.
2014-01-02Fix infinite loop in nscd when netgroup is empty (bz #16365)Siddhesh Poyarekar
Currently, when a user looks up a netgroup that does not have any members, nscd goes into an infinite loop trying to find members in the group. This is because it does not handle cases when getnetgrent returns an NSS_STATUS_NOTFOUND (which is what it does on empty group). Fixed to handle this in the same way as NSS_STATUS_RETURN, similar to what getgrent does by itself.
2014-01-01Update remaining copyright datesAllan McRae
Update copyright years that are not handled by scripts/update-copyright.
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-12-20Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
2013-12-16Add systemd unit file for nscdAllan McRae
Provide an example systemd unit and tmpfile for running nscd.
2013-11-11Fix off-by-one in nscd getservbyport callAndreas Schwab
2013-10-30rename configure.in to configure.acMike Frysinger
Autoconf has been deprecating configure.in for quite a long time. Rename all our configure.in and preconfigure.in files to .ac. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-30Properly cache the result from looking up the nss database configAndreas Schwab
2013-09-09Fix nesting of ifdefs in netgroupcache.cAllan McRae
Fixes unclosed '{' if HAVE_SENDFILE is defined (BZ #15895).
2013-09-01Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
Conflicts: sysdeps/mach/hurd/i386/init-first.c sysdeps/unix/sysv/linux/ldsodefs.h
2013-08-28Use __glibc_unlikely instead of __builtin_expect (..., 0)Siddhesh Poyarekar
2013-08-26Initialize res_hconf in nscdSiddhesh Poyarekar
Fixes BZ #15890.
2013-08-26Fix indentation in aicache.cSiddhesh Poyarekar
2013-06-24Fix typo in commentSiddhesh Poyarekar
2013-06-11Fix handling of netgroup cache in nscdAndreas Schwab
2013-05-26Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
Conflicts: sysdeps/mach/hurd/i386/init-first.c
2013-05-23Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
2013-05-20Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
Conflicts: configure configure.in hurd/ctty-input.c hurd/ctty-output.c hurd/hurd/signal.h hurd/hurdexec.c hurd/hurdmsg.c hurd/hurdsig.c hurd/hurdsocket.h socket/recvmmsg.c socket/sendmmsg.c sysdeps/mach/hurd/i386/sigreturn.c sysdeps/mach/hurd/i386/trampoline.c sysdeps/mach/hurd/pipe.c sysdeps/mach/hurd/recvmsg.c sysdeps/mach/hurd/sendmsg.c sysdeps/mach/hurd/sigaction.c sysdeps/mach/hurd/sigpending.c sysdeps/mach/hurd/sigprocmask.c sysdeps/mach/hurd/sigsuspend.c sysdeps/mach/hurd/sigwait.c sysdeps/mach/hurd/socketpair.c sysdeps/mach/hurd/tls.h sysdeps/unix/sysv/linux/recvmmsg.c sysdeps/unix/sysv/linux/sendmmsg.c
2013-05-16Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold
2013-04-15Properly check for short writes when sending the response in nscdAndreas Schwab
2013-04-15nscd: don't fork twiceAndreas Schwab
2013-02-18unify xmalloc prototypes & friendsMike Frysinger
These prototypes are duplicated in many places. Add a dedicated header for holding prototypes for program-specific functions to avoid that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-08Refactor code out of nscd's two main poll loops.Carlos O'Donell
We refactor the inotify file checking code and the database clearing code out of the main_loop_poll and mail_loop_epoll functions. We document some the related functions with appropriate comments.
2013-02-07Remove lots of inline keywords.Roland McGrath
2013-01-10Revert "Properly check for short writes when sending the response in nscd"Andreas Schwab
This reverts commit dd31ac7a8e0d4cc24eee6815f9101caa5aa64291.
2013-01-10Revert "* nscd/nscd.h: Move persistent storage back to /var/run/nscd"Andreas Schwab
This reverts commit 70d3e06ed0ffabb6ce974cc94b2cff1d67252193.
2013-01-10Revert "nscd: don't fork twice"Andreas Schwab
This reverts commit 7e9b080575fd68c788c33623594ba5516fa7ceb0.
2013-01-10nscd: don't fork twiceAndreas Schwab
2013-01-10* nscd/nscd.h: Move persistent storage back to /var/run/nscdThorsten Kukuk
2013-01-10Properly check for short writes when sending the response in nscdAndreas Schwab
* nscd/grpcache.c (cache_addgr): Properly check for short write. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. * nscd/servicescache.c (cache_addserv): Likewise. Don't write more than recsize.
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2013-01-01Update copyright years.David S. Miller
* catgets/gencat.c: Update copyright year. * csu/version.c: Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c: Likewise. * debug/xtrace.sh: Likewise. * elf/ldconfig.c: Likewise. * elf/ldd.bash.in: Likewise. * elf/pldd.c: Likewise. * elf/sotruss.ksh: Likewise. * elf/sprof.c: Likewise. * iconv/iconv_prog.c: Likewise. * iconv/iconvconfig.c: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * login/programs/pt_chown.c: Likewise. * malloc/memusage.sh: Likewise. * malloc/memusagestat.c: Likewise. * malloc/mtrace.pl: Likewise. * nscd/nscd.c: Likewise. * nss/getent.c: Likewise. * nss/makedb.c: Likewise. * posix/getconf.c: Likewise.
2012-11-29 [BZ #13761]Jeff Law
* nscd/grpcache.c (cache_addgr): Rename alloca_used to dataset_temporary. Track alloca usage into alloca_used. If dataset is large allocate and release it via malloc/free.
2012-11-09Support --with-pkgversion and --with-bugurl.Joseph Myers
2012-11-01Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
2012-10-24BZ#14743: Move clock_* symbols from librt to libc.Roland McGrath
2012-10-02nscd: fix compilation flagsDmitry V. Levin
Commit 61653dfb81b776bb72ce4304175b861d77c357a8 added support for compilers predefining _FORTIFY_SOURCE by adding -U_FORTIFY_SOURCE to CPPFLAGS for these compilers, but that change doesn't work quite well in case of nscd: its Makefile sets _FORTIFY_SOURCE using CFLAGS instead of CPPFLAGS and, thanks to compilation rules defined in Makerules, CPPFLAGS are passed to compiler after CFLAGS, resulting to a build with _FORTIFY_SOURCE turned off. This change implements a more safe method of passing preprocessor and compiler flags so that no nscd modules could be accidentally forgotten.
2012-08-22Fix shadow, gshadow, networks, protocols, rpc, aliases, and nscd routines ↵Roland McGrath
for USE_NSCD case.
2012-08-22Add --disable-build-nscd configure option.Roland McGrath
2012-08-22BZ#13696: Add --disable-nscd configure option.Roland McGrath
2012-07-30Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
2012-07-25Remove pre-2.4.21 Linux kernel support.Joseph Myers
2012-07-22Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
Conflicts: configure configure.in elf/rtld.c misc/syslog.c sysdeps/gnu/configure sysdeps/gnu/configure.in sysdeps/mach/hurd/accept4.c sysdeps/mach/hurd/bits/posix_opt.h sysdeps/mach/hurd/dup3.c sysdeps/mach/hurd/i386/init-first.c sysdeps/mach/hurd/kernel-features.h sysdeps/mach/hurd/readlinkat.c
2012-06-20Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_WhittakerThomas Schwinge
Conflicts: configure configure.in hurd/Makefile nptl/sysdeps/pthread/bits/libc-lock.h sysdeps/i386/configure sysdeps/powerpc/powerpc32/configure sysdeps/powerpc/powerpc64/configure sysdeps/unix/sysv/linux/configure sysdeps/unix/sysv/linux/configure.in