bionic/libc/private
Elliott Hughes 7874f1d718 Split the shared group data from the shared passwd data.
Found by the toybox id(1) which calls both getpwuid(3) and getgrgid(3) before
looking at either result. The use of a shared buffer in this code meant that
even on a single thread, the data for any of the passwd functions would be
clobbered by the data for any of the group functions (or vice versa).

This might seem like an insufficient fix, but POSIX explicitly says (for
getpwnam) that the result "might be overwritten by a subsequent call to
getpwent(), getpwnam(), or getpwuid()" and likewise for other members of
that group, plus equivalent text for the group-related functions.

Change-Id: I2272f47e91f72e043fdaf7c169fa9f6978ff4370
2014-12-18 15:01:10 -08:00
..
__get_tls.h AArch64: Add initial support for AArch64 2013-12-16 17:00:22 -08:00
bionic_asm.h Simplify _ALIGN_TEXT. 2014-08-20 13:11:58 -07:00
bionic_atomic_arm64.h bionic: rename aarch64 target to arm64 2014-01-23 18:35:39 -08:00
bionic_atomic_arm.h Remove remaining bionic support for TARGET_CPU_SMP being false. 2014-11-17 10:06:20 -08:00
bionic_atomic_gcc_builtin.h ARM: Change dmb domain for bionic_atomic_barrier() 2013-12-19 11:39:01 -08:00
bionic_atomic_inline.h Remove remaining bionic support for TARGET_CPU_SMP being false. 2014-11-17 10:06:20 -08:00
bionic_atomic_mips.h Remove remaining bionic support for TARGET_CPU_SMP being false. 2014-11-17 10:06:20 -08:00
bionic_atomic_x86.h Remove remaining bionic support for TARGET_CPU_SMP being false. 2014-11-17 10:06:20 -08:00
bionic_auxv.h Switch <elf.h> over to linux uapi under the covers. 2014-02-10 18:22:24 -08:00
bionic_config.h Use a separate config.h for config like defines. 2014-06-16 23:35:53 -07:00
bionic_constants.h Add semaphore tests, fix sem_destroy. 2014-09-19 17:37:06 -07:00
bionic_futex.h Return the actual success result from __futex. 2014-05-29 10:27:55 -07:00
bionic_macros.h Bionic: Make DISALLOW_COPY_AND_ASSIGN conditional 2014-11-11 11:16:57 -08:00
bionic_mbstate.h Adds functionality specified by uchar.h 2014-06-04 08:39:24 -07:00
bionic_prctl.h Label pages mapped by linker_allocator 2014-08-11 09:22:48 -07:00
bionic_ssp.h Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces. 2013-02-14 14:37:34 -08:00
bionic_string_utils.h Fix pthread_getattr_np for the main thread. 2014-08-26 10:36:38 -07:00
bionic_systrace.h Hide ScopedTrace. 2014-08-13 11:25:01 -07:00
bionic_time_conversions.h Add semaphore tests, fix sem_destroy. 2014-09-19 17:37:06 -07:00
bionic_time.h Start hiding "private/bionic_time.h". 2014-07-25 12:03:51 -07:00
bionic_tls.h Split the shared group data from the shared passwd data. 2014-12-18 15:01:10 -08:00
ErrnoRestorer.h Bring in google3-style DISALLOW_* macros. 2014-05-09 19:12:08 -07:00
kernel_sigset_t.h Move some pthread functions to signal.h. 2014-11-21 10:26:09 -08:00
KernelArgumentBlock.h Bring in google3-style DISALLOW_* macros. 2014-05-09 19:12:08 -07:00
libc_events.h Add stpcpy/stpncpy. 2014-04-07 16:41:53 -07:00
libc_logging.h Expose android_set_abort_message(). 2014-08-18 14:37:42 -07:00
NetdClientDispatch.h Mark sockets on creation (socket()) and accept4(). 2014-05-19 15:19:16 -07:00
ScopedFd.h Load library using file handle. 2014-07-02 13:20:47 -07:00
ScopedPthreadMutexLocker.h Bring in google3-style DISALLOW_* macros. 2014-05-09 19:12:08 -07:00
ScopedReaddir.h Bring in google3-style DISALLOW_* macros. 2014-05-09 19:12:08 -07:00
ScopeGuard.h Refactoring: C++11 style DISABLE_ bionic marcos 2014-09-08 17:51:31 -07:00
thread_private.h Use upstream OpenBSD's arc4random. 2014-07-21 14:38:16 -07:00
ThreadLocalBuffer.h Revert "Revert "More pthreads cleanup."" 2013-02-12 15:27:18 -08:00
UniquePtr.h Load libraries in breadth-first order 2014-09-08 13:02:50 -07:00