diff options
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | elf/dl-load.c | 20 | ||||
-rw-r--r-- | elf/dl-open.c | 7 | ||||
-rw-r--r-- | fedora/branch.mk | 4 | ||||
-rw-r--r-- | fedora/glibc.spec.in | 8 | ||||
-rw-r--r-- | nptl/ChangeLog | 9 | ||||
-rw-r--r-- | nptl/pthread_rwlock_trywrlock.c | 7 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c | 6 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_wrlock.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/bits/fcntl.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/bits/fcntl.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/bits/fcntl.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sh/bits/fcntl.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/fcntl.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h | 3 |
18 files changed, 87 insertions, 26 deletions
@@ -1,3 +1,23 @@ +2006-08-30 Jakub Jelinek <jakub@redhat.com> + + * 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 <drepper@redhat.com> + + * 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 <jakub@redhat.com> * inet/getnameinfo.c (getnameinfo): For AF_INET, check errno diff --git a/elf/dl-load.c b/elf/dl-load.c index 902ffc4..36dc123 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 cdbb660..8d057f8 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 7e4461d..32a0fec 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 2674d2b..519c50d 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 <jakub@redhat.com> 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 <jakub@redhat.com> 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 eb4680d..2c9c9e2 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,12 @@ +2006-08-30 Ulrich Drepper <drepper@redhat.com> + + * 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 <jakub@redhat.com> * 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 b754a19..6376006 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 <drepper@redhat.com>, 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 97c0598..ab7bc7b 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 <schwidefsky@de.ibm.com>, 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 822aeed..4d967f2 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 <schwidefsky@de.ibm.com>, 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 6084c38..f17dc2b 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 1f7ac0f..6de3330 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 ef66d46..ed8c2da 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 57fc7bd..c4964e0 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 e5a917d..c611028 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 1f7ac0f..6de3330 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 a965d31..d68bfeb 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 afb6d80..fca29b2 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 4f10f222..fa1d02b 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. */ |