From: Samuel Thibault Date: Thu, 28 May 2020 10:13:14 +0000 (+0000) Subject: hurd: Fix fdopendir checking for directory type X-Git-Tag: glibc-2.32~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94884ff506d25ddca4f918c2cd40cc748bc5bbb3;p=thirdparty%2Fglibc.git hurd: Fix fdopendir checking for directory type * sysdeps/mach/hurd/fdopendir.c (__fdopendir): Lookup "./" instead of "/" that would designate the root of the filesystem. --- diff --git a/sysdeps/mach/hurd/fdopendir.c b/sysdeps/mach/hurd/fdopendir.c index f15801f1412..0583cdca0fb 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);