summaryrefslogtreecommitdiff
path: root/libdiskfs/dir-lookup.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-01-25 23:18:23 +0000
committerRoland McGrath <roland@gnu.org>2000-01-25 23:18:23 +0000
commitda76c18757c058c59f4895c95d1bcccc94a16531 (patch)
tree479505e529f663cc795f951a99ecac32a6f50a9f /libdiskfs/dir-lookup.c
parentd031158b06954338d68d8925880f82884ca5205f (diff)
2000-01-25 Roland McGrath <roland@baalperazim.frob.com>
* dir-lookup.c (diskfs_S_dir_lookup): Follow symlink despite flags if MUSTBEDIR is set (i.e. there was a trailing slash).
Diffstat (limited to 'libdiskfs/dir-lookup.c')
-rw-r--r--libdiskfs/dir-lookup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 6e085e27..91e9ea48 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -1,5 +1,5 @@
/* libdiskfs implementation of fs.defs:dir_lookup
- Copyright (C) 1992,93,94,95,96,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -306,7 +306,9 @@ diskfs_S_dir_lookup (struct protid *dircred,
}
if (S_ISLNK (np->dn_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))))
{
/* Handle symlink interpretation */