Ulrich Drepper [Mon, 10 Dec 2007 01:43:40 +0000 (01:43 +0000)]
[BZ #5424, BZ #5428, BZ #5451]
2007-12-08 Ulrich Drepper <drepper@redhat.com>
[BZ #5424]
* stdio-common/vfprintf.c: Do not overflow when adding to done.
* stdio-common/Makefile (tests): Add bug22.
* stdio-common/bug22.c: New file.
[BZ #5451]
* time/getdate.c: Fix filling in default values.
* time/bug-getdate1.c: New file.
* time/Makefile: Add rules to build and run bug-getdate1.
Ulrich Drepper [Sun, 25 Nov 2007 21:08:01 +0000 (21:08 +0000)]
* nscd/nscd.h (MAX_STACK_USE): Define.
* nscd/mem.c (MAX_STACK_USE): Remove definition here.
(gc): Initialize stack_used based on allocation in prune_cache.
* nscd/cache.c (prune_cache): Use heap for mark array if necessary.
Clear array bfore use.
* nscd/aicache.c (addhstaiX): Update statistics counter in case
memory allocate failed.
Ulrich Drepper [Fri, 23 Nov 2007 06:37:58 +0000 (06:37 +0000)]
[BZ #5382]
* nscd/nscd.h (NSCD_THREAD_STACKSIZE): Define.
* nscd/connections.c (start_threads): Use NSCD_THREAD_STACKSIZE.
* nscd/mem.c (gc): Don't allocate arrays on stack if it can
overflow it.
* sysdeps/unix/sysv/linux/nscd_setup_thread.c (setup_thread):
Return zero in case thread library is not NPTL.
Ulrich Drepper [Fri, 23 Nov 2007 02:36:37 +0000 (02:36 +0000)]
[BZ #5378]
* nis/nss_compat/compat-initgroups.c (getgrent_next_nss): Don't
use result of nss_getgrgid_r if nothing was found. For other
error return with a failure.
Partially based on a patch by Petr Baudis <pasky@suse.cz>.
Ulrich Drepper [Sat, 17 Nov 2007 07:37:47 +0000 (07:37 +0000)]
[BZ #5346]
2007-11-15 Bruno Haible <bruno@clisp.org>
[BZ #5346]
* intl/dcigettext.c (struct known_translation_t): Turn msgid into a
union.
(transcmp): Use the appropriate part of s1->msgid and s2->msgid.
(DCIGETTEXT): Change the allocation of the 'search' variable so that
it needs only fixed stack space. Delay the initialization of
msgid_len until it is needed.
Ulrich Drepper [Sat, 17 Nov 2007 07:37:30 +0000 (07:37 +0000)]
(struct known_translation_t): Turn msgid into a union. (transcmp): Use the appropriate part of s1->msgid and s2->msgid. (DCIGETTEXT): Change the allocation of the 'search' variable so that it needs only fixed stack space. Delay the initialization of msgid_len until it is needed.
Ulrich Drepper [Wed, 14 Nov 2007 06:58:35 +0000 (06:58 +0000)]
* include/ifaddrs.h: Remove in6ai_temporary.
(struct in6addrinfo): Add index element.
Declare __check_native.
* inet/Makefile (aux): Add check_native.
* sysdeps/unix/sysv/linux/check_native.c: New file.
* sysdeps/unix/sysv/linux/check_pf.c: No need to recognize
IFA_F_TEMPORARY. Pass back ifa_index.
* sysdeps/posix/getaddrinfo.c: Remove netlink compatibility code.
(rfc3484_sort): Add new parameter. Implement rule 7 correctly:
call __check_native if necessary.
(getaddrinfo): Fill in index field. Use qsort_r instead of qsort
to sort addresses. Pass information about the results.
* posix/tst-rfc3484.c: Adjust for addition of index field and change
of rfc3484_sort interface.
* posix/tst-rfc3484-2.c: Likewise.
* include/stdlib.h: Add hidden_proto for qsort_t and adjust protoype
for _quicksort.
* stdlib/msort.c (qsort): Now a wrapper around qsort_r.
(qsort_r): Renamed from qsort. Take additional parameter and pass it
on as third parameter to compare function and _quicksort.
* stdlib/qsort.c (_quicksort): Take additional parameter and pass on
to the compare function.
* stdlib/Versions [libc] (GLIBC_2.8): Add qsort_r.
* Versions.def: Add GLIBC_2.8 for libc.
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Always return
list of interfaces. Also store prefix length.
* sysdeps/posix/getaddrinfo.c (sort_result): Add prefixlen element.
(rfc3484_sort): In rule 9, for IPv4 addresses count only matching
prefix if source and destination address are in the same subnet.
(getaddrinfo): Always call __check_pf. Fill in prefixlen field.
Always look for matching record in in6ai list.
Correct source_addr_len value for IPv6->IPv4 converted records.
* sysdeps/unix/sysv/linux/open64_2.c: ...here. New file.
* sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines): Add
open64_2.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Add open and creat
entries.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
* sysdeps/wordsize-64/alphasort.c: New file.
* sysdeps/wordsize-64/alphasort64.c: New file.
* sysdeps/wordsize-64/fseeko.c: New file.
* sysdeps/wordsize-64/fseeko64.c: New file.
* sysdeps/wordsize-64/ftello.c: New file.
* sysdeps/wordsize-64/ftello64.c: New file.
* sysdeps/wordsize-64/ftw.c: New file.
* sysdeps/wordsize-64/ftw64.c: New file.
* sysdeps/wordsize-64/iofgetpos.c: New file.
* sysdeps/wordsize-64/iofgetpos64.c: New file.
* sysdeps/wordsize-64/iofopen.c: New file.
* sysdeps/wordsize-64/iofopen64.c: New file.
* sysdeps/wordsize-64/iofsetpos.c: New file.
* sysdeps/wordsize-64/iofsetpos64.c: New file.
* sysdeps/wordsize-64/lockf.c: New file.
* sysdeps/wordsize-64/lockf64.c: New file.
* sysdeps/wordsize-64/mkostemp.c: New file.
* sysdeps/wordsize-64/mkostemp64.c: New file.
* sysdeps/wordsize-64/mkstemp.c: New file.
* sysdeps/wordsize-64/mkstemp64.c: New file.
* sysdeps/wordsize-64/scandir.c: New file.
* sysdeps/wordsize-64/scandir64.c: New file.
* sysdeps/wordsize-64/tmpfile.c: New file.
* sysdeps/wordsize-64/tmpfile64.c: New file.
* sysdeps/wordsize-64/versionsort.c: New file.
* sysdeps/wordsize-64/versionsort64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/aio_read.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/aio_read64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/aio_write.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/aio_write64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/creat64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/lio_listio.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/lio_listio64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/open64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/openat.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/openat64.c: New file.
* crypt/sha256-crypt.c: Fix a comment.
* crypt/sha512-crypt.c: Likewise.
Ulrich Drepper [Fri, 9 Nov 2007 09:09:07 +0000 (09:09 +0000)]
[BZ #5240]
* sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
If we time out, try one last time to lock the futex to avoid
losing a wakeup signal.
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
Ulrich Drepper [Thu, 8 Nov 2007 00:04:24 +0000 (00:04 +0000)]
[BZ #5277]
2007-11-07 Ulrich Drepper <drepper@redhat.com>
[BZ #5277]
* iconv/loop.c (STANDARD_TO_LOOP_ERR_HANDLER): If conversion failed
because output buffer is too small break, don't loop.
* iconvdata/Makefile (tests): Add bug-iconv6.
* iconvdata/bug-iconv6.c: New file.
Ulrich Drepper [Tue, 6 Nov 2007 00:45:40 +0000 (00:45 +0000)]
* nscd/aicache.c (addhstaiX): Check herrno after IPv4 lookup only
when the lookup call failed.
* nscd/nscd.h (struct database_dyn): Rename prunelock to prune_lock.
Add prune_cond and wakeup_time.
(CACHE_PRUNE_INTERNAL): Define.
Update declarations of prune_cache and setup_thread.
* nscd/connections.c (dbs): Update initializers.
(CACHE_PRUNE_INTERNAL): Moved to nscd.h.
(nscd_init): Default number of threads is now 4.
(invalidate_cache): Take lock before calling prune_cache.
(handle_request): If SELinux forbids the request, say so.
(readylist_cond): Use static initializer.
(nscd_run_prune): New function. Used only by pruning threads.
(nscd_run_worder): Renamed from nscd_run. Remove support for pruning
here.
(fd_ready): Update nscd_run reference.
(start_threads): No need to initialize readylist_cond.
Start pruning threads separately.
* nscd/nscd_setup_thread.c: Change return value type to int and always
return 0.
* sysdeps/unix/sysv/linux/nscd_setup_thread.c: Change return value type
to int and return nonzero value if we can use the TID address hack.
* nscd/cache.c (cache_add): If next wakeup time of cleanup thread for
the database is later than the new entry's timeout, update the
wakeup time and wake the cleanup thread.
(prune_cache): Return seconds the next entry in the database is still
valid. Remove locking for pruning here.
* nscd/nscd.conf: Document default number of threads.
_nss_dns_getnetbyaddr2_r.
* resolv/nss_dns/dns-host.c: Define _nss_dns_getnetbyaddr2_r. Pass
extra parameter to getanswer_r.
(_nss_dns_getnetbyaddr_r): Now a wrapper around
_nss_dns_getnetbyaddr2_r.
Ulrich Drepper [Tue, 30 Oct 2007 00:48:09 +0000 (00:48 +0000)]
* nscd/Makefile (nscd-modules): Replace gethstbynm2_r with
gethstbynm3_r.
* nscd/gethstbynm2_r.c: Remove.
* nscd/gethstbynm3_r.c: New file.
* nscd/aicache.c (addhstaiX): Use __gethostbyaddr2_r instead of
__gethostbyaddr_r.
* nscd/gethstbyad_r.c: Generate __gethostbyaddr2_r function. Define
__gethostbyaddr_r compatibility wrapper.
* nscd/hstcache.c (cache_addhst): Add ttl parameter. Use it when
determining timeout of entry.
(lookup): Take new parameter and pass it to __gethostbyname3_r and
__gethostbyaddr2_r.
(addhstbyX): Pass reference to variable for TTL to lookup and
cache_addhst.
* nss/Versions [glibc] (GLIBC_PRIVATE): Export __nss_passwd_lookup2,
__nss_group_lookup2, __nss_hosts_lookup2, __nss_services_lookup2,
and __nss_next2. Remove __nss_services_lookup.
* nss/XXX-lookup.c: Name function now *_lookup2. Add new parameter.
Add compat wrapper.
* nss/getXXbyYY_r.c: Changes to call new *_lookup2 functions and
__nss_next2.
* nss/getXXent_r.c: Likewise.
* nss/getnssent_r.c: Likewise.
* nss/nsswitch.c (__nss_lookup): Add new parameter. If first function
does not exist in module, try the optional second name.
(__nss_next2): New function.
(__nss_next): Now wrapper around __nss_next2.
* nss/nsswitch.h: Adjust __nss_lookup prototype.
Declare __nss_next2.
Adjust definition of db_lookup_function type.
* nss/service-lookup.c: Define NO_COMPAT.
* include/netdb.h: Declare __gethostbyaddr2_r and __gethostbyname3_r.
* inet/ether_hton.c: Use __nss_next2 instead of __nss_next.
* inet/ether_ntoh.c: Likewise.
* sunrpc/netname.c: Likewise.
* sunrpc/publickey.c: Likewise.
* inet/getnetgrent.c: Likewise. Adjust calls to __nss_lookup.
* inet/gethstbyad_r.c (DB_LOOKUP_FCT): Change to __nss_hosts_lookup2.
* inet/gethstbynm2_r.c (DB_LOOKUP_FCT): Likewise.
* inet/gethstbynm_r.c (DB_LOOKUP_FCT): Likewise.
* inet/gethstent_r.c (DB_LOOKUP_FCT): Likewise.
* nscd/aicache.c (addhstaiX): Fix default TTL handling.
Ulrich Drepper [Sun, 28 Oct 2007 08:24:07 +0000 (08:24 +0000)]
[BZ #5222]
2007-10-28 Ulrich Drepper <drepper@redhat.com>
[BZ #5222]
* elf/dl-load.c (_dl_rtld_di_serinfo): Correct handling of short
path elements in counting mode.
Ulrich Drepper [Sun, 28 Oct 2007 01:08:55 +0000 (01:08 +0000)]
[BZ #5208]
2007-10-23 Andreas Jaeger <aj@suse.de>
[BZ #5208]
* sysdeps/unix/sysv/linux/readahead.c (__readahead): Use
__LONG_LONG_PAIR to handle little endian byte order.
Suggested by abhishekrai@google.com