diff options
author | Roland McGrath <roland@gnu.org> | 2000-01-25 23:18:23 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-01-25 23:18:23 +0000 |
commit | da76c18757c058c59f4895c95d1bcccc94a16531 (patch) | |
tree | 479505e529f663cc795f951a99ecac32a6f50a9f | |
parent | d031158b06954338d68d8925880f82884ca5205f (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).
-rw-r--r-- | libdiskfs/dir-lookup.c | 6 |
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 */ |