From 0b9b4d884213cb1838a9cb7b26eb668d59dcefb4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 5 Mar 2006 11:38:04 +0000 Subject: [PATCH] * sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY to force directory check. --- ChangeLog | 5 +++++ sysdeps/mach/hurd/fdopendir.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cc1edb7c47..d75bbcbd7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-05 Roland McGrath + + * sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY + to force directory check. + 2006-03-04 Roland McGrath * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Make sure high bits 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;