Skip to content

Commit

Permalink
* sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY
Browse files Browse the repository at this point in the history
	to force directory check.
  • Loading branch information
Roland McGrath committed Mar 5, 2006
1 parent a935c3d commit 0b9b4d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2006-03-05 Roland McGrath <roland@frob.com>

* sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY
to force directory check.

2006-03-04 Roland McGrath <roland@frob.com>

* sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Make sure high bits
Expand Down
3 changes: 2 additions & 1 deletion sysdeps/mach/hurd/fdopendir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0b9b4d8

Please sign in to comment.