From 1c46493032e77e5b8d59557f0f4984e0bec01570 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Thu, 19 Jul 2001 18:41:23 +0000 Subject: [PATCH] resolve-symlinks-from-stat-cache-with-just-lookup-permission-20010719 To fix bug reported by Nathan Rawling. --- src/afs/VNOPS/afs_vnop_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index b8a5693c9..03379a8fa 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -1003,8 +1003,8 @@ afs_lookup(adp, aname, avcp, acred) tvc = osi_dnlc_lookup (adp, tname, WRITE_LOCK); *avcp = tvc; /* maybe wasn't initialized, but it is now */ if (tvc) { - if (no_read_access && vType(tvc) != VDIR) { - /* need read access on dir to stat non-directory */ + if (no_read_access && vType(tvc) != VDIR && vType(tvc) != VLNK) { + /* need read access on dir to stat non-directory / non-link */ afs_PutVCache(tvc, WRITE_LOCK); *avcp = (struct vcache *)0; code = EACCES; -- 2.39.5