about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-03-05 11:38:04 +0000
committerRoland McGrath <roland@gnu.org>2006-03-05 11:38:04 +0000
commit0b9b4d884213cb1838a9cb7b26eb668d59dcefb4 (patch)
tree101fff532e0c59ca6ce1896bca2ac25393c704d7 /sysdeps
parenta935c3dc908c26b6ca87a4e892d03d84165d1e83 (diff)
downloadglibc-0b9b4d884213cb1838a9cb7b26eb668d59dcefb4.tar.gz
glibc-0b9b4d884213cb1838a9cb7b26eb668d59dcefb4.tar.xz
glibc-0b9b4d884213cb1838a9cb7b26eb668d59dcefb4.zip
* sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY
	to force directory check.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/hurd/fdopendir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/fdopendir.c b/sysdeps/mach/hurd/fdopendir.c
index c9caac30d7..016f825f1d 100644
--- a/sysdeps/mach/hurd/fdopendir.c
+++ b/sysdeps/mach/hurd/fdopendir.c
@@ -40,7 +40,8 @@ __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, "/", O_NOTRANS, 0);
+	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);
 	dir != MACH_PORT_NULL ? 0 : errno;