Commit Graph

358 Commits

Author SHA1 Message Date
Ulrich Drepper 2461e3dc09 [BZ #1294]
2005-11-11  Ulrich Drepper  <drepper@redhat.com>
	[BZ #1294]
	* locales/pt_BR: Set p_cs_precedes and n_cs_precedes to 1.
2005-11-12 02:11:32 +00:00
Ulrich Drepper 06cdec09ed (nscd_getpw_r): Remove incorrectly C&Ped free call in code handling detection of GC runs. 2005-09-22 14:35:11 +00:00
Roland McGrath a8d131a717 * nscd/dbg_log.c (init_logfile): Use fopen64 rather than fopen. 2005-09-20 20:15:15 +00:00
Ulrich Drepper 4fb5ab741a * nscd/nscd.c (main): Use error while process isn't running in the
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-24 06:37:27 +00:00
Ulrich Drepper 2c210d1eb8 * nscd/connection.c (DEFAULT_DATASIZE_PER_BUCKET): Move to nscd.h.
(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-23 23:21:53 +00:00
Ulrich Drepper a757fda3e7 * nscd/cache.c (prune_cache): Add more debug output. Only for
debug level 3 and higher and very verbose.
2005-08-16 22:47:26 +00:00
Ulrich Drepper 80ea303760 * nscd/cache.c (prune_cache): Use stat64 not stat.
* nscd/connections.c (nscd_init): Likewise.
2005-08-16 18:10:03 +00:00
Ulrich Drepper 908c9e87c3 * nscd/connections.c (main_loop_epoll): Pass NULL as event
argument for epoll_ctl(EPOLL_CTL_DEL) calls.
2005-08-09 06:16:47 +00:00
Ulrich Drepper 4630012fef * nscd/nscd_stat.c (receive_print_stats): Really print values of
thread number, paranoia, and restart interval the server is using.
2005-08-09 05:46:16 +00:00
Ulrich Drepper cc46d02a45 (cache_add): Comment hash table and header to disk. 2005-08-08 20:58:35 +00:00
Ulrich Drepper f54a329a28 * nscd/mem.c (mempool_alloc): Use posix_fallocate instead of ftruncate.
* nscd/connections.c (nscd_init): Likewise.
2005-08-08 20:42:33 +00:00
Ulrich Drepper dc4bb1c2be * posix/bits/unistd.h (confstr, getgroups, ttyname_r, gethostname,
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-08-08 19:04:11 +00:00
Roland McGrath 3bfd2d42c0 * nscd/Makefile ($(objpfx)nscd): Pass $(nscd-cflags) to $(LINK.o). 2005-07-22 05:35:27 +00:00
Ulrich Drepper 401a9ec9ca * configure.in: Check for -fstack-protector gcc option.
* 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 15:35:50 +00:00
Ulrich Drepper be686f1876 (main): Don't ignore result of chdir call. 2005-07-19 15:30:46 +00:00
Ulrich Drepper 233399bce2 * nscd/Makefile (nscd-cflags): Add _FORTIFY_SOURCE.
* nscd/connections.c: Fix a few wur warnings.
2005-07-18 22:28:46 +00:00
Ulrich Drepper 9f3731cf7f * nscd/grpcache.c (cache_addgr): Use correct maximum for group ID
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-18 21:07:28 +00:00
Ulrich Drepper f45729d8cd * nscd/nscd_helper.c: Add a few __builtin_expect. 2005-07-14 02:53:33 +00:00
Ulrich Drepper a08ab89700 * nscd/connections.c (send_ro_fd): Make sure BUF is aligned correctly. 2005-07-14 02:17:58 +00:00
Ulrich Drepper 7529e67ed8 * nscd/nscd_helper.c (wait_on_socket): New function.
(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-07-13 22:47:24 +00:00
Ulrich Drepper bb6e8ca30a * nscd/nscd_stat.c (receive_print_stats): Replace YESSTR/NOSTR
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-26 18:28:35 +00:00
Ulrich Drepper 64d64de628 * nscd/nscd.init: Get more in line with lsb3.
* nscd/nscd.c: Adjust some error codes to fit in better with lsb3.
	* nscd/connections.c: Likewise.
2005-06-20 15:49:08 +00:00
Ulrich Drepper ec23b9bece * configure.in: Add test for availability of libaudit.
* 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-06-14 22:52:30 +00:00
Ulrich Drepper 9393da4659 Help losers who use --with-headers. 2005-04-29 02:07:46 +00:00
Ulrich Drepper 75596b98a1 * nscd/connections.c (nscd_run): Use time() value in prune_cache
call, not timeout value, since the latter might be from another clock.
2005-04-28 06:27:13 +00:00
Roland McGrath c9e169479e [BZ #253]
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-04-15 06:33:21 +00:00
Roland McGrath 0e07fc00ca * nscd/aicache.c (addhstaiX): Tweak type to avoid warning. 2005-03-17 09:43:50 +00:00
Ulrich Drepper d2dc7d8473 * nscd/nscd-client.h: Include sys/uio.h.
(__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-22 22:58:32 +00:00
Ulrich Drepper 804bb90a5a Include sys/uio.h. (__readall, __readvall, writeall): New prototypes. 2005-02-22 22:51:26 +00:00
Ulrich Drepper 4379b40341 * nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop to
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.
2005-02-21 23:43:21 +00:00
Ulrich Drepper 6aa10807fc [BZ #677]
* nscd/nscd.c (termination_handler): Avoid segfault if some database
	is not enabled.

	* nscd/nscd_getai.c (__nscd_getai): If ai_resp->found == -1, set
	__nss_not_use_nscd_hosts and return -1.
	* nscd/nscd_initgroups.c (__nscd_getgrouplist): If
	initgr_resp->found == -1, set __nss_not_use_nscd_group and return -1.
	Avoid leaking sockets.

2005-01-28  Andreas Schwab  <schwab@suse.de>
	    H.J. Lu  <hongjiu.lu@intel.com>

	[BZ #677]
	* elf/dl-runtime.c (fixup): Change return type to
	DL_FIXUP_VALUE_TYPE. Use DL_FIXUP_VALUE_TYPE,
	DL_FIXUP_MAKE_VALUE and DL_FIXUP_VALUE_CODE_ADDR for relocation
	values. Use DL_FIXUP_VALUE_ADDR and DL_FIXUP_ADDR_VALUE to
	store and retrieve relocation values.
	(profile_fixup): Likewise.
	* include/link.h (link_map): Use DL_FIXUP_VALUE_TYPE for
	l_reloc_result.
	* sysdeps/generic/dl-fptr.h (link_map): Forward declaration.
	* sysdeps/generic/dl-lookupcfg.h (DL_FIXUP_VALUE_TYPE): New.
	(DL_FIXUP_MAKE_VALUE): Likewise.
	(DL_FIXUP_VALUE_CODE_ADDR): Likewise.
	(DL_FIXUP_VALUE_ADDR): Likewise.
	(DL_FIXUP_ADDR_VALUE): Likewise.
	* sysdeps/ia64/dl-lookupcfg.h: Include <dl-fptr.h> for "struct fdesc".
	(DL_FIXUP_VALUE_TYPE): New.
	(DL_FIXUP_MAKE_VALUE): Likewise.
	(DL_FIXUP_VALUE_CODE_ADDR): Likewise.
	(DL_FIXUP_VALUE_ADDR): Likewise.
	(DL_FIXUP_ADDR_VALUE): Likewise.
	* sysdeps/ia64/dl-machine.h (elf_machine_profile_fixup_plt): Removed.
	(elf_machine_profile_plt): Removed.
	(elf_machine_fixup_plt): Change return type and type of value
	parameter to struct fdesc.
	(elf_machine_plt_value): Likewise.
	(elf_machine_rela): Use DL_FIXUP_MAKE_VALUE to construct
	argument for elf_machine_fixup_plt.

2005-02-07  Jakub Jelinek  <jakub@redhat.com>
2005-02-07 22:56:07 +00:00
Roland McGrath 58954d492d * nscd/nscd.init (reload): Print Reloading nscd: before and a newline
after the status string printed by killproc.
2005-02-07 19:30:19 +00:00
Ulrich Drepper 6925ef9a67 Update.
2005-01-30  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd_helper.c (get_mapping): Use MSG_NOSIGNAL if available.
	* nscd/connections.c (send_ro_fd): Likewise.
2005-01-30 20:34:21 +00:00
Roland McGrath 24e860324f 2005-01-17 Roland McGrath <roland@redhat.com>
* nscd/Makefile (LDLIBS-nscd): New variable.
	($(objpfx)nscd): Use that instead of selinux-LIBS.
2005-01-18 01:21:35 +00:00
Ulrich Drepper 1b85ed0ce2 * posix/getconf.c: Update copyright year.
* nss/getent.c: Likewise.
	* nscd/nscd_nischeck.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* catgets/gencat.c: Likewise.
	* csu/version.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* debug/xtrace.sh: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/mtrace.pl: Likewise.
	* debug/catchsegv.sh: Likewise.
2005-01-12 23:43:44 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Roland McGrath fe81a1a00f 2004-12-16 Roland McGrath <roland@redhat.com>
* nscd/Makefile ($(objpfx)nscd): Don't depend on $(selinux-LIBS),
	which is usually a -lselinux that make will resolve wrongly.
2004-12-16 22:21:24 +00:00
Ulrich Drepper 8dd719970a (__nscd_getai): Avoid memory and file descriptor leaks. 2004-11-22 18:41:05 +00:00
Ulrich Drepper ed2ced8ae3 Update.
2004-11-10  Jakub Jelinek  <jakub@redhat.com>

	* Makefile (tests): Add tst-exit3.
	* tst-exit3.c: New test.
2004-11-10 07:54:40 +00:00
Ulrich Drepper 5429ff760a (libc_locked_map_ptr): Add new first parameter, used as class for definition.
* nscd/nscd-client.h (libc_locked_map_ptr): Add new first
	parameter, used as class for definition.
	* nscd/nscd_getpw_r.c: Adjust for libc_locked_map_ptr change.
	(pw_map_free): Ensure no crash after memory is freed.
	* nscd/nscd_getgr.c: Likewise.  Make map externally visible.
	* nscd/nscd_gethst.c: Likewise.
	* nscd/nscd_getai.c: Use map from nscd_gethost.c.
	* nscd/nscd_initgroups.c: Use map from nscd_getgr.c.
2004-11-10 07:50:03 +00:00
Ulrich Drepper 457962e5f1 Update.
2004-10-15  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd.h (_PATH_NSCD_PASSWD_DB): Move to /var/db.
	(_PATH_NSCD_GROUP_DB): Likewise.
	(_PATH_NSCD_HOSTS_DB): Likewise.
	(_PATH_NSCD_XYZ_DB_TMP): New #define, point to /var/run.
	* nscd/connections.c (nscd_init): Non-persistent database files
	are created with the _PATH_NSCD_XYZ_DB_TMP path.
	* nscd/nscd.init: Create /var/db/nscd if necessary.
2004-10-15 21:20:11 +00:00
Ulrich Drepper a8a589676c (nscd_init): Non-persistent database files are created with the _PATH_NSCD_XYZ_DB_TMP path. 2004-10-15 21:12:15 +00:00
Ulrich Drepper 59350982d0 Update.
* nscd/Makefile: When using compilers without -fpie support, also
	link with -lselinux if necessary.
	Patch by Arkadiusz Miskiewicz <arekm@pld-linux.org>.
2004-10-14 20:55:58 +00:00
Ulrich Drepper 5ca3d19c74 Update.
2004-10-14  Ulrich Drepper  <drepper@redhat.com>

	* nscd/connections.c (nscd_init): Remove file if not persistent
	and not shared.  Patch by Jerome Borsboom <j.borsboom@erasmusmc.nl>.

	* sysdeps/unix/sysv/linux/i386/setresuid.c: Handle
	defined __NR_setresuid32 && !defined __NR_setresuid.
	* sysdeps/unix/sysv/linux/i386/setresgid.c: Handle
	defined __NR_setresgid32 && !defined __NR_setresgid.

	* sysdeps/sparc/fpu/bits/mathinline.h (__signbitf, __signbit,
	__signbitl, sqrtf, sqrt, sqrtl, fdim, fdimf): Use __NTH macro.

	* sysdeps/generic/errno-loc.c: Don't undef #errno
	if RTLD_PRIVATE_ERRNO.
	* include/errno.h (__errno_location): If RTLD_PRIVATE_ERRNO,
	add attribute_hidden.

	* dlfcn/dlinfo.c (dlinfo_doit): Replace iteration over GL(dl_loaded)
	chain with iteration over all namespaces' _ns_loaded chains.
	* sysdeps/powerpc/powerpc32/dl-machine.c (__elf_preferred_address):
	Likewise.
	* sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Likewise.
2004-10-14 16:18:09 +00:00
Ulrich Drepper 695c43708f Update.
2004-10-05  Ulrich Drepper  <drepper@redhat.com>

	* grp/initgroups.c: Remove duplicate group IDs.
	* grp/compat-initgroups.c: Likewise.
	* nscd/initgrcache.c: Likewise.
2004-10-05 15:36:41 +00:00
Ulrich Drepper 6ab5f50de4 Update.
2004-10-05  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Return 200112L
	for _SC_CPUTIME or _SC_THREAD_CPUTIME.

	* nscd/Makefile (nscd-cflags): Set to -DIS_IN_nscd=1, plus
	-fpie if building PIE.
	(CFLAGS-*.c): Use it.

	* nscd/Makefile (relro-LDFLAGS): Add -Wl,-z,now if have-z-relro.
	($(objpfx)nscd): Add $(relro-LDFLAGS).

	* sysdeps/unix/sysv/linux/i386/sysconf.c: Include hp-timing.h.
	(__sysconf): Return -1 for _SC_CPUTIME or _SC_THREAD_CPUTIME if
	!HP_TIMING_AVAIL.

2004-10-05  Ulrich Drepper  <drepper@redhat.com>

	* nscd/Makefile (distribute): Remove TODO.
	* nscd/TODO: Removed.
2004-10-05 09:26:23 +00:00
Ulrich Drepper e14bbf537e Update.
* nscd/gai.c: Define __no_netlink_support if NEED_NETLINK is
	defined and __ASSUME_NETLINK_SUPPORT is zero.
	* sysdeps/unix/sysv/linux/Makefile (CFLAGS-gai.c): Add
	-DNEED_NETLINK.
2004-10-04 23:30:29 +00:00
Ulrich Drepper e582c5eda2 Update.
2004-10-04  Ulrich Drepper  <drepper@redhat.com>

	* malloc/mtrace.pl: Avoid calling location unless it is needed for
	output.  Patch by Edward Bishop <binutils@gmail.com>.

	* nscd/Makefile (CFLAGS-gai.c): Add -fpie.
2004-10-04 23:22:47 +00:00
Ulrich Drepper 94d824f920 Update.
* sysdeps/unix/sysv/linux/ia64/sysconf.c: New file.
	* sysdeps/unix/sysv/linux/ia64/Dist: Add has_cpuclock.c.
	* sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c: Move actual
	testing code to...
	* sysdeps/unix/sysv/linux/ia64/has_cpuclock.c: ...here.  New file.
	* sysdeps/unix/sysv/linux/i386/sysconf.c: Add dynamic check for
	_SC_CPUTIME and _SC_THREAD_CPUTIME.
2004-10-04 19:28:07 +00:00
Ulrich Drepper 3078cba2f7 Update.
* nscd/connections.c (start_threads): Use sysconf in case
	_POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not greater zero.

	* nscd/nscd.c: Remove getaddrinfo stub definition.
2004-10-04 16:35:54 +00:00
Ulrich Drepper 91a3b2ad2e Update.
* nscd/Makefile (nscd-modules): Add gai.
	* nscd/gai.c: New file.
2004-10-04 09:36:51 +00:00
Ulrich Drepper 48ad81fa2f Update.
2004-10-03  Juerg Billeter  <j@bitron.ch>

	* nscd/nscd_initgroups.c (__nscd_getgrouplist): Return -1 if nscd
	can't be used.
2004-10-03 21:33:28 +00:00
Ulrich Drepper 27e8285643 Update.
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.
2004-10-03 21:11:37 +00:00
Ulrich Drepper 4401d75905 Update.
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.
2004-10-03 19:33:48 +00:00
Ulrich Drepper fc03df7aa6 Update.
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.
2004-10-03 07:33:54 +00:00
Ulrich Drepper 1945c96f2b Update,
* 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.
2004-10-03 01:21:47 +00:00
Ulrich Drepper 1507c81f2a Update.
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.
2004-10-02 19:31:11 +00:00
Ulrich Drepper f7fa2b1951 (__nscd_getgrouplist): Add assert. 2004-10-01 21:35:08 +00:00
Ulrich Drepper 927f0673b3 Update.
* nscd/nscd_initgroups.c (__nscd_getgrouplist): Always add the
	group the caller provided unless there is a real problem.
2004-10-01 21:24:29 +00:00
Ulrich Drepper 74fef3bbcb Update.
* 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
2004-09-30 08:27:48 +00:00
Ulrich Drepper 0891f9706f Update.
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.
2004-09-30 08:08:40 +00:00
Ulrich Drepper 085f2dd0ad (__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. 2004-09-30 08:03:44 +00:00
Andreas Jaeger 00ce1b01e3 (CFLAGS-nscd_initgroups.c): Set to -fpie. (CFLAGS-initgrcache.c): Likewise. 2004-09-30 07:51:30 +00:00
Ulrich Drepper 26235c7c45 Add declaretion of addinitgroups and readdinitgroups. 2004-09-30 07:15:40 +00:00
Ulrich Drepper af38d7ce63 Update.
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.
2004-09-30 05:16:40 +00:00
Ulrich Drepper f7e7a39681 Update.
* 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.
2004-09-30 02:24:51 +00:00
Ulrich Drepper 04c785b27f Update.
* nscd/nscd.c: Define getaddrinfo hidden so that it is never found
	outside.
2004-09-29 22:47:22 +00:00
Ulrich Drepper 8117719197 Update.
* nscd/nscd_getai.c: Use NO_MAPPING instead of MAP_FAILED for test
	of failing __nscd_get_map_ref.  Fix a few typos.
2004-09-29 05:59:26 +00:00
Ulrich Drepper 3c12b91ade Update.
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.
2004-09-20 23:16:22 +00:00
Ulrich Drepper 2edb61e3f9 Update.
* 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.
2004-09-20 00:16:11 +00:00
Ulrich Drepper f731666f48 Update.
2004-09-17  Jakub Jelinek  <jakub@redhat.com>

	* nscd/nscd.c (parse_opt): Write arg string instead of (void *)
	key to the socket.
2004-09-17 19:51:26 +00:00
Ulrich Drepper 74a30a5851 Update.
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>.
2004-09-17 00:04:18 +00:00
Ulrich Drepper 62417d7ee8 iAdd __nscd_getai prototype. 2004-09-16 22:54:54 +00:00
Ulrich Drepper d1fe1f2219 Update.
* 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.
2004-09-15 10:10:05 +00:00
Ulrich Drepper d19687d6eb Update.
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.
2004-09-15 08:25:49 +00:00
Ulrich Drepper aadd7d9d26 Update.
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.
2004-09-13 17:24:41 +00:00
Ulrich Drepper 407c4b9a19 UPdate.
* nscd/nscd_helper.c (get_mapping): Correctly check cmsg length.
	Avoid file descriptor leak in case of size mismatch.
2004-09-13 06:07:02 +00:00
Ulrich Drepper 568470bbff Update.
* nscd/mem.c (gc): Add casts to avoid warnings.
2004-09-13 05:56:39 +00:00
Ulrich Drepper 404db64ae7 Update.
* nscd/nscd-client.h: Fix database structure layout for biarch.
2004-09-13 05:52:46 +00:00
Ulrich Drepper cf244b74a0 Update.
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.
2004-09-12 10:10:48 +00:00
Ulrich Drepper 8c89236fd3 (cache_addhst): Sync also negative results to disk. 2004-09-12 10:04:03 +00:00
Ulrich Drepper 72ae1e97d0 Update.
* nscd/connections.c (nscd_run): Call setup_thread only for enabled
	databases.
2004-09-11 20:48:01 +00:00
Ulrich Drepper 3418007ed6 Update.
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.
2004-09-10 23:56:29 +00:00
Ulrich Drepper d13a3c5792 Update.
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.
2004-09-10 20:31:41 +00:00
Andreas Jaeger 1f9c1540bf (CFLAGS-nscd_setup_thread.c): Set to -fpie. 2004-09-09 06:35:38 +00:00
Ulrich Drepper cf6f93d426 Update.
* nscd/nscd-client.h: Add a few #includes.
2004-09-08 19:49:17 +00:00
Ulrich Drepper 67a0b49db3 * sysdeps/generic/nscd_setup_thread.c: New file.
* sysdeps/unix/sysv/linux/nscd_setup_thread.c: New file.
2004-09-08 18:03:21 +00:00
Ulrich Drepper 081fc592fa Update.
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>
2004-09-08 17:56:46 +00:00
Ulrich Drepper c207f23b0b Update.
* 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.
2004-09-08 15:46:42 +00:00
Ulrich Drepper 418dfb124c Update.
2004-09-05  Ulrich Drepper  <drepper@redhat.com>

	* nscd/cache.c (cache_add): Correctly log GETHOSTBYADDR and
	GETHOSTBYADDRv6 requests.
2004-09-05 07:19:46 +00:00
Ulrich Drepper 03e157d849 Update.
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.
2004-09-05 07:02:13 +00:00
Ulrich Drepper 3d73c4ba9c (cache_addgr): Use correct key length in cache_add calls. 2004-09-05 06:47:36 +00:00
Ulrich Drepper ead07d01fa Update.
2004-09-03  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd.c (parse_opt): Use writev instead of two write for
	invalidate command.
2004-09-03 08:15:41 +00:00
Ulrich Drepper 3c82c131d9 (nscd_run): Check early for invalid request types. 2004-09-03 03:39:45 +00:00
Ulrich Drepper a95a08b4af Update.
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.
2004-08-26 18:35:05 +00:00
Ulrich Drepper 1114ffff54 Update.
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.
2004-08-26 17:00:16 +00:00
Ulrich Drepper d6db09753a Update.
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.
2004-08-25 17:24:52 +00:00
Ulrich Drepper 801ddb6a03 (cache_addpw): Use cope of original key in hash entry with alternative key. 2004-08-25 17:18:43 +00:00
Ulrich Drepper 7c11c4a146 (do_release_all): Add __libc_freeres_fn_section. 2004-08-04 21:58:10 +00:00
Ulrich Drepper 40962f02f9 (handle_request): Missing _() in last patch. 2004-08-04 06:40:00 +00:00
Ulrich Drepper 0532e21bad Update.
2004-08-03  Ulrich Drepper  <drepper@redhat.com>

	* nscd/connections.c (handle_request): Print more descriptive
	message for invalid request types.
2004-08-04 06:25:42 +00:00
Ulrich Drepper dc630ccc08 Update.
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.
2004-07-27 22:52:49 +00:00
Ulrich Drepper a29015c344 (cache_addpw): If necessary, add entry also under the name the user provided. 2004-07-27 22:51:04 +00:00
Ulrich Drepper 490998a5f2 Update.
* nscd/hstcache.c (cache_addhst): Fix two scenarios which lead to
	memory leaks.
2004-07-27 01:14:37 +00:00
Ulrich Drepper 54c36b13af Update.
2004-07-22  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd_getgr_r.c (nscd_getgr_r): Avoid read call with NULL
	pointer and zero length.
2004-07-23 06:09:22 +00:00
Ulrich Drepper f3063fc72b (prune_cache): Print correct list when debugging. 2004-07-22 01:47:28 +00:00
Ulrich Drepper 99bb9f426f Update.
2004-07-18  Ulrich Drepper  <drepper@redhat.com>

	* nscd/pwdcache.c (cache_addpw): Optimize case of unsuccessful
	lookup a bit.
	* nscd/grpcache.c (cache_addgr): Likewise.
	* nscd/hstcache.c (cache_addhst): Likewise.
2004-07-18 18:24:30 +00:00
Ulrich Drepper 9b9ef82358 Update.
2004-07-05  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/powerpc/novmx-longjmp.c (__libc_longjmp,
	__libc_siglongjmp): Remove symbol_version.
	* sysdeps/powerpc/longjmp.c (__libc_longjmp, __libc_siglongjmp):
	Export @@GLIBC_PRIVATE, not @@GLIBC_2.3.4.
	* sysdeps/powerpc/sigjmp.c (__sigjmp_save): Use strong_alias
	unconditionally.
	* sysdeps/powerpc/novmx-sigjmp.c (__sigjmp_save): Remove.
	* sysdeps/powerpc/powerpc32/__longjmp.S (__longjmp): Use
	strong_alias instead of default_symbol_version, remove
	symbol_version.
	* sysdeps/powerpc/powerpc64/__longjmp.S (__longjmp): Likewise.
	* sysdeps/powerpc/powerpc32/bsd-setjmp.S (__novmx__setjmp): Change
	into strong_alias to __novmxsetjmp.
	(__vmx__setjmp): Similarly with __vmxsetjmp.
	(__setjmp): Make it strong_alias to __vmx__setjmp, remove
	default_symbol_version and symbol_version.
	* sysdeps/powerpc/powerpc64/bsd-setjmp.S (__novmx__setjmp): Change
	into strong_alias to __novmxsetjmp.
	(__vmx__setjmp): Similarly with __vmxsetjmp.
	(__setjmp): Make it strong_alias to __vmx__setjmp, remove
	default_symbol_version and symbol_version.

	* nscd/nscd_getgr_r.c: Include stdio-common/_itoa.h.
2004-07-05 17:09:54 +00:00
Ulrich Drepper 482bbeb905 Update.
* nscd/connections.c (invalidate_cache): If the host cache has to
	be invalidated, re-read resolv.conf.
2004-06-28 04:42:05 +00:00
Ulrich Drepper 40c38b6c9d Update.
2004-06-05  Ulrich Drepper  <drepper@redhat.com>

	* stdio-common/_itoa.h: Don't expand _itoa inline for libc.
	* stdio-common/_itoa.c: Add _itoa implementation.

	* nscd/nscd_gethst_r.c (__nscd_open_socket): Change implementation
	to also send request.  Add parameter to allow this.
	Change callers.
	* nscd/nscd_getgr_r.c: Change __nscd_open_socket caller.
	* nscd/nscd_getpw_r.c: Likewise.
	* nscd/nscd-client.h: Change __nscd_open_socket prototype.
2004-06-06 06:06:02 +00:00
Ulrich Drepper 29762ba617 Update.
2004-06-04  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd_gethst_r.c (nscd_gethst_r): Use __nss_not_use_nscd_hosts
	in all places, not __nss_not_use_nscd_group.
	Reported by Philippe Gregoire.
2004-06-04 18:29:42 +00:00
Ulrich Drepper 16aac66378 Update.
* nscd/nscd_getgr_r.c (nscd_getgr_r): Add missing initialization
	of return value.
	* nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise.
2004-03-01 22:35:28 +00:00
Ulrich Drepper 261eada2ca Update.
2004-02-26  Ulrich Drepper  <drepper@redhat.com>

	* nss/getXXbyYY_r.c: Pass result also to the nscd_* function.  Don't
	set *result here.
	* nscd/nscd_proto.h: Add new argument for pointer to result pointer
	to all nscd_* functions.
	* nscd/nscd_getgr_r.c (nscd_getgr_r): Add new parameter.  Store result
	pointer in the address provided by the new parameter if successful.
	Otherwise store NULL.  Return zero if no entry found.
	(__nscd_getgrnam_r, __nscd_getgrgid_r): Add new parameter and pass
	it on.
	* nscd/nscd_gethst_r.c (nscd_gethst_r): Add new parameter.  Store
	result pointer in the address provided by the new parameter if
	successful. Otherwise store NULL.  Return zero if no entry found.
	(__nscd_gethostbyname_r, __nscd_gethostbyname2_r,
	__nscd_gethostbyaddr_r): Add new parameter and pass it on.
	* nscd/nscd_getpw_r.c (nscd_getpw_r): Add new parameter.  Store result
	pointer in the address provided by the new parameter if successful.
	Otherwise store NULL.  Return zero if no entry found.
	(__nscd_getpwnam_r, __nscd_getpwuid_r): Add new parameter and pass
	it on.
2004-02-27 00:55:39 +00:00
Ulrich Drepper 230c3e1e54 Update.
2004-02-20  Thorsten Kukuk  <kukuk@suse.de>

	* nscd/nscd.c (termination_handler): Use _exit instead of exit

	* nscd/nscd.c (main): Report fork errors.
2004-02-21 01:57:26 +00:00
Ulrich Drepper ec1c80750d Update.
2004-02-18  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd_conf.c: Include <stdio_ext.h>.
2004-02-18 18:07:21 +00:00
Ulrich Drepper f404736684 [BZ #18]
Update.
	* nscd/nscd_conf.c (nscd_parse_file): Little optimization.

2004-02-14  Thorsten Kukuk  <kukuk@suse.de>

	* nscd/dbg_log.c (set_logfile): Only save name of logfile,
	don't open it.
	(init_logfile): New function, open logfile if requested.
	* nscd/dbg_log.h: Adjust protoype for set_logfile, add init_logfile.
	* nscd/nscd.c (main): Call init_logfile after forking in background.
	* nscd/nscd_conf.c (nscd_parse_file): Adjust for new set_logfile.

2004-02-16  Ulrich Drepper  <drepper@redhat.com>

	ld.so.preload is not present [BZ #18].
2004-02-17 05:16:49 +00:00
Ulrich Drepper 8e597a18bd Update copyright year. 2004-01-01 20:42:01 +00:00
Ulrich Drepper 520ec963af Update.
* inet/rcmd.c: Provide better error message in case of unknown
	host.  Remove USE_IN_LIBIO.

	* nscd/nscd.init: Updated version, more conforming with current
	init file standards.

	* nscd/nscd-client.h (_PATH_NSCDPID): Move the file into
	/var/run/nscd directory.
	(_PATH_NSCDSOCKET): Likewise.

	* test-skeleton.c (timeout_handler): Fix error message.
2003-12-31 21:44:08 +00:00
Ulrich Drepper 0f124303c8 Update.
2003-09-24  Jakub Jelinek  <jakub@redhat.com>

	* nscd/Makefile (others): Add nscd before including ../Rules.
2003-09-24 17:38:32 +00:00
Ulrich Drepper df244a7b4d Update.
* nscd/Makefile: Add rules to build nscd as a PIE.

2003-09-23  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/sys/alpha/sysmacros.h: Removed.
	* sysdeps/unix/sysv/linux/sys/sparc/sysmacros.h: Removed.
	* sysdeps/unix/sysv/linux/ustat.c (ustat): Adjust for 32-bit
	kernel dev_t.
	* sysdeps/unix/sysv/linux/alpha/ustat.c: Removed.
	* sysdeps/unix/sysv/linux/xmknod.c (__xmknod): Likewise.
	* sysdeps/unix/sysv/linux/alpha/xmknod.c: Removed.
	Code by Alexander Viro <aviro@redhat.com>.
2003-09-24 06:12:33 +00:00
Ulrich Drepper 9b995718ae Update.
2003-09-12  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
	(__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
	__SLONGWORD_TYPE otherwise.

2003-09-14  Ulrich Drepper  <drepper@redhat.com>

	* io/Makefile (CFLAGS-ftw.c): Add -fexceptions.
	(CFLAGS-ftw64.c): Likewise.

2003-09-13  Ulrich Drepper  <drepper@redhat.com>

	* nscd/Makefile (CFLAGS-nscd_getpw_r.c): Add -fexceptions.
	(CFLAGS-nscd_getgr_r.c): Likewise.
	(CFLAGS-nscd_gethst_r.c): Likewise.
2003-09-14 08:03:54 +00:00
Ulrich Drepper a12ce44f69 Update.
2003-05-03  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd.c (main): Parse config file right after parsing
	parameters.  Then, if get_stats is true, call receive_print_stats.
	Drop parameter from nscd_init call.
	(get_stats): New variable.
	(parse_opt): Set get_stats, don't call receive_print_stats here.
	* nscd/nscd.h: Declare dbs, stat_user, and stat_uid.  Adjust nscd_init
	prototype.
	* nscd/connections.c (stat_user, stat_uid): New variables.
	(dbs): Make global.
	(nscd_init): Don't read configuration file here.  Drop parameter.
	(handle_request): Cleanup handling of non-database lookup requests.
	* nscd/nscd_conf.c (nscd_parse_file): Recognize stat-user entry.
	Get UID of the specified user.  Use xstrdup instead of strdup.
	* nscd/nscd_stat.c (receive_print_stats): Check UID.  If not zero,
	check stat_user.
	* nscd/Makefile (nscd-modules): Add xstrdup.
	* nscd/nscd.conf: Document stat-user entry.

2003-05-03  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h (__NR_semtimedop): Define
	if not defined.
2003-05-04 07:00:44 +00:00
Ulrich Drepper 12c8051397 Update.
2003-04-28  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd_getgr_r.c: Compact code a bit.  Add some __builtin_expect.
	* nscd/nscd_getpw_r.c: Likewise.
	* nscd/nscd_gethst_r.c: Likewise.
2003-04-28 08:17:29 +00:00
Ulrich Drepper fe45381231 Update.
2003-04-27  Ulrich Drepper  <drepper@redhat.com>

	* nscd/pwdcache.c: Initialize .version element in result.
	* nscd/grpcache.c: Likewise.
	* nscd/pwdcache.c: Likewise.
2003-04-28 05:30:22 +00:00
Ulrich Drepper a16e35856a Update.
* nscd/connections.c (client_queued): New variable.
	(nscd_run): Revamp the loop.  Don't call poll except for cleanup
	threads.  Keep track of the number of delays caused because of busy
	worker threads.
	* nscd/nscd.h: Declare client_queued.
	* nscd/nscd_stat.c: Transmit and print client_queued information.
2003-04-28 03:40:26 +00:00
Ulrich Drepper 0fdb4f42e4 (client_queued): New variable. (nscd_run): Revamp the loop. Don't call poll except for cleanup threads. Keep track of the number of delays caused because of busy worker threads. 2003-04-28 02:43:30 +00:00
Ulrich Drepper c86e6aec55 Update.
* nscd/cache.c (cache_search): Keep track of how many chain links
	we searched and update table statistics.
	(cache_add): Keep track of how many values are in the table.
	(prune_cache): Likewise.  Keep track of locking success.
	Print messages about removed entries in separate pass.
	* nscd/connections.c (handle_request): Don't print debug message here.
	The caller will do it.  Keep track of locking success.
	(nscd_run): Print debug message.  Also print PID of the client process.
	* nscd/nscd.c (start_time): New variable.
	(main): Remember start time.
	* nscd/nscd.h: Declare start_time.
	(struct database): Add more members for new statistics.
	* nscd/nscd_stat.c: Add support for sending, receiving, and printing
	of new statistics.
2003-04-26 04:15:50 +00:00
Ulrich Drepper 4c5dd2a207 Update.
2003-04-22  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd-client.h: Add declaration for __nscd_open_socket.
	* nscd/nscd_gethst_r.c (__nscd_open_socket): Renamed from
	open_socket.  Not static anymore.
	(nscd_gethst_r): Use __nscd_open_socket.
	* nscd/nscd_getgr_r.c (open_socket): Removed.
	(nscd_getgr_r): Use __nscd_open_socket.
	* nscd/nscd_getpw_r.c (open_socket): Removed.
	(nscd_getpw_r): Use __nscd_open_socket.

	* nscd/nscd.c (main): Change type of fdn to long int and use strtol.
	* nscd/connections.c (handle_request): Add cast to avoid warning.
2003-04-22 19:52:59 +00:00
Ulrich Drepper ef4d5b32b3 Update.
2003-04-17  Ulrich Drepper  <drepper@redhat.com>

	* nss/getXXbyYY_r.c [USE_NSCD] (REENTRANT_NAME): Only retry
	contacting nscd if NOT_USENSCD_NAME > 0.
	* nss/nsswitch.c (__nss_disable_nscd): New function.
	* nss/nsswitch.h: Declare it.
	* nss/Versions [GLIBC_PRIVATE]: Export __nss_disable_nscd.
	* nscd/nscd.c (main): Call __nss_disable_nscd.
2003-04-17 08:42:06 +00:00
Ulrich Drepper 5a3ab2fc18 Update.
2003-03-21  Ulrich Drepper  <drepper@redhat.com>

	* cancellation.c: Adjust for new form of compare&exchange macros.
	* cleanup_defer.c: Likewise.
	* init.c: Likewise.
	* libc-cancellation.c: Likewise.
	* old_pthread_cond_broadcast.c: Likewise.
	* old_pthread_cond_signal.c: Likewise.
	* old_pthread_cond_timedwait.c: Likewise.
	* old_pthread_cond_wait.c: Likewise.
	* pthread_cancel.c: Likewise.
	* pthread_create.c: Likewise.
	* pthread_detach.c: Likewise.
	* pthread_join.c: Likewise.
	* pthread_key_delete.c: Likewise.
	* pthread_setcancelstate.c: Likewise.
	* pthread_setcanceltype.c: Likewise.
	* pthread_timedjoin.c: Likewise.
	* pthread_tryjoin.c: Likewise.
	* sysdeps/pthread/createthread.c: Likewise.
2003-03-21 08:03:25 +00:00
Ulrich Drepper 4009bf4044 Update.
2003-03-19  Ulrich Drepper  <drepper@redhat.com>

	* Makefile (distribute): Add include/atomic.h and bits/atomic.h.
	* include/atomic.h: New file.
	* sysdeps/i386/i486/bits/atomic.h: New file.
	* sysdeps/x86_64/bits/atomic.h: New file.
	* sysdeps/s390/bits/atomic.h: New file.
	* sysdeps/sh/bits/atomic.h: New file.
	* sysdeps/ia64/bits/atomic.h: New file.
	* sysdeps/powerpc/bits/atomic.h: New file.
	* sysdeps/generic/bits/atomic.h: New file.
	* sysdeps/i386/i486/atomicity.h: Removed.
	* sysdeps/x86_64/atomicity.h: Removed.
	* sysdeps/s390/s390-32/atomicity.h: Removed.
	* sysdeps/s390/s390-64/atomicity.h: Removed.
	* sysdeps/ia64/atomicity.h: Removed.
	* sysdeps/powerpc/powerpc32/atomicity.h: Removed.
	* sysdeps/powerpc/powerpc64/atomicity.h: Removed.
	* elf/dl-profile.c: Use atomic.h instead of atomicity.h.  Adjust
	use of macros from atomicity.h to new names and semantics.
	* gmon_mcount.c: Likewise.
	* malloc/set-freeres.c: Likewise.
	* nscd/cache.c: Likewise.
	* stdlib/cxa_finalize.c: Likewise.
	* sysdeps/unix/sysv/linux/getsysstats.c: Likewise.

	* sysdeps/mips/ieee754.h: New file, suitable to replace both
	* stdlib/strtod.c (INTERNAL): While eating trailing zeros handle
2003-03-20 07:19:17 +00:00
Roland McGrath eb64f8cbe3 * posix/fnmatch_loop.c: Add casts for signedness.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise.
	* gmon/gmon.c (write_call_graph): Use u_long for FROM_LEN.
	* nscd/nscd_getgr_r.c (nscd_getgr_r): Use nscd_ssize_t for CNT.
2003-03-16 03:22:41 +00:00
Roland McGrath 638bb1f394 * nscd/cache.c (cache_search): Give first arg type `request_type'.
* nscd/nscd.h: Update decl.

	* nscd/nscd_getpw_r.c (nscd_getpw_r): Add casts for signedness.
	* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
	* elf/dl-close.c (_dl_close): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/chown.c (__chown): int -> size_t
	* io/fts.c (fts_build): Likewise.
	* elf/cache.c (add_to_cache): Likewise.
	* locale/programs/locarchive.c (show_archive_content): Likewise.

	* posix/fnmatch.c (fnmatch): Tweak __builtin_expect use.

	* include/ctype.h (__ctype_b_loc): Tweak type punning to make gcc 3.3
	happy.
	(__ctype_toupper_loc, __ctype_tolower_loc): Likewise.
2003-03-16 01:04:03 +00:00
Ulrich Drepper e09edf23c2 Update.
* nscd/connections.c (nscd_run): Remove bogus return which isn't
	necessary with gcc 3.2+.
	(nscd_init): Don't use error() to print message, use dbg_log.
2003-01-16 07:54:50 +00:00
Ulrich Drepper 282c00a71a (nscd_run): Protect accept with TEMP_FAILURE_RETRY. 2003-01-15 22:57:20 +00:00
Ulrich Drepper d439762939 Update.
* nscd/nscd.c (main): Make code to close all file descriptors
	faster and more robust.
2003-01-15 19:52:59 +00:00
Ulrich Drepper 9caf4f1c67 Update.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Consolidate writing of the
	request with one writev call.  Protect all read calls with
	TEMP_FAILURE_RETRY.
	* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
	* nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise.

	* nscd/hstcache.c: Use extend_alloca to reallocate alloca'd buffer.
	Protect writev calls with TEMP_FAILURE_RETRY.
	* nscd/grpcache.c: Likewise.
	* nscd/pwdcache.c: Likewise.
2003-01-15 10:52:50 +00:00
Ulrich Drepper 0949246f1f (addhstbynamev6): Don't interpret hostname as IPv6 address in debug output. 2003-01-15 09:54:58 +00:00
Ulrich Drepper b0c9067d7b Update.
2003-01-02  Art Haas  <ahaas@airmail.net>

	* login/tst-utmp.c: Convert GCC extension initializer syntax to C99.

2003-01-02  Ulrich Drepper  <drepper@redhat.com>

	* posix/getconf.c: Update copyright year.
	* nss/getent.c: Likewise.
	* nscd/nscd_nischeck.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* catgets/gencat.c: Likewise.
	* csu/version.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* debug/xtrace.sh: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/mtrace.pl: Likewise.

	* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Use union
	type to avoid strict aliasing problem.
	(_nss_dns_gethostbyname2_r): Likewise.
	* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise.
	(_nss_dns_getnetbyname_r): Likewise.
2003-01-02 20:32:33 +00:00
Ulrich Drepper 74e8f2dcaa Update.
2002-12-19  Jakub Jelinek  <jakub@redhat.com>

	* nscd/connections.c (nscd_run): Shut up warning.
	* tst-ungetc.c (assert): Undefined before redefining.

2002-12-19  Ulrich Drepper  <drepper@redhat.com>

	* posix/regex.c: Use __builtin_expect even outside glibc if gcc 3
	is used.

2002-12-17  Art Haas  <ahaas@airmail.net>

	* iconvdata/cp737.h: Convert GCC extension initializer syntax to C99.
	* iconvdata/cp775.h: Likewise.
	* iconvdata/ibm1046.h: Likewise.
	* iconvdata/ibm1124.h: Likewise.
	* iconvdata/ibm1129.h: Likewise.
	* iconvdata/ibm1132.h: Likewise.
	* iconvdata/ibm1133.h: Likewise.
	* iconvdata/ibm1160.h: Likewise.
	* iconvdata/ibm1161.h: Likewise.
	* iconvdata/ibm1162.h: Likewise.
	* iconvdata/ibm1163.h: Likewise.
	* iconvdata/ibm1164.h: Likewise.

	(__ASSUME_CLONE_THREAD_FLAGS): Define for x86 and kernel >= 2.5.50.
2002-12-19 09:18:01 +00:00
Roland McGrath c2e131128b * sysdeps/unix/sysv/linux/readv.c (do_readv): Use prototype defn.
* sysdeps/unix/sysv/linux/wait.c: Don't include <nptl/pthreadP.h> or
	<tls.h> here, no need for it.
	* sysdeps/unix/sysv/linux/waitpid.c: Likewise.

	* sysdeps/unix/sysv/linux/i386/fcntl.c (do_fcntl): Take ARG as void *
	parameter, not varargs parameter.

	* sysdeps/generic/sysdep-cancel.h (LIBC_CANCEL_RESET): Evaluate the
	argument so it's not an unused variable.

	* resolv/resolv.h (__p_key_syms, __p_cert_syms, __p_class_syms,
	__p_type_syms, __p_rcode_syms): Remove decls, never really intended
	for users.

	* resolv/Versions (libresolv: GLIBC_2.3.2): New set, add __p_rcode.

2002-12-15  Art Haas  <ahaas@airmail.net>

	* nscd/connections.c: C99 initializer conversion.
	* nscd/grpcache.c: Same.
	* nscd/hstcache.c: Same.
	* nscd/pwdcache.c: Same.
2002-12-15 23:23:24 +00:00
Roland McGrath 0a951d0e31 * cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Variable removed.
instead of += to append, to be sure $(lib) gets expanded at defn time.
	(libof-$(cpp-src)): New variable, define this instead.
	* extra-lib.mk (cpp-srcs-left): Reduce duplication in include setup.
	(lib): Don't use override.
	(CPPFLAGS-$(lib)): New variable, put -D's here.
	* Makeconfig (CPPFLAGS): Use basename fn for CPPFLAGS-basename.
	Also add $(CPPFLAGS-LIB) before the file-specific flags, for each
	LIB found by $(libof-*) for basename, target, or source.
	* Makerules (CPPFLAGS-nonlib): New variable.
	* nscd/Makefile (lib): Set to nonlib when using cppflags-iterator.mk.
	* locale/Makefile (lib): Likewise.
	* sunrpc/Makefile (lib): Likewise.

	* sysdeps/unix/sysv/linux/fpathconf.c (LINUX_LINK_MAX): Move macro ...
	* sysdeps/unix/sysv/linux/linux_fsinfo.h (LINUX_LINK_MAX): ... here.
	* sysdeps/unix/sysv/linux/pathconf.h: New file.
	(statfs_link_max): New function, guts from fpathconf.c.
	* sysdeps/unix/sysv/linux/fpathconf.c: Rewritten using that.
	* sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
	* sysdeps/unix/sysv/linux/alpha/pathconf.c (__pathconf): Rewritten
	to use the linux/pathconf.c code by #include rather than duplication.
	* sysdeps/unix/sysv/linux/alpha/fpathconf.c (__pathconf): Likewise.

2002-10-16  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
	Use __libc_errno only for libc itself.
2002-10-16 22:09:55 +00:00
Roland McGrath 160bb40945 * csu/Versions: Use %include <tls.h> to get USE_TLS defined.
(libc: GLIBC_2.0) [USE_TLS && HAVE___THREAD]: Remove _errno, errno.
	(libc: GLIBC_2.3) [USE_TLS && HAVE___THREAD]: Put errno here instead.
	* resolv/Versions: Use %include <tls.h> to get USE_TLS defined.
	(libc: GLIBC_2.0) [USE_TLS && HAVE___THREAD]: Remove _h_errno, h_errno,
	and _res.
	(libc: GLIBC_2.3) [USE_TLS && HAVE___THREAD]: Put h_errno, _res here.

	* elf/tls-macros.h [__x86_64__] (TLS_LE, TLS_IE, TLS_LD, TLS_GD):
	New macros for x86-64.

	* sysdeps/unix/sysv/linux/alpha/bits/time.h: File removed.
	It was indentical to the linux/bits/time.h file.

	* nscd/nscd_gethst_r.c (nscd_gethst_r): Add a cast to silence warning.

	* resolv/gethnamaddr.c (gethostbyaddr): Use socklen_t for SIZE.
2002-09-25 01:58:37 +00:00
Roland McGrath 57b36a0a75 * catgets/open_catalog.c (__open_catalog): Don't use a value type
as the __builtin_expect expression, just the Boolean value.

	* sysdeps/generic/wordexp.c (parse_glob): int -> size_t for counter.
	* sysdeps/unix/sysv/linux/opensock.c (__opensock): Likewise.
	* resolv/res_hconf.c (arg_service_list, parse_line): Likewise.
	* iconvdata/tst-loading.c (main): Likewise.
	* catgets/tst-catgets.c (main): Likewise.
	* stdlib/tst-xpg-basename.c (main): Likewise.
	* stdlib/tst-bsearch.c (main): Likewise.
	* stdio-common/test-vfprintf.c (main): Likewise.
	* stdio-common/tst-rndseek.c (do_test): Likewise.
	* libio/tst_swprintf.c (main): Likewise.
	* libio/tst-fgetws.c (main): Likewise.
	* wcsmbs/tst-mbrtowc.c (check_ascii): Likewise.
	* time/tst-posixtz.c (main): Likewise.
	* time/tst-strptime.c (test_tm): Likewise.
	* time/tst-strptime.c (main): Likewise.
	* time/tst-getdate.c (main): Likewise.
	* posix/tst-mmap.c (main): Likewise.
	* posix/tst-getaddrinfo.c (do_test): Likewise.
	* io/tst-getcwd.c (do_test): Likewise.
	* resolv/tst-aton.c (main): Likewise.
	* inet/tst-network.c (main): Likewise.
	* libio/tst-fgetws.c (main): Likewise.
	* sysdeps/posix/sprofil.c (add_region): int -> unsigned int for I.
	* sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): int -> unsigned int
	for PTYNO.

	* stdlib/msort.c (qsort): Add a cast to silence warning.
	* stdio-common/vfprintf.c (process_string_arg): Likewise.
	* libio/oldfileops.c (_IO_old_do_write): Likewise.
	* sysdeps/unix/sysv/linux/getcwd.c (__getcwd): Likewise.
	* sysdeps/unix/sysv/linux/ttyname.c (ttyname): Likewise.
	* sysdeps/unix/sysv/linux/gethostid.c (gethostid): Likewise.
	* argp/argp-fmtstream.c (__argp_fmtstream_printf): Likewise.
	* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
	* sysdeps/unix/grantpt.c (grantpt): Likewise.
	* libio/tst-widetext.c (main): Likewise.
	* libio/tst-mmap2-eofsync.c (do_test): Likewise.
	* rt/tst-aio.c (test_file): Likewise.
	* rt/tst-aio64.c (test_file): Likewise.
	* resolv/tst-aton.c (main): Likewise.

	* catgets/catgetsinfo.h (CATGETS_MAGIC): Use U suffix on the constant.

	* ctype/ctype.c (__ctype_tolower, __ctype_toupper): Cast to int32_t
	instead of uint32_t in these macros.
2002-09-24 04:24:25 +00:00
Roland McGrath 0d35c2426d * sysdeps/generic/dl-environ.c (unsetenv): Rewritten using strncmp,
no longer wrongly matches arbitrary prefixes of NAME.
	Reported by Jakub Jelinek <jakub@redhat.com>.

2002-09-11  Jakub Jelinek  <jakub@redhat.com>

	* posix/bug-regex11.c (tests): New array.
	(main): Rewritten to run more different tests.

	* nscd/Makefile (CPPFLAGS-nscd, CPPFLAGS-nscd_conf, CPPFLAGS-dbg_log)
	(CPPFLAGS-connections, CPPFLAGS-hstcache): Variables removed.
	Instead, catch all of $(nscd-modules) via cppflags-iterator.mk.
2002-09-11 22:04:32 +00:00
Roland McGrath be3c40b627 2002-09-04 Bruno Haible <bruno@clisp.org>
* elf/readlib.c (process_file): Conditionalize check for QMAGIC.

	* sysdeps/unix/sysv/linux/sigset-cvt-mask.h (sigset_set_old_mask,
	sigset_get_old_mask): Turn into inline functions.
	* sysdeps/unix/sysv/aix/sigset-cvt-mask.h (sigset_set_old_mask,
	sigset_get_old_mask): Likewise.
	* sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h (sigset_set_old_mask,
	sigset_get_old_mask): Likewise.

	* sysdeps/generic/_strerror.c (_sys_errlist, _sys_nerr): Remove
	default definitions.
	(__strerror_r): Use _sys_errlist_internal instead of _sys_errlist,
	_sys_nerr_internal instead of _sys_nerr.

	* nscd/connections.c (handle_request): Declare CALLER inside #if.
2002-09-05 18:52:18 +00:00
Ulrich Drepper 26c91f01fa Update.
* nscd/hstcache.c (cache_addhst): Add new parameter saying whether
	entry was for getaddr* lookup or not.  Add only matching cache
	entry.  Change all callers [PR libc/4317].

	* libio/bug-rewind.c: Fix creation of temp file.
2002-08-26 08:40:21 +00:00
Ulrich Drepper 3ba06713f8 Update.
2002-08-04  Jakub Jelinek  <jakub@redhat.com>

	* manual/debug.texi: Fix spelling to programmatically.
	Reported by <hayastan132@hotmail.com>.

	* include/libio.h: Add libc_hidden_proto for __uflow.
	* include/stdio.h: Map fopen, fdopen, fclose, fputs, fsetpos, and
	fgetpos to _IO_* names.
	Add libc_hidden_proto for fileno, fwrite, fseek, fflush_unlocked,
	fread_unlocked, fwrite_unlocked, fgets_unlocked, fputs_unlocked.
	* include/wchar.h: Add libc_hidden_proto for fputws_unlocked,
	putwc_unlocked, vswscanf.
	* libio/iolibio.h: Add libc_hidden_proto for _IO_fputs.
	* libio/fileno.c: Use <stdio.h> and libc_hidden_def.
	* libio/fseek.c: Likewise.
	* libio/fmemopen.c: Include "libioP.h".  Call _IO_fopencookie and
	not fopencookie.
	* libio/genops.c (__uflow): Add libc_hidden_def.
	* libio/iofflush_u.c (fflush_unlocked): Likewise.
	* libio/iofgets_u.c (fgets_unlocked): Likewise.
	* libio/iofputs_u.c (fputs_unlocked): Likewise.
	* libio/iofputws_u.c (fputws_unlocked): Likewise.
	* libio/iofread_u.c (fread_unlocked): Likewise.
	* libio/iofwrite_u.c (fwrite_unlocked): Likewise.
	* libio/iovswscanf.c (vswscanf): Likewise.
	* libio/putwc_u.c (putwc_unlocked): Likewise.
	* libio/iofputs.c: Use libc_hidden_def instead of INTDEF.
	* malloc/malloc.c: Redirect fwrite calls to _IO_fwrite.
	* malloc/mtrace.c: Likewise.

	* sunrpc/clnt_perr.c: Remove fputs macro.
	* sunrpc/svc_simple.c: Likewise.
	* sunrpc/svc_tcp.c: Likewise.
	* sunrpc/svc_udp.c: Likewise.
	* sunrpc/xdr_rec.c: Likewise.
	* sunrpc/xdr_ref.c: Likewise.

	* iconv/Makefile: Add CPPFLAGS definitions with -DNOT_in_libc for
	iconv_prog, linereader, and charmap-dir.
	* locale/Makefile: Likewise for locale and charmap-dir.
	* malloc/Makefile: Likewise for memusagestat.
	* nscd/Makefile: Likewise for nscd, nscd_conf, and dbg_log.
	* sunrpc/Makefile: Likewise for rpc_main.
	* sysdeps/unix/sysv/linux/Makefile: Likewise for lddlibc4.
	* timezone/Makefile: Likewise for zic.

	* stdio-common/perror.c: Avoid multiple calls to fileno_unlocked.
2002-08-04 20:54:20 +00:00
Ulrich Drepper 51d46f733a Update.
2002-07-25  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/wordsize-32/divdi3.c: Define __divdi3_internal.
	* sysdeps/wordsize-32/lldiv.c: Make gcc use __divdi3_internal instead
	of __divdi3.

	* sysdeps/unix/sysv/linux/adjtime.c: Use __adjtimex_internal.
	* sysdeps/unix/sysv/linux/ntp_gettime.c: Likewise.
	* sysdeps/unix/sysv/linux/syscalls.list: Add __adjtimex_internal
	alias for adjtimex syscall.

	* elf/dl-minimal.c: Define __assert_fail_internal.
	* assert/assert.c: Likewise.
	* include/assert.h: Define __assert_file macro if !SHARED and not
	NOT_IN_libc.

	* iconv/Makefile: Define NOT_IN_libc for objects in standalone
	programs.
	* locale/Makefile: Likewise.
	* nscd/Makefile: Likewise.
	* catgets/Makefile: Likewise.

	succesful seek call.  Simplify error checking.
2002-07-25 08:19:59 +00:00