SOURCES (AC-branch): glibc-bindresvport2.patch (NEW), glibc-nis+-l...

arekm arekm at pld-linux.org
Sun Nov 11 14:43:57 CET 2007


Author: arekm                        Date: Sun Nov 11 13:43:57 2007 GMT
Module: SOURCES                       Tag: AC-branch
---- Log message:
- patches from rhel

---- Files affected:
SOURCES:
   glibc-bindresvport2.patch (NONE -> 1.1.2.1)  (NEW), glibc-nis+-leaks2.patch (NONE -> 1.1.2.1)  (NEW), glibc-nis+-batch2.patch (NONE -> 1.1.2.1)  (NEW), glibc-bz2226.patch (NONE -> 1.1.2.1)  (NEW), glibc-rh197790.patch (NONE -> 1.1.2.1)  (NEW), glibc-rh215572.patch (NONE -> 1.1.2.1)  (NEW), glibc-nis+-getenv.patch (NONE -> 1.1.2.1)  (NEW), glibc-rh228103.patch (NONE -> 1.1.2.1)  (NEW), glibc-rh219145.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/glibc-bindresvport2.patch
diff -u /dev/null SOURCES/glibc-bindresvport2.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-bindresvport2.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,37 @@
+2005-11-21  Jakub Jelinek  <jakub at redhat.com>
+
+	* sunrpc/bindrsvprt.c (bindresvport): Wrap around to startport
+	in the loop if port is bigger than endport, initially set to
+	ENDPORT.  When changing startport, set endport and port
+	appropriately.
+
+--- libc/sunrpc/bindrsvprt.c	23 May 2005 19:03:43 -0000	1.11
++++ libc/sunrpc/bindrsvprt.c	22 Nov 2005 04:39:05 -0000	1.12
+@@ -74,14 +74,13 @@ bindresvport (int sd, struct sockaddr_in
+   int res = -1;
+ 
+   int nports = ENDPORT - startport + 1;
++  int endport = ENDPORT;
+  again:
+   for (i = 0; i < nports; ++i)
+     {
+       sin->sin_port = htons (port++);
+-      if (port > ENDPORT)
+-	{
+-	  port = startport;
+-	}
++      if (port > endport)
++	port = startport;
+       res = __bind (sd, sin, sizeof (struct sockaddr_in));
+       if (res >= 0 || errno != EADDRINUSE)
+ 	break;
+@@ -90,7 +89,9 @@ bindresvport (int sd, struct sockaddr_in
+   if (i == nports && startport != LOWPORT)
+     {
+       startport = LOWPORT;
++      endport = STARTPORT - 1;
+       nports = STARTPORT - LOWPORT;
++      port = LOWPORT + port % (STARTPORT - LOWPORT);
+       goto again;
+     }
+ 

================================================================
Index: SOURCES/glibc-nis+-leaks2.patch
diff -u /dev/null SOURCES/glibc-nis+-leaks2.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-nis+-leaks2.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,15 @@
+2006-05-17  Jakub Jelinek  <jakub at redhat.com>
+
+	* sunrpc/key_call.c (getkeyserv_handle): Call auth_destroy if
+	pid changed.
+
+--- libc/sunrpc/key_call.c	4 May 2006 18:22:38 -0000	1.20
++++ libc/sunrpc/key_call.c	17 May 2006 15:10:44 -0000	1.21
+@@ -400,6 +400,7 @@ getkeyserv_handle (int vers)
+   /* if pid has changed, destroy client and rebuild */
+   if (kcp->client != NULL && kcp->pid != __getpid ())
+     {
++      auth_destroy (kcp->client->cl_auth);
+       clnt_destroy (kcp->client);
+       kcp->client = NULL;
+     }

================================================================
Index: SOURCES/glibc-nis+-batch2.patch
diff -u /dev/null SOURCES/glibc-nis+-batch2.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-nis+-batch2.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,52 @@
+2006-05-18  Jakub Jelinek  <jakub at redhat.com>
+
+	* nis/nss_compat/compat-pwd.c (internal_setpwent): If nss_set*ent
+	returned NSS_STATUS_UNAVAIL, still return NSS_STATUS_SUCCESS.
+	* nis/nss_compat/compat-spwd.c (internal_setspent): Likewise.
+	* nis/nss_compat/compat-grp.c (internal_setgrent): Likewise.
+
+--- libc/nis/nss_compat/compat-grp.c	6 Jul 2005 21:04:53 -0000	1.30
++++ libc/nis/nss_compat/compat-grp.c	18 May 2006 14:51:05 -0000	1.31
+@@ -138,7 +138,11 @@ internal_setgrent (ent_t *ent, int stayo
+     rewind (ent->stream);
+ 
+   if (status == NSS_STATUS_SUCCESS && nss_setgrent)
+-    return nss_setgrent (stayopen);
++    {
++      status = nss_setgrent (stayopen);
++      if (status == NSS_STATUS_UNAVAIL)
++        status = NSS_STATUS_SUCCESS;
++    }
+ 
+   return status;
+ }
+--- libc/nis/nss_compat/compat-pwd.c	6 Jul 2005 21:03:32 -0000	1.35
++++ libc/nis/nss_compat/compat-pwd.c	18 May 2006 14:51:05 -0000	1.36
+@@ -258,7 +258,11 @@ internal_setpwent (ent_t *ent, int stayo
+   give_pwd_free (&ent->pwd);
+ 
+   if (status == NSS_STATUS_SUCCESS && nss_setpwent)
+-    return nss_setpwent (stayopen);
++    {
++      status = nss_setpwent (stayopen);
++      if (status == NSS_STATUS_UNAVAIL)
++        status = NSS_STATUS_SUCCESS;
++    }
+ 
+   return status;
+ }
+--- libc/nis/nss_compat/compat-spwd.c	6 Jul 2005 21:02:30 -0000	1.28
++++ libc/nis/nss_compat/compat-spwd.c	18 May 2006 14:51:05 -0000	1.29
+@@ -212,7 +212,11 @@ internal_setspent (ent_t *ent, int stayo
+   give_spwd_free (&ent->pwd);
+ 
+   if (status == NSS_STATUS_SUCCESS && nss_setspent)
+-    return nss_setspent (stayopen);
++    {
++      status = nss_setspent (stayopen);
++      if (status == NSS_STATUS_UNAVAIL)
++        status = NSS_STATUS_SUCCESS;
++    }
+ 
+   return status;
+ }

================================================================
Index: SOURCES/glibc-bz2226.patch
diff -u /dev/null SOURCES/glibc-bz2226.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-bz2226.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,17 @@
+2006-02-12  Ulrich Drepper  <drepper at redhat.com>
+
+	[BZ #2226]
+	* libio/wgenops.c (_IO_wsetb): Use correct size of wide char
+	buffer in FREE_BUF call.
+
+--- libc/libio/wgenops.c	14 Sep 2004 04:24:45 -0000	1.13
++++ libc/libio/wgenops.c	12 Feb 2006 21:20:57 -0000	1.14
+@@ -116,7 +116,7 @@ _IO_wsetb (f, b, eb, a)
+      int a;
+ {
+   if (f->_wide_data->_IO_buf_base && !(f->_flags & _IO_USER_BUF))
+-    FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f));
++    FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f) * sizeof (wchar_t));
+   f->_wide_data->_IO_buf_base = b;
+   f->_wide_data->_IO_buf_end = eb;
+   if (a)

================================================================
Index: SOURCES/glibc-rh197790.patch
diff -u /dev/null SOURCES/glibc-rh197790.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-rh197790.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,78 @@
+2006-10-11  Jakub Jelinek  <jakub at redhat.com>
+
+	* malloc/malloc.c (_int_malloc): Remove unused any_larger variable.
+
+2006-08-31  Jakub Jelinek  <jakub at redhat.com>
+
+	* malloc/malloc.c (_int_malloc): Use full list insert and not
+	shortcut which assumes the list is empty for large requests
+	too.
+
+2006-08-26  Ulrich Drepper  <drepper at redhat.com>
+
+	* malloc/malloc.c (_int_malloc): Fix test for large enough buffer
+	for early termination.  When no unsorted block matches perfectly
+	and an exiting block has to be split, use full list insert and
+	not shortcut which assumes the list is empty.
+
+2006-08-19  Ulrich Drepper  <drepper at redhat.com>
+
+	* malloc/malloc.c (_int_malloc): Limit number of unsorted blocks
+	to sort in each call.
+
+--- libc/malloc/malloc.c	9 Aug 2006 21:50:30 -0000
++++ libc/malloc/malloc.c	7 Sep 2006 16:06:02 -0000
+@@ -4055,6 +4096,7 @@ _int_malloc(mstate av, size_t bytes)
+ 
+   for(;;) {
+ 
++    int iters = 0;
+     while ( (victim = unsorted_chunks(av)->bk) != unsorted_chunks(av)) {
+       bck = victim->bk;
+       if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
+@@ -4150,6 +4193,10 @@ _int_malloc(mstate av, size_t bytes)
+       victim->fd = fwd;
+       fwd->bk = victim;
+       bck->fd = victim;
++
++#define MAX_ITERS	10000
++      if (++iters >= MAX_ITERS)
++	break;
+     }
+ 
+     /*
+@@ -4182,8 +4231,14 @@ _int_malloc(mstate av, size_t bytes)
+         /* Split */
+         else {
+           remainder = chunk_at_offset(victim, nb);
+-          unsorted_chunks(av)->bk = unsorted_chunks(av)->fd = remainder;
+-          remainder->bk = remainder->fd = unsorted_chunks(av);
++          /* We cannot assume the unsorted list is empty and therefore
++             have to perform a complete insert here.  */
++	  bck = unsorted_chunks(av);
++	  fwd = bck->fd;
++	  remainder->bk = bck;
++	  remainder->fd = fwd;
++	  bck->fd = remainder;
++	  fwd->bk = remainder;
+           set_head(victim, nb | PREV_INUSE |
+ 		   (av != &main_arena ? NON_MAIN_ARENA : 0));
+           set_head(remainder, remainder_size | PREV_INUSE);
+@@ -4268,8 +4323,15 @@ _int_malloc(mstate av, size_t bytes)
+         else {
+           remainder = chunk_at_offset(victim, nb);
+ 
+-          unsorted_chunks(av)->bk = unsorted_chunks(av)->fd = remainder;
+-          remainder->bk = remainder->fd = unsorted_chunks(av);
++	  /* We cannot assume the unsorted list is empty and therefore
++	     have to perform a complete insert here.  */
++	  bck = unsorted_chunks(av);
++	  fwd = bck->fd;
++	  remainder->bk = bck;
++	  remainder->fd = fwd;
++	  bck->fd = remainder;
++	  fwd->bk = remainder;
++
+           /* advertise as last remainder */
+           if (in_smallbin_range(nb))
+             av->last_remainder = remainder;

================================================================
Index: SOURCES/glibc-rh215572.patch
diff -u /dev/null SOURCES/glibc-rh215572.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-rh215572.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,18 @@
+2006-11-14  Jakub Jelinek  <jakub at redhat.com>
+
+	* nss/nss_files/files-alias.c (get_next_alias): Set line back
+	to first_unused after parsing :include: file.
+
+--- libc/nss/nss_files/files-alias.c	1 Sep 2002 12:38:05 -0000	1.15
++++ libc/nss/nss_files/files-alias.c	15 Nov 2006 22:23:20 -0000	1.16
+@@ -298,8 +298,8 @@ get_next_alias (const char *match, struc
+ 			  first_unused[room_left - 1] = '\0';
+ 			  strncpy (first_unused, old_line, room_left);
+ 
+-			  if (old_line != NULL)
+-			    free (old_line);
++			  free (old_line);
++			  line = first_unused;
+ 
+ 			  if (first_unused[room_left - 1] != '\0')
+ 			    goto no_more_room;

================================================================
Index: SOURCES/glibc-nis+-getenv.patch
diff -u /dev/null SOURCES/glibc-nis+-getenv.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-nis+-getenv.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,32 @@
+2006-12-05  Jakub Jelinek  <jakub at redhat.com>
+
+	* nis/nis_subr.c (nis_getnames): Revert last change.
+
+2006-10-11  Jakub Jelinek  <jakub at redhat.com>
+
+	* nis/nis_defaults.c (__nis_default_access): Don't call getenv twice.
+
+	* nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv.
+	* sysdeps/generic/unsecvars.h: Add NIS_PATH.
+
+--- libc/nis/nis_defaults.c	10 May 2006 02:54:46 -0000	1.8
++++ libc/nis/nis_defaults.c	11 Oct 2006 16:22:34 -0000	1.9
+@@ -447,7 +447,7 @@ __nis_default_access (char *param, unsig
+     {
+       cptr = getenv ("NIS_DEFAULTS");
+       if (cptr != NULL && strstr (cptr, "access=") != NULL)
+-	result = searchaccess (getenv ("NIS_DEFAULTS"), result);
++	result = searchaccess (cptr, result);
+     }
+ 
+   return result;
+--- libc/sysdeps/generic/unsecvars.h	6 Jan 2005 22:40:19 -0000	1.8
++++ libc/sysdeps/generic/unsecvars.h	11 Oct 2006 16:24:05 -0000	1.9
+@@ -18,6 +18,7 @@
+   "LOCALDOMAIN\0"							      \
+   "LOCPATH\0"								      \
+   "MALLOC_TRACE\0"							      \
++  "NIS_PATH\0"								      \
+   "NLSPATH\0"								      \
+   "RESOLV_HOST_CONF\0"							      \
+   "RES_OPTIONS\0"							      \

================================================================
Index: SOURCES/glibc-rh228103.patch
diff -u /dev/null SOURCES/glibc-rh228103.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-rh228103.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,17 @@
+2007-02-09  Jakub Jelinek  <jakub at redhat.com>
+
+	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+	(__lll_mutex_timedlock_wait): Use correct pointer when we don't
+	call into the kernel to delay.
+
+--- libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S	17 Jan 2007 09:33:20 -0000	1.16
++++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S	10 Feb 2007 00:04:24 -0000	1.17
+@@ -164,7 +164,7 @@ __lll_mutex_timedlock_wait:
+ 8:				/* NB: %edx == 2 */
+ 	xorl	%eax, %eax
+ 	LOCK
+-	cmpxchgl %edx, (%rdi)
++	cmpxchgl %edx, (%r12)
+ 	jnz	7f
+ 
+ 6:	addq	$16, %rsp

================================================================
Index: SOURCES/glibc-rh219145.patch
diff -u /dev/null SOURCES/glibc-rh219145.patch:1.1.2.1
--- /dev/null	Sun Nov 11 14:43:57 2007
+++ SOURCES/glibc-rh219145.patch	Sun Nov 11 14:43:52 2007
@@ -0,0 +1,38 @@
+2006-12-19  Jakub Jelinek  <jakub at redhat.com>
+
+	* nss/getXXbyYY_r.c: Include atomic.h.
+	(INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
+	add atomic_write_barrier () in between.
+
+--- libc/nss/getXXbyYY_r.c	16 Sep 2004 22:24:09 -0000	1.61
++++ libc/nss/getXXbyYY_r.c	19 Dec 2006 15:45:08 -0000	1.62
+@@ -18,6 +18,7 @@
+    02111-1307 USA.  */
+ 
+ #include <assert.h>
++#include <atomic.h>
+ #include <errno.h>
+ #include <stdbool.h>
+ #include "nsswitch.h"
+@@ -173,9 +174,6 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L
+ 	startp = (service_user *) -1l;
+       else
+ 	{
+-	  startp = nip;
+-	  start_fct = fct.l;
+-
+ #ifdef NEED__RES
+ 	  /* The resolver code will really be used so we have to
+ 	     initialize it.  */
+@@ -190,6 +188,11 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L
+ 	  if (!_res_hconf.initialized)
+ 	    _res_hconf_init ();
+ #endif /* need _res_hconf */
++
++	  start_fct = fct.l;
++	  /* Make sure start_fct is written before startp.  */
++	  atomic_write_barrier ();
++	  startp = nip;
+ 	}
+     }
+   else
================================================================


More information about the pld-cvs-commit mailing list