about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-10-17 16:05:54 +0000
committerUlrich Drepper <drepper@redhat.com>2005-10-17 16:05:54 +0000
commit5d1d7adb5bdefc314c2d8c7e87a6ef1c21cbfb07 (patch)
treef2ef874500772384e2b137a4b82eed7cf510a379 /sysdeps/unix
parent5d953aef3c9cfb8b67b5b59dab4bac96b2fba23f (diff)
downloadglibc-5d1d7adb5bdefc314c2d8c7e87a6ef1c21cbfb07.tar.gz
glibc-5d1d7adb5bdefc314c2d8c7e87a6ef1c21cbfb07.tar.xz
glibc-5d1d7adb5bdefc314c2d8c7e87a6ef1c21cbfb07.zip
* libio/oldfileops.c (_IO_old_file_xsputn): Fix last patch.
	Return EOF not 0.

	* sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area): Also
	allow EACCES errors when opening /rpco for now.

	* wctype/wcfuncs.c: Don't use expensive wide char lookups in isw*
	functions if character is in ASCII range.
	* wctype/wcfuncs_l.c: Likewise.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/readonly-area.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/readonly-area.c b/sysdeps/unix/sysv/linux/readonly-area.c
index 29224d98b9..69e926a7a1 100644
--- a/sysdeps/unix/sysv/linux/readonly-area.c
+++ b/sysdeps/unix/sysv/linux/readonly-area.c
@@ -35,10 +35,15 @@ __readonly_area (const char *ptr, size_t size)
   FILE *fp = fopen ("/proc/self/maps", "rc");
   if (fp == NULL)
     {
-      if (errno == ENOENT)
-	/* It is the system administrator's choice to not have /proc
-	   available to this process (e.g., because it runs in a chroot
-	   environment.  Don't fail in this case.  */
+      /* It is the system administrator's choice to not have /proc
+	 available to this process (e.g., because it runs in a chroot
+	 environment.  Don't fail in this case.  */
+      if (errno == ENOENT
+	  /* The kernel has a bug in that a process is denied access
+	     to the /proc filesystem if it is set[ug]id.  There has
+	     been no willingness to change this in the kernel so
+	     far.  */
+	  || errno == EACCES)
 	return 1;
       return -1;
     }