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