summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-05-08 22:01:27 +0000
committerRoland McGrath <roland@gnu.org>2002-05-08 22:01:27 +0000
commitf6a3a753442651b10c8e1704cb491854c0cdfe1a (patch)
tree7fee1307c7fdff158b9d6913ef02ab6089bfd146 /hurd
parent64ae9b09d3d11b30a4136613d0160f6901572add (diff)
downloadglibc-f6a3a753442651b10c8e1704cb491854c0cdfe1a.tar.gz
2002-05-08 Roland McGrath <roland@frob.com>
* hurd/hurdfchdir.c (_hurd_change_directory_port_from_fd): Use O_NOTRANS flag in "." lookup.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurdfchdir.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hurd/hurdfchdir.c b/hurd/hurdfchdir.c
index 47ff55b9c1..2e6a120c53 100644
--- a/hurd/hurdfchdir.c
+++ b/hurd/hurdfchdir.c
@@ -1,5 +1,5 @@
/* Change a port cell to a directory in an open file descriptor.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,8 +38,11 @@ _hurd_change_directory_port_from_fd (struct hurd_port *portcell, int fd)
ret = HURD_PORT_USE (&d->port,
({
int ret;
+ /* We look up "." to force ENOTDIR if it's not a
+ directory and EACCES if we don't have search
+ permission. */
file_t dir = __file_name_lookup_under (port, ".",
- 0, 0);
+ O_NOTRANS, 0);
if (dir == MACH_PORT_NULL)
ret = -1;
else