[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r3834 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2009-09-13 14:51:58 +0000 (Sun, 13 Sep 2009)
New Revision: 3834

Added:
   glibc-package/trunk/debian/patches/hurd-i386/submitted-null-pathname.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
debian/ patches/hurd-i386/submitted-null-pathname.diff: New patch to fix
chdir("") and chroot("") into returning ENOENT.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2009-09-09 20:25:47 UTC (rev 3833)
+++ glibc-package/trunk/debian/changelog	2009-09-13 14:51:58 UTC (rev 3834)
@@ -22,6 +22,8 @@
   [ Samuel Thibault ]
   * debian/debhelper.in/libc.install: Install libc/*-gnu*/ instead of
     libc/*-*-gnu*/, to fix FTBFS on hurd-i386 due to it now being i486-gnu/.
+  * debian/ patches/hurd-i386/submitted-null-pathname.diff: New patch to fix
+    chdir("") and chroot("") into returning ENOENT.
 
   [ Petr Salinger ]
   * kfreebsd/local-sysdeps.diff: update to revision 2779 (from glibc-bsd).

Added: glibc-package/trunk/debian/patches/hurd-i386/submitted-null-pathname.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/submitted-null-pathname.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/submitted-null-pathname.diff	2009-09-13 14:51:58 UTC (rev 3834)
@@ -0,0 +1,46 @@
+2009-09-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+        * hurd/hurdchdir.c (_hurd_change_directory_port_from_name):
+        Return ENOENT when name is empty.
+        * sysdeps/mach/hurd/chroot.c (chroot): Return ENOENT when path
+        is empty.
+
+---
+ hurd/hurdchdir.c           |    6 ++++++
+ sysdeps/mach/hurd/chroot.c |    6 ++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/hurd/hurdchdir.c b/hurd/hurdchdir.c
+index 5115e4d..b1cc7a5 100644
+--- a/hurd/hurdchdir.c
++++ b/hurd/hurdchdir.c
+@@ -38,6 +38,12 @@ _hurd_change_directory_port_from_name (struct hurd_port *portcell,
+   len = strlen (name);
+   if (len >= 2 && name[len - 2] == '/' && name[len - 1] == '.')
+     lookup = name;
++  else if (len == 0)
++    {
++      /* Special-case null pathname according to POSIX */
++      errno = ENOENT;
++      return -1;
++    }
+   else
+     {
+       char *n = alloca (len + 3);
+diff --git a/sysdeps/mach/hurd/chroot.c b/sysdeps/mach/hurd/chroot.c
+index fde0164..cabeb7d 100644
+--- a/sysdeps/mach/hurd/chroot.c
++++ b/sysdeps/mach/hurd/chroot.c
+@@ -38,6 +38,12 @@ chroot (const char *path)
+   len = strlen (path);
+   if (len >= 2 && path[len - 2] == '/' && path[len - 1] == '.')
+     lookup = path;
++  else if (len == 0)
++    {
++      /* Special-case null pathname according to POSIX */
++      errno = ENOENT;
++      return -1;
++    }
+   else
+     {
+       char *n = alloca (len + 3);

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2009-09-09 20:25:47 UTC (rev 3833)
+++ glibc-package/trunk/debian/patches/series	2009-09-13 14:51:58 UTC (rev 3834)
@@ -108,6 +108,7 @@
 hurd-i386/local-pthread_types.diff
 hurd-i386/cvs-strerror_l.diff
 hurd-i386/cvs-rtld.diff
+hurd-i386/submitted-null-pathname.diff
 
 i386/local-biarch.diff
 i386/local-clone.diff


Reply to: