about summary refs log tree commit diff
path: root/nscd
Commit message (Collapse)AuthorAgeFilesLines
...
* Update.Ulrich Drepper2004-10-035-18/+55
| | | | | | | | | | | Dynamically create new threads if necessary. * nscd/connections.c (fd_ready): If no thread available for processing the request, create a new one unless the limit is reached. (start_threads): Check errors from pthread_create. * nscd/nscd.h: Declare max_nthreads. * nscd/nscd_conf.c: Parse max-nthreads entry. * nscd/nscd.conf: Add max-threads entry. * nscd/nscd_stat.c: Print current and maximum number of threads.
* Update.Ulrich Drepper2004-10-036-14/+266
| | | | | | | | | | | | | | | | | | | | | | Implement paranoia mode. * nscd/connections.c (nscd_init): Mark database and socket descriptors as close on exec. (restart): New function. (restart_p): New function. (nscd_run): Add missing descrement of nready in case readylist is empty. (main_loop_poll): Call restart_p and restart. (main_loop_epoll): Likewise. (begin_drop_privileges): Save original UID and GID. * nscd/nscd.c: Define new variables paranoia, restart_time, restart_interval, oldcwd, old_gid, old_uid. (main): Disable paranoia mode if we are not forking. (check_pid): When re-execing, the PID file contains the same PID as the current process. Do not fail in this case. * nscd/nscd.conf: Add paranoia and restart-interval entries. * nscd/nscd.h: Define RESTART_INTERVAL. Declare new variables. * nscd/nscd_conf.c: Parse paranoia and restart-internal configurations. * nscd/nscd_stat.c: Print paranoia and restart-internal values.
* Update.Ulrich Drepper2004-10-032-91/+198
| | | | | | | | | | | | 2004-10-03 Ulrich Drepper <drepper@redhat.com> * nscd/connections.c: Implement alternative loop for main thread which uses epoll. * sysdeps/unix/sysv/linux/Makefile [subdir=nscd] (CFLAGS-connections.c): Add -DHAVE_EPOLL. * nscd/Makefile (CFLAGS-initgrcache.c): Add to CFLAGS-* variables, don't replace old content.
* Update,Ulrich Drepper2004-10-034-84/+314
| | | | | | | | | | | | * nscd/connections.c: Rewrite handling of incoming connections. All are handled by one thread which then hands of the descriptors for the real work to the worker threads. * nscd/Makefile: Link nscd with librt. * nscd/selinux.c: Pretty printing. * nscd/dbg_log.c (dbg_log): Don't add unnecessary newline to output. Let syslog do the formatting if debug_level == 0.
* Update.Ulrich Drepper2004-10-021-1/+2
| | | | | | | 2004-10-02 Ulrich Drepper <drepper@redhat.com> * nscd/nscd_helper.c (get_mapping): No need to check timestamp if nscd_certainly_running is nonzero.
* (__nscd_getgrouplist): Add assert.Ulrich Drepper2004-10-011-2/+6
|
* Update. cvs/fedora-glibc-20041001T2134Ulrich Drepper2004-10-011-16/+13
| | | | | * nscd/nscd_initgroups.c (__nscd_getgrouplist): Always add the group the caller provided unless there is a real problem.
* Update.Ulrich Drepper2004-09-307-9/+10
| | | | | | | | * nscd/nscd.c (termination_handler): Reset timestamp so that client immediately stop using the database. (__nscd_drop_map_ref): Change second parameter to be a reference to * nscd/nscd.h: Add declaration of addinitgroups and
* Update.Ulrich Drepper2004-09-306-60/+131
| | | | | | | | | | | | | | | | | | | 2004-09-30 Ulrich Drepper <drepper@redhat.com> * nscd/nscd-client.h (__nscd_get_map_ref): Drop volatile from last parameter. (__nscd_drop_map_ref): Change second parameter to be a referenc to a variable. Update variable when cycle count changed. * nscd/nscd_helper.c (__nscd_get_map_ref): Remove volatile here, too. * nscd/nscd_getai.c: Correctly use __nscd_drop_map_ref. Reinitialize all variables and avoid memory leak in case of retries. * nscd/nscd_getgr_r.c: Likewise. * nscd/nscd_gethst_r.c: Likewise. * nscd/nscd_getpw_r.c: Likewise. * nscd/nscd_initgroups.c: Likewise. * nscd/nscd.h: Add declaretion of addinitgroups and readdinitgroups.
* (__nscd_get_map_ref): Drop volatile from last parameter. ↵Ulrich Drepper2004-09-301-5/+9
| | | | (__nscd_drop_map_ref): Change second parameter to be a referenc to a variable. Update variable when cycle count changed.
* (CFLAGS-nscd_initgroups.c): Set to -fpie. (CFLAGS-initgrcache.c): Likewise.Andreas Jaeger2004-09-301-0/+2
|
* Add declaretion of addinitgroups and readdinitgroups.Ulrich Drepper2004-09-301-0/+7
|
* Update.Ulrich Drepper2004-09-301-2/+1
| | | | | | | 2004-09-29 Ulrich Drepper <drepper@redhat.com> * nscd/nscd_gethst_r.c (nscd_gethst_r): Use correct constant for testing result of __nscd_get_map_ref.
* Update.Ulrich Drepper2004-09-309-9/+582
| | | | | | | | | | | | | | | | | | | | | | | | | | * grp/initgroups.c: Move compat_call implementation... * grp/compat-initgroups.c: ...to here. New file. * grp/Makefile (distribute): Add compat-initgroups.c. (CFLAGS-initgroups.c): Add -DUSE_NSCD=1. * mscd/initgrcache.c: New file. * nscd/nscd_initgroups.c: New file. * nscd/Makefile (routines): Add nscd_initgroups. (nscd-modules): Add initgrcache. * nscd/cache.c (prune_cache): Add support for INITGROUPS entries. * nscd/connections.c: Handle INITGROUPS requests. * nscd/nscd-client.h: Define INITGROUPS, initgr_response_header. Add initgrdata element to struct datahead. Fix typo in comment. * nscd/nscd_proto.h: Declare __nscd_getgrouplist. Fix parameter type in __nscd_getgrgrid_r. * nscd/selinux.c (perms): Add INITGROUPS entry. * nscd/nscd_getai.c: No need to include <sys/mman.h>. * sunrpc/get_myaddr.c (get_myaddress): Account for interfaces without assigned addresses. * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. * sunrpc/clnt_udp.c (is_network_up): Likewise.
* Update.Ulrich Drepper2004-09-291-0/+2
| | | | | * nscd/nscd.c: Define getaddrinfo hidden so that it is never found outside.
* Update. cvs/fedora-glibc-20040929T0821Ulrich Drepper2004-09-291-3/+3
| | | | | * nscd/nscd_getai.c: Use NO_MAPPING instead of MAP_FAILED for test of failing __nscd_get_map_ref. Fix a few typos.
* Update.Ulrich Drepper2004-09-205-5/+26
| | | | | | | | | | | 2004-09-20 Ulrich Drepper <drepper@redhat.com> * nscd/nscd.c (options): Mark S option as hidden. (parse_opt): When S option is used, print warning message. * nscd/grpcache.c (adgrptbyX): Don't handle secure mode. * nscd/hstcache.c (addhstbyX): Don't handle secure mode. * nscd/aicache.c (addhstaiX): Don't handle secure mode. * nscd/pwdcache.c (addpwbyX): Don't handle secure mode.
* Update.Ulrich Drepper2004-09-204-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdeps/unix/sysv/linux/setegid.c [HAVE_PTR__NPTL_SETXID]: Call callback to set IDs in all other threads as well. * sysdeps/unix/sysv/linux/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/setuid.c: New file. * sysdeps/unix/sysv/linux/setgid.c: New file. * sysdeps/unix/sysv/linux/setreuid.c: New file. * sysdeps/unix/sysv/linux/setregid.c: New file. * sysdeps/unix/sysv/linux/setresuid.c: New file. * sysdeps/unix/sysv/linux/setresgid.c: New file. * sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NCS. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Use x86 version. * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Remove setresgid and setresuid. * nscd/aicache.c: Use pthread_seteuid_np instead of seteuid. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/pwdcache.c: Likewise.
* Update.Ulrich Drepper2004-09-171-1/+1
| | | | | | | 2004-09-17 Jakub Jelinek <jakub@redhat.com> * nscd/nscd.c (parse_opt): Write arg string instead of (void *) key to the socket.
* Update.Ulrich Drepper2004-09-177-1/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-09-16 Ulrich Drepper <drepper@redhat.com> * configure.in: Add test for required SELinux features. * config.make.in: Add have-selinux entry. * config.h.in: Add HAVE_SELINUX entry. * nscd/Makefile (nscd-modules): Add selinux. (CFLAGS-selinux.c): Add -fpie. Define selinux-LIBS and use in link line. * nscd/connections.c (handle_request): Check access SELinux permissions before processing request. * nscd/nscd.c (main): Initialize selinux_enabled and stop avc thread. * nscd/nscd_stat.c: Transmit and print AVC statistics. * nscd/selinux.c: New file. * nscd/selinux.h: New file. 2004-09-16 Jakub Jelinek <jakub@redhat.com> * nscd/nscd_helper.c (__nscd_unmap, get_mapping): Use __munmap instead of munmap. * nscd/Makefile (CFLAGS-aicache.c): Set to -fpie. 2004-09-16 Thorsten Kukuk <kukuk@suse.de> * sysdeps/posix/getaddrinfo.c (gaih_inet): Check __nss_not_use_nscd_hosts variable if nscd should be used or not. 2004-09-16 Ulrich Drepper <drepper@redhat.com> * nscd/nscd_proto.h: Define NSS_NSCD_RETRY. Add __nscd_getai prototype. * nss/getXXbyYY_r.c: Remode definition of NSS_NSCD_RETRY. * nscd/nscd-client.h: Remove __nscd_getai prototype. * nscd/nscd_getai.c: Include nscd_proto.h. * elf/ldd.bash.in: Add support for SELinux environments. Patch by Stephen Smalley <sds@epoch.ncsc.mil>.
* iAdd __nscd_getai prototype.Ulrich Drepper2004-09-165-6/+9
|
* Update.Ulrich Drepper2004-09-151-27/+77
| | | | | | | | | | | | | * nscd/aicache.c: Prefer using gethostbyname3_r NSS callback to also get ttl and canonical name. Use these two values. * resolv/Versions: Export _nss_dns_gethostbyname3_r from libnss_dns. * resolv/nss_dns/dns-host.c (getanswer_r): Take two new parameters. If nonnull fill with TTL and pointer to canonical name respectively. (_nss_dns_gethostbyaddr_r): Pass NULL in new parameters of getanswer_r. (_nss_dns_gethostbyname2_r): Just wrapper around _nss_dns_gethostbyname3_r. (_nss_dns_gethostbyname3_r): Renamed from _nss_dns_gethostbyname2_r. Take two new parameters which as passed to getanswer_r.
* Update.Ulrich Drepper2004-09-158-7/+654
| | | | | | | | | | | | | | | | | | | | | 2004-09-15 Ulrich Drepper <drepper@redhat.com> * nscd/Makefile (rountines): Add nscd_getai. (nscd-modules): Add aicache. * nscd/aicache.c: New file. * nscd/nscd_getai.c: New file. * nscd/cache.c (prune_cache): Handle GETAI request type. * nscd/connections.c: Add GETAI support in request handling. * nscd/nscd-client.h (request_type): Add GETAI. Define ai_response_header and struct nscd_ai_result types. (struct datahead): Add aidata field. Declare __nscd_getai. * nscd/nscd.c: Add getaddrinfo definition to catch problems. * nscd/nscd.h: Declare addhstai and readdhstai. * sysdeps/posix/getaddrinfo.c: Add support for using cached results. * nscd/nscd-client.h (struct datahead): Use uint8_t instead of bool.
* Update.Ulrich Drepper2004-09-133-16/+20
| | | | | | | | 2004-09-13 Thorsten Kukuk <kukuk@suse.de> * nscd/nscd_stat.c: Don't access dbs[cnt].head for disabled services. * nscd/nscd.init: Fix path to socket.
* UPdate.Ulrich Drepper2004-09-131-2/+4
| | | | | * nscd/nscd_helper.c (get_mapping): Correctly check cmsg length. Avoid file descriptor leak in case of size mismatch.
* Update.Ulrich Drepper2004-09-131-5/+6
| | | | * nscd/mem.c (gc): Add casts to avoid warnings.
* Update.Ulrich Drepper2004-09-131-28/+32
| | | | * nscd/nscd-client.h: Fix database structure layout for biarch.
* Update.Ulrich Drepper2004-09-122-1/+21
| | | | | | | | 2004-09-12 Ulrich Drepper <drepper@redhat.com> * nscd/pwdcache.c (cache_addpw): Sync also negative results to disk. * nscd/grpcache.c (cache_addgr): Likewise. * nscd/hstcache.c (cache_addhst): Likewise.
* (cache_addhst): Sync also negative results to disk.Ulrich Drepper2004-09-121-6/+15
|
* Update.Ulrich Drepper2004-09-111-1/+1
| | | | | * nscd/connections.c (nscd_run): Call setup_thread only for enabled databases.
* Update.Ulrich Drepper2004-09-105-6/+29
| | | | | | | | | | | 2004-09-10 Ulrich Drepper <drepper@redhat.com> * nscd/nscd.c (pagesize_m1): New variable. (main): Initialize it. * nscd/nscd.h: Declare pagesize_m1. * nscd/hstcache.c: Pass correctly aligned address to msync. * nscd/grpcache.c: Likewise. * nscd/pwdcache.c: Likewise.
* Update.Ulrich Drepper2004-09-102-9/+24
| | | | | | | | | 2004-09-10 Ulrich Drepper <drepper@redhat.com> * nscd/nscd_stat.c: Improve output by also printing .shared and .persistent. * nscd/connections.c: Allow cache sharing to be really disabled.
* (CFLAGS-nscd_setup_thread.c): Set to -fpie.Andreas Jaeger2004-09-091-0/+1
|
* Update.Ulrich Drepper2004-09-081-4/+8
| | | | * nscd/nscd-client.h: Add a few #includes.
* * sysdeps/generic/nscd_setup_thread.c: New file.Ulrich Drepper2004-09-082-4/+4
| | | | * sysdeps/unix/sysv/linux/nscd_setup_thread.c: New file.
* Update.Ulrich Drepper2004-09-085-6/+12
| | | | | | | | | | | | | | | Jakub Jelinek <jakub@redhat.com> * nscd/Makefile (nscd-modules): Add nscd_setup_thread. * nscd/connections.c (nscd_run): Call setup_thread for maintenance threads. * nscd/nscd-client.h (struct database_pers_head): Add nscd_certainly_running field. * nscd/nscd.h: Declare setup_thread. * nscd/nscd_helper.c (__nscd_get_map_ref): Avoid the time test if nscd_certainly_running is nonzero. 2004-09-08 Ulrich Drepper <drepper@redhat.com>
* Update.Ulrich Drepper2004-09-0812-424/+986
| | | | | | | | | | | | | | | | | | | | | | | | | | * nscd/connections.c: Implement r/o sharing of nscd's cache with client processes via shared memory. * nscd/nscd-client.h: Likewise. * nscd/nscd.h: Likewise. * nscd/nscd_conf.c: Likewise. * nscd/nscd_getgr_r.c: Likewise. * nscd/nscd_getpw_r.c: Likewise. * nscd/nscd_gethst_r.c: Likewise. * nscd/nscd.conf: Add new config parameters. * nscd/Makefile (aux): Add nscd_helper. * nscd/nscd_helper.c: New file. * nscd/mem.c (gc): Indicate beginning and end of the gc cycle. * nscd/hstcache.c: Simplify a lot. We cache only the request itself, no derived information. * connections.c (nscd_init): Fix bug in testing size of the persistent. * nis/Makefile (aux): Add nis_hash. * nis/nis_hash.c: New file. Split out from nis_util.c. * nis/nis_util.c: Move __nis_hash code in separate file. * csu/tst-atomic.c: Improve atomic_increment_val test which would not have found a ppc bug.
* Update.Ulrich Drepper2004-09-051-3/+13
| | | | | | | 2004-09-05 Ulrich Drepper <drepper@redhat.com> * nscd/cache.c (cache_add): Correctly log GETHOSTBYADDR and GETHOSTBYADDRv6 requests.
* Update.Ulrich Drepper2004-09-051-3/+3
| | | | | | | | 2004-09-04 Ulrich Drepper <drepper@redhat.com> * nscd/pwdcache.c (cache_addpw): Use correct key length in cache_add calls. * nscd/grpcache.c (cache_addgr): Likewise.
* (cache_addgr): Use correct key length in cache_add calls.Ulrich Drepper2004-09-051-3/+3
|
* Update.Ulrich Drepper2004-09-031-11/+13
| | | | | | | 2004-09-03 Ulrich Drepper <drepper@redhat.com> * nscd/nscd.c (parse_opt): Use writev instead of two write for invalidate command.
* (nscd_run): Check early for invalid request types.Ulrich Drepper2004-09-031-7/+9
|
* Update.Ulrich Drepper2004-08-2613-813/+2366
| | | | | | | | | | | | | | | | | | | | | 2004-08-26 Ulrich Drepper <drepper@redhat.com> * nscd/cache.c: Major rewrite. The data is now optionally kept in a mmaped memory region which is automatically mirrored on disk. This implements persistent data storage. The Memory handled needed to be completely revamped, it now uses a garbage collection mechanism instead of malloc. * nscd/connections.c: Likewise. * nscd/nscd.c: Likewise. * nscd/nscd.h: Likewise. * nscd/nscd_conf.c: Likewise. * nscd/nscd_stat.c: Likewise. * nscd/grpcache.c: Likewise. * nscd/hstcache.c:: Likewise. * nscd/pwdcache.c:: Likewise. * nscd/Makefile: Add rules to build mem.c. * nscd/mem.c: New file. * nscd/nscd.conf: Describe new configuration options.
* Update.Ulrich Drepper2004-08-261-1/+0
| | | | | | | | | | | | | | | | | 2004-08-26 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/unix/sysv/linux/mips/pread.c: Include sgidefs.h only if NO_SGIDEFS_H isn't defined. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/sh/pread.c: Define NO_SGIDEFS_H and _MIPS_SIM. * sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/sh/pread64.c: Likewise. * sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise. * nscd/connections.c (nscd_run): atomic_increment was not missing.
* Update.Ulrich Drepper2004-08-252-25/+41
| | | | | | | | | | | 2004-08-25 Ulrich Drepper <drepper@redhat.com> * nscd/connections.c: Make socket nonblocking so that threads don't get stuck on accept. Fix locking. * nscd/grpcache.c (cache_addgr): Use cope of original key in hash entry with alternative key. * nscd/pwdcache.c (cache_addpw): Likewise.
* (cache_addpw): Use cope of original key in hash entry with alternative key.Ulrich Drepper2004-08-251-4/+7
|
* (do_release_all): Add __libc_freeres_fn_section.Ulrich Drepper2004-08-041-1/+1
|
* (handle_request): Missing _() in last patch.Ulrich Drepper2004-08-041-1/+1
|
* Update.Ulrich Drepper2004-08-041-1/+3
| | | | | | | 2004-08-03 Ulrich Drepper <drepper@redhat.com> * nscd/connections.c (handle_request): Print more descriptive message for invalid request types.
* Update.Ulrich Drepper2004-07-271-3/+8
| | | | | | | | 2004-07-27 Ulrich Drepper <drepper@redhat.com> * nscd/grpcache.c (cache_addgr): If necessary, add entry also under the name the user provided. * nscd/pwdcache.c (cache_addpw): Likewise.