2006-03-05 Roland McGrath <roland@frob.com>
authorroland <roland>
Sun, 5 Mar 2006 11:37:50 +0000 (11:37 +0000)
committerroland <roland>
Sun, 5 Mar 2006 11:37:50 +0000 (11:37 +0000)
* sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY
to force directory check.

sysdeps/mach/hurd/fdopendir.c

index c9caac3..016f825 100644 (file)
@@ -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;