From da76c18757c058c59f4895c95d1bcccc94a16531 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 25 Jan 2000 23:18:23 +0000 Subject: 2000-01-25 Roland McGrath * dir-lookup.c (diskfs_S_dir_lookup): Follow symlink despite flags if MUSTBEDIR is set (i.e. there was a trailing slash). --- libdiskfs/dir-lookup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libdiskfs/dir-lookup.c') 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 */ -- cgit v1.2.3