r3835 - in glibc-package/branches/eglibc-2.10/debian: . patches patches/hurd-i386
Author: sthibault
Date: 2009-09-13 14:53:46 +0000 (Sun, 13 Sep 2009)
New Revision: 3835
Added:
glibc-package/branches/eglibc-2.10/debian/patches/hurd-i386/submitted-null-pathname.diff
Modified:
glibc-package/branches/eglibc-2.10/debian/changelog
glibc-package/branches/eglibc-2.10/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/branches/eglibc-2.10/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.10/debian/changelog 2009-09-13 14:51:58 UTC (rev 3834)
+++ glibc-package/branches/eglibc-2.10/debian/changelog 2009-09-13 14:53:46 UTC (rev 3835)
@@ -120,6 +120,8 @@
* Fix debian/patches/hurd-i386/local-tls-support.diff to align up includes
on Linux, to fix build.
* Apply kfreebsd/local-no-SOCK_NONBLOCK.diff on hurd-i386 to fix build too.
+ * debian/ patches/hurd-i386/submitted-null-pathname.diff: New patch to fix
+ chdir("") and chroot("") into returning ENOENT.
[ Carlos O'Donell ]
* Add hppa/cvs-nptl-compat.diff to keep ABI compatibility between
Added: glibc-package/branches/eglibc-2.10/debian/patches/hurd-i386/submitted-null-pathname.diff
===================================================================
--- glibc-package/branches/eglibc-2.10/debian/patches/hurd-i386/submitted-null-pathname.diff (rev 0)
+++ glibc-package/branches/eglibc-2.10/debian/patches/hurd-i386/submitted-null-pathname.diff 2009-09-13 14:53:46 UTC (rev 3835)
@@ -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/branches/eglibc-2.10/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.10/debian/patches/series 2009-09-13 14:51:58 UTC (rev 3834)
+++ glibc-package/branches/eglibc-2.10/debian/patches/series 2009-09-13 14:53:46 UTC (rev 3835)
@@ -99,6 +99,7 @@
hurd-i386/local-pthread_types.diff
hurd-i386/local-_dl_random.diff
hurd-i386/local-unwind-resume.diff
+hurd-i386/submitted-null-pathname.diff
ia64/submitted-sysconf.diff
ia64/submitted-libm.diff
Reply to: