about summary refs log tree commit diff
path: root/nscd/initgrcache.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* Remove 'grp' and merge into 'nss' and 'posix'Arjun Shankar2023-10-241-1/+1
| | | | | | | | | | | | | | The majority of grp routines are entry points for nss functionality. This commit removes the 'grp' subdirectory and moves all nss-relevant functionality and all tests to 'nss', and the 'setgroups' stub into 'posix' (alongside the 'getgroups' stub). References to grp/ are accordingly changed. In addition, compat-initgroups.c, a fallback implementation of initgroups is renamed to initgroups-fallback.c so that the build system does not confuse it for nss_compat/compat-initgroups.c. Build time improves very slightly; e.g. down from an average of 45.5s to 44.5s on an 8-thread mobile x86_64 CPU. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Fix all the remaining misspellings -- BZ 25337Paul Pluzhnikov2023-06-021-1/+1
|
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Remove "Contributed by" linesSiddhesh Poyarekar2021-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We stopped adding "Contributed by" or similar lines in sources in 2012 in favour of git logs and keeping the Contributors section of the glibc manual up to date. Removing these lines makes the license header a bit more consistent across files and also removes the possibility of error in attribution when license blocks or files are copied across since the contributed-by lines don't actually reflect reality in those cases. Move all "Contributed by" and similar lines (Written by, Test by, etc.) into a new file CONTRIBUTED-BY to retain record of these contributions. These contributors are also mentioned in manual/contrib.texi, so we just maintain this additional record as a courtesy to the earlier developers. The following scripts were used to filter a list of files to edit in place and to clean up the CONTRIBUTED-BY file respectively. These were not added to the glibc sources because they're not expected to be of any use in future given that this is a one time task: https://gist.github.com/siddhesh/b5ecac94eabfd72ed2916d6d8157e7dc https://gist.github.com/siddhesh/15ea1f5e435ace9774f485030695ee02 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nss: fix nss_database_lookup2's alternate handling [BZ #27416]DJ Delorie2021-03-091-2/+1
| | | | | | | | | | | | | | | | | | | | __nss_database_lookup2's extra arguments were left unused in the nsswitch reloading patch set; this broke compat (default config ignored) and shadow files (secondary name ignored) which relies on these fallbacks. This patch adds in the previous behavior by correcting the initialization of the database list to reflect the fallbacks. This means that the nss_database_lookup2 interface no longer needs to be passed the fallback info, so API and callers were adjusted. Since all callers needed to be edited anyway, the calls were changed from __nss_database_lookup2 to the faster __nss_database_get. This was an intended optimization which was deferred during the initial lookup changes to avoid touching so many files. The test case verifies that compat targets work (passwd) and that the default configuration works (group). Tested on x86-64.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* nsswitch: use new internal API (callers)DJ Delorie2020-12-041-4/+4
| | | | | | Stitch new ABI and types throughout all NSS callers. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Remove --enable-obsolete-nsl configure flagPetr Vorel2020-07-081-7/+1
| | | | | | | | | | | | | | | | | | | this means that *always* libnsl is only built as shared library for backward compatibility and the NSS modules libnss_nis and libnss_nisplus are not built at all, libnsl's headers aren't installed. This compatibility is kept only for architectures and ABIs that have been added in or before version 2.28. Replacement implementations based on TIRPC, which additionally support IPv6, are available from <https://github.com/thkukuk/>. This change does not affect libnss_compat which does not depended on libnsl since 2.27 and thus can be used without NIS. libnsl code depends on Sun RPC, e.g. on --enable-obsolete-rpc (installed libnsl headers use installed Sun RPC headers), which will be removed in the following commit.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* nss: Turn __nss_database_lookup into a compatibility symbolFlorian Weimer2019-05-151-2/+2
| | | | | | | | | | | | | The function uses the internal service_user type, so it is not really usable from the outside of glibc. Rename the function to __nss_database_lookup2 for internal use, and change __nss_database_lookup to always indicate failure to the caller. __nss_next already was a compatibility symbol. The new implementation always fails and no longer calls __nss_next2. unscd, the alternative nscd implementation, does not use __nss_database_lookup, so it is not affected by this change.
* Break some lines before not after operators.Joseph Myers2019-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GNU Coding Standards specify that line breaks in expressions should go before an operator, not after one. This patch fixes various code to do this. It only changes code that appears to be mostly following GNU style anyway, not files and directories with substantially different formatting. It is not exhaustive even for files using GNU style (for example, changes to sysdeps files are deferred for subsequent cleanups). Some files changed are shared with gnulib, but most are specific to glibc. Changes were made manually, with places to change found by grep (so some cases, e.g. where the operator was followed by a comment at end of line, are particularly liable to have been missed by grep, but I did include cases where the operator was followed by backslash-newline). This patch generally does not attempt to address other coding style issues in the expressions changed (for example, missing spaces before '(', or lack of parentheses to ensure indentation of continuation lines properly reflects operator precedence). Tested for x86_64, and with build-many-glibcs.py. * benchtests/bench-memmem.c (simple_memmem): Break lines before rather than after operators. * benchtests/bench-skeleton.c (TIMESPEC_AFTER): Likewise. * crypt/md5.c (md5_finish_ctx): Likewise. * crypt/sha256.c (__sha256_finish_ctx): Likewise. * crypt/sha512.c (__sha512_finish_ctx): Likewise. * elf/cache.c (load_aux_cache): Likewise. * elf/dl-load.c (open_verify): Likewise. * elf/get-dynamic-info.h (elf_get_dynamic_info): Likewise. * elf/readelflib.c (process_elf_file): Likewise. * elf/rtld.c (dl_main): Likewise. * elf/sprof.c (generate_call_graph): Likewise. * hurd/ctty-input.c (_hurd_ctty_input): Likewise. * hurd/ctty-output.c (_hurd_ctty_output): Likewise. * hurd/dtable.c (reauth_dtable): Likewise. * hurd/getdport.c (__getdport): Likewise. * hurd/hurd/signal.h (_hurd_interrupted_rpc_timeout): Likewise. * hurd/hurd/sigpreempt.h (HURD_PREEMPT_SIGNAL_P): Likewise. * hurd/hurdfault.c (_hurdsig_fault_catch_exception_raise): Likewise. * hurd/hurdioctl.c (fioctl): Likewise. * hurd/hurdselect.c (_hurd_select): Likewise. * hurd/hurdsig.c (_hurdsig_abort_rpcs): Likewise. (STOPSIGS): Likewise. * hurd/hurdstartup.c (_hurd_startup): Likewise. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Likewise. * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise. * hurd/msgportdemux.c (msgport_server): Likewise. * hurd/setauth.c (_hurd_setauth): Likewise. * include/features.h (__GLIBC_USE_DEPRECATED_SCANF): Likewise. * libio/libioP.h [IO_DEBUG] (CHECK_FILE): Likewise. * locale/programs/ld-ctype.c (set_class_defaults): Likewise. * localedata/tests-mbwc/tst_swscanf.c (tst_swscanf): Likewise. * login/tst-utmp.c (do_check): Likewise. (simulate_login): Likewise. * mach/lowlevellock.h (lll_lock): Likewise. (lll_trylock): Likewise. * math/test-fenv.c (ALL_EXC): Likewise. * math/test-fenvinline.c (ALL_EXC): Likewise. * misc/sys/cdefs.h (__attribute_deprecated_msg__): Likewise. * nis/nis_call.c (__do_niscall3): Likewise. * nis/nis_callback.c (cb_prog_1): Likewise. * nis/nis_defaults.c (searchaccess): Likewise. * nis/nis_findserv.c (__nis_findfastest_with_timeout): Likewise. * nis/nis_ismember.c (internal_ismember): Likewise. * nis/nis_local_names.c (nis_local_principal): Likewise. * nis/nss_nis/nis-rpc.c (_nss_nis_getrpcbyname_r): Likewise. * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_getnetgrent_r): Likewise. * nis/ypclnt.c (yp_match): Likewise. (yp_first): Likewise. (yp_next): Likewise. (yp_master): Likewise. (yp_order): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nss/nss_compat/compat-pwd.c (copy_pwd_changes): Likewise. (internal_getpwuid_r): Likewise. * nss/nss_compat/compat-spwd.c (copy_spwd_changes): Likewise. * posix/glob.h (__GLOB_FLAGS): Likewise. * posix/regcomp.c (peek_token): Likewise. (peek_token_bracket): Likewise. (parse_expression): Likewise. * posix/regexec.c (sift_states_iter_mb): Likewise. (check_node_accept_bytes): Likewise. * posix/tst-spawn3.c (do_test): Likewise. * posix/wordexp-test.c (testit): Likewise. * posix/wordexp.c (parse_tilde): Likewise. (exec_comm): Likewise. * posix/wordexp.h (__WRDE_FLAGS): Likewise. * resource/vtimes.c (TIMEVAL_TO_VTIMES): Likewise. * setjmp/sigjmp.c (__sigjmp_save): Likewise. * stdio-common/printf_fp.c (__printf_fp_l): Likewise. * stdio-common/tst-fileno.c (do_test): Likewise. * stdio-common/vfprintf-internal.c (vfprintf): Likewise. * stdlib/strfmon_l.c (__vstrfmon_l_internal): Likewise. * stdlib/strtod_l.c (round_and_return): Likewise. (____STRTOF_INTERNAL): Likewise. * stdlib/tst-strfrom.h (TEST_STRFROM): Likewise. * string/strcspn.c (STRCSPN): Likewise. * string/test-memmem.c (simple_memmem): Likewise. * termios/tcsetattr.c (tcsetattr): Likewise. * time/alt_digit.c (_nl_parse_alt_digit): Likewise. * time/asctime.c (asctime_internal): Likewise. * time/strptime_l.c (__strptime_internal): Likewise. * time/sys/time.h (timercmp): Likewise. * time/tzfile.c (__tzfile_compute): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* [BZ #20271] Add newlines in __libc_fatal calls.Paul Pluzhnikov2018-08-311-1/+1
|
* Fix concurrent changes on nscd aware files (BZ #23178)Adhemerval Zanella2018-05-161-34/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As indicated by BZ#23178, concurrent access on some files read by nscd may result non expected data send through service requisition. This is due 'sendfile' Linux implementation where for sockets with zero-copy support, callers must ensure the transferred portions of the the file reffered by input file descriptor remain unmodified until the reader on the other end of socket has consumed the transferred data. I could not find any explicit documentation stating this behaviour on Linux kernel documentation. However man-pages sendfile entry [1] states in NOTES the aforementioned remark. It was initially pushed on man-pages with an explicit testcase [2] that shows changing the file used in 'sendfile' call prior the socket input data consumption results in previous data being lost. From commit message it stated on tested Linux version (3.15) only TCP socket showed this issues, however on recent kernels (4.4) I noticed the same behaviour for local sockets as well. Since sendfile on HURD is a read/write operation and the underlying issue on Linux, the straightforward fix is just remove sendfile use altogether. I am really skeptical it is hitting some hotstop (there are indication over internet that sendfile is helpfull only for large files, more than 10kb) here to justify that extra code complexity or to pursuit other possible fix (through memory or file locks for instance, which I am not sure it is doable). Checked on x86_64-linux-gnu. [BZ #23178] * nscd/nscd-client.h (sendfileall): Remove prototype. * nscd/connections.c [HAVE_SENDFILE] (sendfileall): Remove function. (handle_request): Use writeall instead of sendfileall. * nscd/aicache.c (addhstaiX): Likewise. * nscd/grpcache.c (cache_addgr): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/netgroupcache.c (addgetnetgrentX, addinnetgrX): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. * nscd/servicescache.c (cache_addserv): Likewise. * sysdeps/unix/sysv/linux/Makefile [$(subdir) == nscd] (sysdep-CFLAGS): Remove -DHAVE_SENDFILE. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SENDFILE): Remove define. [1] http://man7.org/linux/man-pages/man2/sendfile.2.html [2] https://github.com/mkerrisk/man-pages/commit/7b6a3299776b5c1c4f169a591434a855d50c68b4#diff-efd6af3a70f0f07c578e85b51e83b3c3
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Remove compat from DEFAULT_CONFIG lookup stringsSteve Ellcey2017-09-121-2/+7
| | | | | | | | | | | | | | | * grp/initgroups.c: Include config.h. (DEFAULT_CONFIG): New macro. (internal_getgrouplist): Use DEFAULT_CONFIG. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nss/nsswitch.c (__nss_disable_nscd): Likewise. (DEFAULT_DEFCONFIG): New macro. (__nss_database_lookup): Use DEFAULT_DEFCONFIG. * nss/grp-lookup.c: Include config.h (DEFAULT_CONFIG): Set definition based on LINK_OBSOLETE_NSL. * nss/pwd-lookup.c (DEFAULT_CONFIG): Likewise. * nss/spwd-lookup.c (DEFAULT_CONFIG): Likewise. * manual/nss.texi: Update default values section.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* grp: Rewrite to use struct scratch_buffer instead of extend_allocaFlorian Weimer2015-04-081-0/+1
| | | | | grp/compat-initgroups.c is included from nscd/initgrcache.c, which is why the #include directive has to be added there as well.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Consolidate code to initialize nscd dataset headerSiddhesh Poyarekar2014-04-301-16/+8
| | | | | | | | | | This patch consolidates the code to initialize the header of a dataset into a single set of functions (one for positive and another for negative datasets) primarily to reduce repetition of code. The secondary reason is to simplify Patch 2/2 which fixes the problem of an uninitialized byte in the header by initializing an unused field in the structure and hence preventing a possible data leak into the cache file.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-2/+2
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Properly cache the result from looking up the nss database configAndreas Schwab2013-09-301-8/+7
|
* Properly check for short writes when sending the response in nscdAndreas Schwab2013-04-151-14/+22
|
* Revert "Properly check for short writes when sending the response in nscd"Andreas Schwab2013-01-101-6/+1
| | | | This reverts commit dd31ac7a8e0d4cc24eee6815f9101caa5aa64291.
* Properly check for short writes when sending the response in nscdAndreas Schwab2013-01-101-1/+6
| | | | | | | | * 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.
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-2/+1
|
* Do not cache negative results in nscd if these are transientUlrich Drepper2012-01-201-3/+4
|
* nscd cleanupsUlrich Drepper2011-07-011-3/+4
| | | | | Cleanup and optimize last patch. Add timeout fixes also to the services cache.
* Handle nscd negtimeout==0Thorsten Kukuk2011-07-011-3/+7
|
* Schedule nscd cache pruning more accurately fromr re-added values.Ulrich Drepper2011-02-051-6/+13
|
* Fix a few asserts and IO calls in nscd.Anders Johansson2009-10-291-3/+3
| | | | | | | | The nscd/*cache.c files contain assert()s, writeall() and sendfileall() calls that invalidly use together &dataset->resp and total where either dataset or dataset->head.recsize should be used instead one of the components. In the writeall() and sendfileall() cases, it is unlikely to matter in practice, but the assertions can fail sometimes without a proper reason.
* Revert "Fix lock handling in memory hander of nscd."Ulrich Drepper2009-07-171-0/+4
| | | | | | | | This reverts commit 137028b4d7e50f71906c1656c27079eac5a1d085. Conflicts: ChangeLog
* Fix lock handling in memory hander of nscd.Petr Baudis2009-07-161-4/+0
| | | | | | | | | | The commit 20e498bd removes the pthread_mutex_rdlock() calls, but not the corresponding pthread_mutex_unlock() calls. Also, the database lock is never unlocked in one branch of the mempool_alloc() if. I think unreproducible random assert(dh->usable) crashes in prune_cache() were caused by this. But an easy way to make nscd threads hang with the broken locking was.
* [BZ #5381]Ulrich Drepper2009-02-131-21/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-13 Ulrich Drepper <drepper@redhat.com> [BZ #5381] * nscd/nscd.h: Remove definitions and declarations for mem_in_flight. Change mempool_alloc prototype. * nscd/mem.c (gc): Don't handle mem_in_flight. (mempool_alloc): Third parameter now only indicates whether this is the first call (to allocate data) or not. If it is, get db rdlock. Release it on error. Don't handle mem_in_flight. * nscd/aicache.c (addhstaiX): Mark he parameter as const. Adjust third parameter of mempool_alloc calls. Nothing to do here in case mempool_alloc fails. Avoid local variable shadowing parameter. No need to get db rdlock before calling cache_add. * nscd/cache.c (cache_add): Adjust call to mempool_alloc. There is no mem_in_flight array anymore. * nscd/connections.c: Remove definition and handling of mem_in_flight. * nscd/grpcache.c (cache_addgr): Adjust third parameter of mempool_alloc calls. Mark he parameter as const. Nothing to do here in case mempool_alloc fails. No need to get db rdlock before calling cache_add. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/servicescache.c (cache_addserv): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. Remove some debugging code.
* * nscd/grpcache.c (cache_addgr): Correctly compute size of cvs/fedora-glibc-20080612T1619Ulrich Drepper2008-06-121-1/+5
| | | | | | | fixed-size portion of the record. * nscd/servicescache.c (cache_addserv): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise.
* * nscd/cache.c (cache_add): Take additional parameter specifyingUlrich Drepper2008-05-181-2/+2
| | | | | | | | | | | | | | | | | | | 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.
* * nscd/cache.c (cache_add): Before returning with failure and thisUlrich Drepper2008-05-111-9/+4
| | | | | | | | | | | 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.
* [BZ #5209, BZ #5381]Ulrich Drepper2008-04-191-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Clear array before use.Ulrich Drepper2007-11-251-1/+3
| | | | | | | | * 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.
* * elf/ldconfig.c: Allow GPLv2 or any later version.Roland McGrath2007-07-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2006-03-04 Jakub Jelinek <jakub@redhat.com>Ulrich Drepper2006-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Roland McGrath <roland@redhat.com> * sysdeps/unix/sysv/linux/i386/lowlevellock.h (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define. (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, lll_robust_mutex_cond_lock, lll_mutex_timedlock, lll_robust_mutex_timedlock, lll_mutex_unlock, lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. Add _L_*_ symbols around the subsection. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info. * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise. 2006-03-03 Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define. (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, lll_robust_mutex_cond_lock, lll_mutex_timedlock, lll_robust_mutex_timedlock, lll_mutex_unlock, lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. Add _L_*_ symbols around the subsection. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info. * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
* * nscd/initgrcache.c (addinitgroupsX): Judge successful lookups byUlrich Drepper2006-08-021-1/+4
| | | | status of NSS calls, not the number of returned entries.
* [BZ #2114]Ulrich Drepper2006-01-061-2/+2
| | | | | | | | | * 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.
* * catgets/gencat.c: Use GPL, not LGPL.Ulrich Drepper2005-12-071-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.