summaryrefslogtreecommitdiff
path: root/libnetfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-01-25 23:20:23 +0000
committerRoland McGrath <roland@gnu.org>2000-01-25 23:20:23 +0000
commit5419989528dda6eeb2584bd9faf50a261c8f628a (patch)
treeb2c2a0f8d177f150e7a0bc7db132180dd5c40c2a /libnetfs
parentda76c18757c058c59f4895c95d1bcccc94a16531 (diff)
2000-01-25 Roland McGrath <roland@baalperazim.frob.com>
* dir-lookup.c (netfs_S_dir_lookup): Follow symlink despite flags if MUSTBEDIR is set (i.e. there was a trailing slash).
Diffstat (limited to 'libnetfs')
-rw-r--r--libnetfs/dir-lookup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c
index 29037542..5019017b 100644
--- a/libnetfs/dir-lookup.c
+++ b/libnetfs/dir-lookup.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -272,7 +272,9 @@ netfs_S_dir_lookup (struct protid *diruser,
}
if (S_ISLNK (np->nn_stat.st_mode)
- && !(lastcomp && (flags & (O_NOLINK|O_NOTRANS))))
+ && (!lastcomp
+ || mustbedir /* "foo/" must see that foo points to a dir */
+ || !(flags & (O_NOLINK|O_NOTRANS))))
{
size_t nextnamelen, newnamelen, linklen;
char *linkbuf;