[OpenAFS-devel] Symlink bug in openafs-1.10?

Nickolai Zeldovich kolya@MIT.EDU
Thu, 19 Jul 2001 13:25:59 -0400


> This functionality seems to have changed in 1.1.0. My symlinks no longer
> resolve:

Yeah, this seems like a bug.  Here's a patch that should fix it.

-- kolya

--- src/afs/VNOPS/afs_vnop_lookup.c	2001/07/12 19:58:22	1.11
+++ src/afs/VNOPS/afs_vnop_lookup.c	2001/07/19 17:26:11
@@ -1003,8 +1003,8 @@
     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;