mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY
to force directory check.
This commit is contained in:
parent
a935c3dc90
commit
0b9b4d8842
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user