glibc/nss-database.patch
Andreas Schwab 746e16d2b9 Accepting request 186119 from home:Andreas_Schwab:glibc
- Update to glibc 2.17.90 85891acadf1b:
  * CVE-2013-2207 Incorrectly granting access to another user's pseudo-terminal
    has been fixed by disabling the use of pt_chown (Bugzilla #15755).
    Distributions can re-enable building and using pt_chown via the new configure
    option `--enable-pt_chown'.  Enabling the use of pt_chown carries with it
    considerable security risks and should only be used if the distribution
    understands and accepts the risks.
  * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
    #15078).
  * CVE-2013-1914 Stack overflow in getaddrinfo with many results has been
    fixed (Bugzilla #15330).
  * Add support for calling C++11 thread_local object destructors on thread
    and program exit.  This needs compiler support for offloading C++11
    destructor calls to glibc.
  * Improved worst case performance of libm functions with double inputs and
    output.
  * Support for priority inherited mutexes in pthread condition variables on
    non-x86 architectures.
  * Optimized string functions for AArch64.  Implemented by Marcus Shawcroft.
  * Optimized string functions for ARM.  Implemented by Will Newton and
    Richard Henderson.
  * Added a benchmark framework to track performance of functions in glibc.
  * New <math.h> macro named issignaling to check for a signaling NaN (sNaN).
    It is based on draft TS 18661 and currently enabled as a GNU extension.
  * On Linux, the clock function now uses the clock_gettime system call
    for improved precision, rather than old times system call.
  * Added new API functions pthread_getattr_default_np and
    pthread_setattr_default_np to get and set the default pthread
    attributes of a process.
  * Added support for TSX lock elision for pthread mutexes on i386 and x86-64.

OBS-URL: https://build.opensuse.org/request/show/186119
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=304
2013-08-06 14:52:55 +00:00

113 lines
3.3 KiB
Diff

From a6856a042a0669ac3f8bc675e8e1de14b5d09b94 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Thu, 24 Jan 2013 12:32:09 +0100
Subject: [PATCH] Properly cache the result from looking up the nss database
config
[BZ #15048]
* nscd/aicache.c (addhstaiX): Properly use the cache variable for
the nss database lookup.
* nscd/initgrcache.c (addinitgroupsX): Likewise.
* sysdeps/posix/getaddrinfo.c (gaih_inet): Likewise.
---
nscd/aicache.c | 15 +++++++--------
nscd/initgrcache.c | 15 +++++++--------
sysdeps/posix/getaddrinfo.c | 14 ++++++--------
3 files changed, 20 insertions(+), 24 deletions(-)
Index: glibc-2.17.90/nscd/aicache.c
===================================================================
--- glibc-2.17.90.orig/nscd/aicache.c
+++ glibc-2.17.90/nscd/aicache.c
@@ -86,20 +86,19 @@ addhstaiX (struct database_dyn *db, int
}
static service_user *hosts_database;
- service_user *nip = NULL;
+ service_user *nip;
int no_more;
int rc6 = 0;
int rc4 = 0;
int herrno = 0;
- if (hosts_database != NULL)
- {
- nip = hosts_database;
- no_more = 0;
- }
- else
+ if (hosts_database == NULL)
no_more = __nss_database_lookup ("hosts", NULL,
- "dns [!UNAVAIL=return] files", &nip);
+ "dns [!UNAVAIL=return] files",
+ &hosts_database);
+ else
+ no_more = 0;
+ nip = hosts_database;
if (__res_maybe_init (&_res, 0) == -1)
no_more = 1;
Index: glibc-2.17.90/nscd/initgrcache.c
===================================================================
--- glibc-2.17.90.orig/nscd/initgrcache.c
+++ glibc-2.17.90/nscd/initgrcache.c
@@ -80,17 +80,16 @@ addinitgroupsX (struct database_dyn *db,
}
static service_user *group_database;
- service_user *nip = NULL;
+ service_user *nip;
int no_more;
- if (group_database != NULL)
- {
- nip = group_database;
- no_more = 0;
- }
- else
+ if (group_database == NULL)
no_more = __nss_database_lookup ("group", NULL,
- "compat [NOTFOUND=return] files", &nip);
+ "compat [NOTFOUND=return] files",
+ &group_database);
+ else
+ no_more = 0;
+ nip = group_database;
/* We always use sysconf even if NGROUPS_MAX is defined. That way, the
limit can be raised in the kernel configuration without having to
Index: glibc-2.17.90/sysdeps/posix/getaddrinfo.c
===================================================================
--- glibc-2.17.90.orig/sysdeps/posix/getaddrinfo.c
+++ glibc-2.17.90/sysdeps/posix/getaddrinfo.c
@@ -558,7 +558,7 @@ gaih_inet (const char *name, const struc
struct gaih_addrtuple **pat = &at;
int no_data = 0;
int no_inet6_data = 0;
- service_user *nip = NULL;
+ service_user *nip;
enum nss_status inet6_status = NSS_STATUS_UNAVAIL;
enum nss_status status = NSS_STATUS_UNAVAIL;
int no_more;
@@ -791,15 +791,13 @@ gaih_inet (const char *name, const struc
}
#endif
- if (__nss_hosts_database != NULL)
- {
- no_more = 0;
- nip = __nss_hosts_database;
- }
- else
+ if (__nss_hosts_database == NULL)
no_more = __nss_database_lookup ("hosts", NULL,
"dns [!UNAVAIL=return] files",
- &nip);
+ &__nss_hosts_database);
+ else
+ no_more = 0;
+ nip = __nss_hosts_database;
/* Initialize configurations. */
if (__builtin_expect (!_res_hconf.initialized, 0))