resolve-symlinks-from-stat-cache-with-just-lookup-permission-20010719
authorNickolai Zeldovich <kolya@mit.edu>
Thu, 19 Jul 2001 18:41:23 +0000 (18:41 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 19 Jul 2001 18:41:23 +0000 (18:41 +0000)
To fix bug reported by Nathan Rawling.

src/afs/VNOPS/afs_vnop_lookup.c

index b8a5693..03379a8 100644 (file)
@@ -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;