From 936bb2647a835e63e99fa2d1590ab1e14aab4712 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 31 Aug 2006 06:53:32 +0000 Subject: Updated to fedora-glibc-20060831T0640 --- ChangeLog | 20 ++++++++++++++++++++ elf/dl-load.c | 20 +++++++++++++++++++- elf/dl-open.c | 7 ------- fedora/branch.mk | 4 ++-- fedora/glibc.spec.in | 8 +++++++- nptl/ChangeLog | 9 +++++++++ nptl/pthread_rwlock_trywrlock.c | 7 +++++-- nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c | 6 ++++-- nptl/sysdeps/pthread/pthread_rwlock_wrlock.c | 6 ++++-- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 3 ++- sysdeps/unix/sysv/linux/i386/bits/fcntl.h | 3 ++- sysdeps/unix/sysv/linux/ia64/bits/fcntl.h | 3 ++- sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h | 3 ++- sysdeps/unix/sysv/linux/s390/bits/fcntl.h | 3 ++- sysdeps/unix/sysv/linux/sh/bits/fcntl.h | 3 ++- sysdeps/unix/sysv/linux/sparc/bits/fcntl.h | 3 ++- sysdeps/unix/sysv/linux/syscalls.list | 2 +- sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h | 3 ++- 18 files changed, 87 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f46b1e408..a75ac8b23b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2006-08-30 Jakub Jelinek + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (splice): Add offin + and offout arguments to the prototype. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/syscalls.list (splice): Adjust args string. + +2006-08-28 Ulrich Drepper + + * elf/dl-load.c (_dl_init_paths): Expand DSTs. + + * elf/dl-open.c (dl_open_worker): Allow $LIB and $PLATFORM in + dlopen parameters. + 2006-08-28 Jakub Jelinek * inet/getnameinfo.c (getnameinfo): For AF_INET, check errno diff --git a/elf/dl-load.c b/elf/dl-load.c index 902ffc4109..36dc123c01 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -749,7 +749,25 @@ _dl_init_paths (const char *llp) { size_t nllp; const char *cp = llp; - char *llp_tmp = strdupa (llp); + char *llp_tmp; + +#ifdef SHARED + /* Expand DSTs. */ + size_t cnt = DL_DST_COUNT (llp, 1); + if (__builtin_expect (cnt == 0, 1)) + llp_tmp = strdupa (llp); + else + { + /* Determine the length of the substituted string. */ + size_t total = DL_DST_REQUIRED (l, llp, strlen (llp), cnt); + + /* Allocate the necessary memory. */ + llp_tmp = (char *) alloca (total + 1); + llp_tmp = _dl_dst_substitute (l, llp, llp_tmp, 1); + } +#else + llp_tmp = strdupa (llp); +#endif /* Decompose the LD_LIBRARY_PATH contents. First determine how many elements it has. */ diff --git a/elf/dl-open.c b/elf/dl-open.c index cdbb6601d2..8d057f82eb 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -221,13 +221,6 @@ dl_open_worker (void *a) size_t required; char *new_file; - /* DSTs must not appear in SUID/SGID programs. */ - if (INTUSE(__libc_enable_secure)) - /* This is an error. */ - _dl_signal_error (0, "dlopen", NULL, - N_("DST not allowed in SUID/SGID programs")); - - /* Determine how much space we need. We have to allocate the memory locally. */ required = DL_DST_REQUIRED (call_map, file, len, _dl_dst_count (dst, 0)); diff --git a/fedora/branch.mk b/fedora/branch.mk index 7e4461da37..32a0feccd1 100644 --- a/fedora/branch.mk +++ b/fedora/branch.mk @@ -3,5 +3,5 @@ glibc-branch := fedora glibc-base := HEAD DIST_BRANCH := devel COLLECTION := dist-fc4 -fedora-sync-date := 2006-08-28 19:03 UTC -fedora-sync-tag := fedora-glibc-20060828T1903 +fedora-sync-date := 2006-08-31 06:40 UTC +fedora-sync-tag := fedora-glibc-20060831T0640 diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index 2674d2b564..519c50d449 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -1,4 +1,4 @@ -%define glibcrelease 26 +%define glibcrelease 27 %define auxarches i586 i686 athlon sparcv9 alphaev6 %define xenarches i686 athlon %ifarch %{xenarches} @@ -1448,6 +1448,12 @@ rm -f *.filelist* %endif %changelog +* Thu Aug 31 2006 Jakub Jelinek 2.4.90-27 +- allow $LIB and $PLATFORM in dlopen parameters even in suid/sgid (#204399) +- fix splice prototype (#204530) +- fix pthread_rwlock_{,try,timed}wrlock to honor reader preference + if requested + * Mon Aug 28 2006 Jakub Jelinek 2.4.90-26 - real fix for the doubly linked list corruption problem - try harder in realloc to allocate memory (BZ#2684) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index eb4680d159..2c9c9e2732 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,12 @@ +2006-08-30 Ulrich Drepper + + * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect + reader preference. + * sysdeps/pthread/pthread_rwlock_timedwrlock.c + (pthread_rwlock_timedwrlock): Likewise. + * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): + Likewise. + 2006-08-25 Jakub Jelinek * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread): diff --git a/nptl/pthread_rwlock_trywrlock.c b/nptl/pthread_rwlock_trywrlock.c index b754a19565..63760064c5 100644 --- a/nptl/pthread_rwlock_trywrlock.c +++ b/nptl/pthread_rwlock_trywrlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -30,7 +30,10 @@ __pthread_rwlock_trywrlock (rwlock) lll_mutex_lock (rwlock->__data.__lock); - if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) + if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0 + /* Respect the preference. */ + && (rwlock->__data.__flags != 0 + || rwlock->__data.__nr_readers_queued == 0)) { rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid); result = 0; diff --git a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c index 97c0598f96..ab7bc7babb 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky , 2003. @@ -40,7 +40,9 @@ pthread_rwlock_timedwrlock (rwlock, abstime) int err; /* Get the rwlock if there is no writer and no reader. */ - if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) + if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0 + && (rwlock->__data.__flags != 0 + || rwlock->__data.__nr_readers_queued == 0)) { /* Mark self as writer. */ rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid); diff --git a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c index 822aeed79c..4d967f2496 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky , 2003. @@ -37,7 +37,9 @@ __pthread_rwlock_wrlock (rwlock) while (1) { /* Get the rwlock if there is no writer and no reader. */ - if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) + if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0 + && (rwlock->__data.__flags != 0 + || rwlock->__data.__nr_readers_queued == 0)) { /* Mark self as writer. */ rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid); diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 6084c38c91..f17dc2bdc1 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -216,7 +216,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h index 1f7ac0f25a..6de33302ee 100644 --- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h @@ -224,7 +224,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h index ef66d465de..ed8c2da9e2 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h @@ -218,7 +218,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h index 57fc7bd987..c4964e0fd8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h @@ -224,7 +224,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h index e5a917dbfa..c611028f29 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h @@ -244,7 +244,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h index 1f7ac0f25a..6de33302ee 100644 --- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h @@ -224,7 +224,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h index a965d31654..d68bfeb0ef 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h @@ -243,7 +243,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index afb6d80978..fca29b26ff 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -67,7 +67,7 @@ setfsgid EXTRA setfsgid i:i setfsgid setfsuid EXTRA setfsuid i:i setfsuid setpgid - setpgid i:ii __setpgid setpgid sigaltstack - sigaltstack i:PP __sigaltstack sigaltstack -splice EXTRA splice i:iiii splice +splice EXTRA splice i:iPiPii splice sysinfo EXTRA sysinfo i:p sysinfo swapon - swapon i:si __swapon swapon swapoff - swapoff i:s __swapoff swapoff diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h index 4f10f22224..fa1d02bc1f 100644 --- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h @@ -238,7 +238,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ -- cgit v1.2.3