This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, roland/eloop_threshold, created. glibc-2.16-ports-merge-99-g9e215eb


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, roland/eloop_threshold has been created
        at  9e215ebd70406a21202fd35f9cb9161cb6020f3b (commit)

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9e215ebd70406a21202fd35f9cb9161cb6020f3b

commit 9e215ebd70406a21202fd35f9cb9161cb6020f3b
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Jul 31 16:18:53 2012 -0700

    Distinguish ELOOP diagnosis threshold from SYMLOOP_MAX.

diff --git a/ChangeLog b/ChangeLog
index 102a878..e52b240 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-07-31  Roland McGrath  <roland@hack.frob.com>
+
+	* sysdeps/mach/hurd/sys/param.h (MAXSYMLINKS): Macro removed.
+	* sysdeps/mach/hurd/bits/local_lim.h (SYMLOOP_MAX): Macro removed.
+	* sysdeps/mach/hurd/eloop-threshold.h: New file.
+	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Use
+	__eloop_threshold instead of SYMLOOP_MAX.
+
+	* sysdeps/generic/eloop-threshold.h: New file.
+	* stdlib/canonicalize.c (__realpath): Use __eloop_threshold instead
+	of MAXSYMLINKS.
+	* elf/chroot_canon.c (chroot_canon): Likewise.
+
 2012-07-31  Pino Toscano  <toscano.pino@tiscali.it>
 
 	* sysdeps/mach/hurd/renameat.c: New file, mostly copied from rename.c.
diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c
index a7a7d9b..397125f 100644
--- a/elf/chroot_canon.c
+++ b/elf/chroot_canon.c
@@ -1,6 +1,5 @@
 /* Return the canonical absolute name of a given file inside chroot.
-   Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010,2011
-	Free Software Foundation, Inc.
+   Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -20,12 +19,12 @@
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
-#include <sys/param.h>
 #include <sys/stat.h>
 #include <errno.h>
 #include <stddef.h>
 #include <stdint.h>
 
+#include <eloop-threshold.h>
 #include <ldconfig.h>
 
 #ifndef PATH_MAX
@@ -127,7 +126,7 @@ chroot_canon (const char *chroot, const char *name)
 	      char *buf = alloca (PATH_MAX);
 	      size_t len;
 
-	      if (++num_links > MAXSYMLINKS)
+	      if (++num_links > __eloop_threshold ())
 		{
 		  __set_errno (ELOOP);
 		  goto error;
diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
index 4fa2a21..c95ca0f 100644
--- a/hurd/lookup-retry.c
+++ b/hurd/lookup-retry.c
@@ -24,6 +24,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <_itoa.h>
+#include <eloop-threshold.h>
 
 /* Translate the error from dir_lookup into the error the user sees.  */
 static inline error_t
@@ -103,7 +104,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
 	  /* Fall through.  */
 
 	case FS_RETRY_NORMAL:
-	  if (nloops++ >= SYMLOOP_MAX)
+	  if (nloops++ >= __eloop_threshold ())
 	    {
 	      __mach_port_deallocate (__mach_task_self (), *result);
 	      return ELOOP;
@@ -180,7 +181,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
 	      dirport = INIT_PORT_CRDIR;
 	      if (*result != MACH_PORT_NULL)
 		__mach_port_deallocate (__mach_task_self (), *result);
-	      if (nloops++ >= SYMLOOP_MAX)
+	      if (nloops++ >= __eloop_threshold ())
 		return ELOOP;
 	      file_name = &retryname[1];
 	      break;
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c
index 876b482..aeff804 100644
--- a/stdlib/canonicalize.c
+++ b/stdlib/canonicalize.c
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file.
-   Copyright (C) 1996-2002,2004,2005,2006,2008 Free Software Foundation, Inc.
+   Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,11 @@
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
-#include <sys/param.h>
 #include <sys/stat.h>
 #include <errno.h>
 #include <stddef.h>
 
+#include <eloop-threshold.h>
 #include <shlib-compat.h>
 
 /* Return the canonical absolute name of file NAME.  A canonical name
@@ -166,7 +166,7 @@ __realpath (const char *name, char *resolved)
 	      char *buf = __alloca (path_max);
 	      size_t len;
 
-	      if (++num_links > MAXSYMLINKS)
+	      if (++num_links > __eloop_threshold ())
 		{
 		  __set_errno (ELOOP);
 		  goto error;
diff --git a/sysdeps/mach/hurd/bits/local_lim.h b/sysdeps/mach/hurd/bits/local_lim.h
index 48411d0..c957dad 100644
--- a/sysdeps/mach/hurd/bits/local_lim.h
+++ b/sysdeps/mach/hurd/bits/local_lim.h
@@ -1,5 +1,5 @@
 /* Minimum guaranteed maximum values for system limits.  Hurd version.
-   Copyright (C) 1993,94,96,98,2002 Free Software Foundation, Inc.
+   Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,14 +32,3 @@
    suitable, and `sysconf' will return a number at least as large.  */
 
 #define NGROUPS_MAX	256
-
-/* The maximum number of symbolic links that are allowed in a single file
-   name resolution.  When a further link is encountered, the call returns
-   ELOOP.  This name is a GNU extension; POSIX.1 has no such limit, and BSD
-   calls it MAXSYMLINKS in <sys/param.h>.  (We define the name under
-   _BSD_SOURCE even without _GNU_SOURCE because our <sys/param.h> uses it
-   to define MAXSYMLINKS.)  */
-
-#if defined __USE_GNU || defined __USE_BSD /* 1003.1a defines this */
-#define	SYMLOOP_MAX	8
-#endif
diff --git a/sysdeps/mach/hurd/sys/param.h b/sysdeps/mach/hurd/sys/param.h
index 42f4f46..e58d517 100644
--- a/sysdeps/mach/hurd/sys/param.h
+++ b/sysdeps/mach/hurd/sys/param.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1994,1995,1997,1999,2011 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -83,7 +83,6 @@
 
 #define	NBBY		CHAR_BIT
 #define	NGROUPS		NGROUPS_MAX
-#define	MAXSYMLINKS	SYMLOOP_MAX
 #define	CANBSIZ		MAX_CANON /* XXX ? */
 
 /* ARG_MAX is unlimited, but we define NCARGS for BSD programs that want to

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]