Commit Graph

465 Commits

Author SHA1 Message Date
Roland McGrath
6e6249d0b4 BZ#14743: Move clock_* symbols from librt to libc. 2012-10-24 14:50:46 -07:00
Dmitry V. Levin
fc997c6e55 nscd: fix compilation flags
Commit 61653dfb81 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-10-02 19:22:57 +00:00
Roland McGrath
f04e213208 Fix shadow, gshadow, networks, protocols, rpc, aliases, and nscd routines for USE_NSCD case. 2012-08-22 16:06:53 -07:00
Roland McGrath
c53d909c80 Add --disable-build-nscd configure option. 2012-08-22 13:35:55 -07:00
Roland McGrath
3cc3ef96d6 BZ#13696: Add --disable-nscd configure option. 2012-08-22 13:31:12 -07:00
Joseph Myers
89b4b02f42 Remove pre-2.4.21 Linux kernel support. 2012-07-25 21:19:13 +00:00
Roland McGrath
6540185fb9 Fix formatting in last change. 2012-05-15 11:45:42 -07:00
Andreas Jaeger
509072a0f7 Avoid race in nscd
2012-05-15  Jeff Law  <law@redhat.com>
            Andreas Jaeger  <aj@suse.de>

        [BZ #13594]
        * nscd/nscd-client.h (__nscd_acquire_maplock): New function, split
        out from...
        * nscd/nscd_helper.c (__nscd_get_map_ref): ... here.
        * nscd/nscd-client.h: Add __nscd_acquire_maplock.
        * nscd/nscd_gethst_r.c (__nscd_get_nl_timestamp): Add locking to
        code changing __hst_map_handle.map.
2012-05-15 20:37:05 +02:00
Thomas Schwinge
37233df9d1 Hurd: #include <kernel-features.h> 2012-05-10 15:57:24 -07:00
Andreas Jaeger
edfe0dbebd Cleanup nscd.c
2012-05-09  Andreas Jaeger  <aj@suse.de>

	* nscd/nscd.c (run_modes): Make named enum, reorder so that
	default is first entry.
	(run_mode): Set type.
	(main): Remove informal message about syslog.
	(options): Fix typo.
2012-05-09 21:34:47 +02:00
Andreas Jaeger
91d8d69ec6 Cleanup last patch for nscd/nscd.c
* nscd/nscd.c (run_mode): Use enum.
	(main): Cleanup coding style issue.
2012-05-09 17:42:15 +02:00
Andreas Jaeger
bb90b80baa Add --foreground option for nscd
For a better integration of nscd with systemd, we should run nscd not as
daemon but in the foreground. A new --foreground option should be added.

2012-05-09  Alexandre Oliva  <aoliva@redhat.com>
	    Andreas Jaeger  <aj@suse.de>

        * nscd/nscd.c (go_background): Replaced with...
        (run_mode): ... this.
	(RUN_FOREGROUND, RUN_DAEMONIZE, RUN_DEBUG): Add.
        (options): Add -F --foreground.
        (main): Implement it.
        (parse_opt): Parse it.
2012-05-09 16:54:38 +02:00
Paul Pluzhnikov
3ff4252677 2012-03-23 Daniel Jacobowitz <dmj@google.com>
Paul Pluzhnikov  <ppluzhnikov@google.com>

	[BZ #6528]
	* grp/Makefile (otherlibs): Don't set it.
	* inet/Makefile (otherlibs): Likewise.
	* login/Makefile (otherlibs): Likewise.
	* nscd/Makefile (otherlibs): Likewise.
	* posix/Makefile (otherlibs): Likewise.
	* pwd/Makefile (otherlibs): Likewise.
	* rt/Makefile (otherlibs): Likewise.
	* sunrpc/Makefile (otherlibs): Likewise.
	* nss/Makefile (otherlibs): Likewise.
	Add libnss_files to routines and static-only-routines.
	($(objpfx)getent): Remove rule.
	* resolv/Makefile: Add libnss_dns and libresolv to routines and
	static-only-routines.
2012-03-23 09:47:03 -07:00
H.J. Lu
eb96ffb07d Move stdio-common/_itoa.h to sysdeps/generic 2012-03-20 16:00:23 -07:00
Ulrich Drepper
a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Paul Eggert
59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper
3e1aa84e7f Do not cache negative results in nscd if these are transient 2012-01-20 22:39:54 -05:00
Ulrich Drepper
ec09c1c410 Optimize xmalloc, xcalloc, xrealloc, and xstrdup
Add alloc_size attribute and apply consistently the malloc attribute
to xmalloc, xcalloc, xrealloc, and xstrdup.
2012-01-08 21:19:43 -05:00
Ulrich Drepper
81fb02b046 Update copyright year 2012-01-01 05:50:05 -05:00
Ulrich Drepper
9bea34736f Avoid warning in aicache.c 2011-12-02 21:05:19 -05:00
Andreas Schwab
a9ae54a136 Don't start AVC thread until credentials are installed 2011-11-03 14:41:38 +01:00
Andreas Schwab
45b96dd684 Properly set extra-objs in nscd makefile 2011-11-01 18:28:38 +01:00
Ulrich Drepper
432d41ceec Use kernel headers for netlink definitions 2011-11-01 08:43:33 -04:00
Ulrich Drepper
3a2c02424d Cache network interface information
Whenever getaddrinfo needed network interface information it used the
netlink interface to read the information every single time.  The
problem is that this information can change at any time.

The patch implements monitoring of the network interfaces through
nscd.  If no change is detected the previously read information can
be reused (which is the norm).  This timestamp information is also
made available to other processes using the shared memory segment
between nscd and those processes.
2011-10-31 01:51:16 -04:00
Ulrich Drepper
97c066e65a Fix nesting of #ifdefs in netgroupcache.c 2011-10-17 10:30:03 -04:00
Roland McGrath
c658d255e9 Fix some nit warnings. 2011-10-08 15:25:08 -07:00
Ulrich Drepper
684ae51599 Implement caching of nscd 2011-10-07 10:06:31 -04:00
Ulrich Drepper
21fd49a9ef Don't unnecesarily use inotify in nscd 2011-10-07 01:20:53 -04:00
Ulrich Drepper
32b63198d6 Avoid warning when reload of group entry fails 2011-10-06 03:44:19 -04:00
Ulrich Drepper
a60df2c3db Add missing initialization in service cache in nscd 2011-08-14 22:20:09 -04:00
Marek Polacek
b902330ca8 Avoid warning in nscd config file parsing code 2011-07-19 20:13:31 -04:00
Ulrich Drepper
feb1eb0be7 Avoid possible crashes in anormal nscd exits 2011-07-19 13:59:57 -04:00
Ulrich Drepper
319b9ad4bc Generalize framework to register monitoring of files in nscd
nscd can clear caches when certain files change.  The list of files
was hardcoded so far and worked for nss_files and nss_dns and those
modules which need no monitoring.  nss_db, for instance, has its
own set of files to monitor.  Now the NSS modules themselves can
request that certain files are monitored.
2011-07-11 14:50:24 -04:00
Ulrich Drepper
f15f1e45ba Avoid warning. 2011-07-05 06:56:12 -04:00
Ulrich Drepper
99231d9abe nscd cleanups
Cleanup and optimize last patch.  Add timeout fixes also to the
services cache.
2011-07-01 23:02:09 -04:00
Thorsten Kukuk
445b4a53ea Handle nscd negtimeout==0 2011-07-01 22:53:01 -04:00
Ulrich Drepper
cf3b23ffcd Avoid write to invalid file descriptor in nscd
When readding entries to the group and services cache and the lookup
is unsuccesful, we tried to write the notfound record.  Just don't
do it in this case.
2011-06-29 23:33:38 -04:00
Ulrich Drepper
034807a9cb Fix handling of RES_USE_INET6 big in nscd
This fixes BZ #12350 also for nscd.
2011-06-27 13:10:44 -04:00
Roland McGrath
5615eaf264 Quash some new warnings from GCC 4.6. 2011-06-10 22:44:20 -07:00
Ulrich Drepper
c8fc0c9169 Don't free non-malloced memory and fix memory leak 2011-05-31 08:45:44 -04:00
Ulrich Drepper
f2962a7195 Add a few more alloca size checks 2011-05-22 23:04:16 -04:00
Andreas Schwab
da62f81bdd Add support for generated PIE link rules 2011-05-13 23:31:43 -04:00
Jim Meyering
ded5b9b7c7 Remove doubled words. 2011-04-22 21:34:32 -04:00
Justin P. Mattock
795934a60e Fix a comment. 2011-04-17 20:55:16 -04:00
Ulrich Drepper
a4c7ea7bb8 Schedule nscd cache pruning more accurately fromr re-added values. 2011-02-05 20:07:27 -05:00
Ulrich Drepper
c0dafcf176 Update copyright year. 2011-01-17 15:08:10 -05:00
Ulrich Drepper
bc425b339b Signal temporary host lookup errors in nscd as such to the requester. 2011-01-15 11:10:11 -05:00
Ulrich Drepper
ea42a20cae Fix crash on reloading of gai data in nscd. 2010-04-09 21:38:20 -07:00
Ulrich Drepper
d55d558b4e Print reload count in nscd statistics. 2010-04-08 19:58:29 -07:00
Ulrich Drepper
561470e061 Update copyright year. 2010-03-15 11:50:59 -07:00