about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-05-28 10:13:14 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-05-28 10:15:33 +0000
commit94884ff506d25ddca4f918c2cd40cc748bc5bbb3 (patch)
tree188db54b969482446b1792903eab5ccc2451655b
parentfff30716a7517a2d1d4682c5b94e56b0e87f6a67 (diff)
downloadglibc-94884ff506d25ddca4f918c2cd40cc748bc5bbb3.tar.gz
glibc-94884ff506d25ddca4f918c2cd40cc748bc5bbb3.tar.xz
glibc-94884ff506d25ddca4f918c2cd40cc748bc5bbb3.zip
hurd: Fix fdopendir checking for directory type
* sysdeps/mach/hurd/fdopendir.c (__fdopendir): Lookup "./" instead of
"/" that would designate the root of the filesystem.
-rw-r--r--sysdeps/mach/hurd/fdopendir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/fdopendir.c b/sysdeps/mach/hurd/fdopendir.c
index f15801f141..0583cdca0f 100644
--- a/sysdeps/mach/hurd/fdopendir.c
+++ b/sysdeps/mach/hurd/fdopendir.c
@@ -39,7 +39,7 @@ __fdopendir (int fd)
   /* Ensure that it's a directory.  */
   error_t err = HURD_FD_PORT_USE
     (d, ({
-	file_t dir = __file_name_lookup_under (port, "/",
+	file_t dir = __file_name_lookup_under (port, "./",
 					       O_DIRECTORY | O_NOTRANS, 0);;
 	if (dir != MACH_PORT_NULL)
 	  __mach_port_deallocate (__mach_task_self (), dir);