resolve-symlinks-from-stat-cache-with-just-lookup-permission-20010719
[openafs.git] / src / afs / VNOPS / afs_vnop_lookup.c
index 0346dc0..03379a8 100644 (file)
@@ -19,8 +19,8 @@
  * afs_index
  */
 
-#include "../afs/param.h"      /* Should be always first */
 #include <afsconfig.h>
+#include "../afs/param.h"
 
 RCSID("$Header$");
 
@@ -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;