ukernel: make web enhancements the default
[openafs.git] / src / afs / VNOPS / afs_vnop_access.c
index 8e33d36..4df769e 100644 (file)
@@ -51,8 +51,8 @@ static char fileModeMap[8] = {
 
 /* avc must be held.  Returns bit map of mode bits.  Ignores file mode bits */
 afs_int32
-afs_GetAccessBits(register struct vcache *avc, register afs_int32 arights,
-                 register struct vrequest *areq)
+afs_GetAccessBits(struct vcache *avc, afs_int32 arights,
+                 struct vrequest *areq)
 {
     AFS_STATCNT(afs_GetAccessBits);
     /* see if anyuser has the required access bits */
@@ -79,8 +79,7 @@ afs_GetAccessBits(register struct vcache *avc, register afs_int32 arights,
        if (!tu) {
            return (arights & avc->f.anyAccess);
        }
-       if ((tu->vid == UNDEFVID) || !(tu->states & UHasTokens)
-           || (tu->states & UTokensBad)) {
+       if (!(tu->states & UHasTokens) || (tu->states & UTokensBad)) {
            afs_PutUser(tu, READ_LOCK);
            return (arights & avc->f.anyAccess);
        } else {
@@ -110,11 +109,11 @@ int
 afs_AccessOK(struct vcache *avc, afs_int32 arights, struct vrequest *areq,
             afs_int32 check_mode_bits)
 {
-    register struct vcache *tvc;
+    struct vcache *tvc;
     struct VenusFid dirFid;
-    register afs_int32 mask;
+    afs_int32 mask;
     afs_int32 dirBits;
-    register afs_int32 fileBits;
+    afs_int32 fileBits;
 
     AFS_STATCNT(afs_AccessOK);
 
@@ -190,15 +189,15 @@ afs_AccessOK(struct vcache *avc, afs_int32 arights, struct vrequest *areq,
 
 #if defined(AFS_SUN5_ENV) || (defined(AFS_SGI_ENV) && !defined(AFS_SGI65_ENV))
 int
-afs_access(OSI_VC_DECL(avc), register afs_int32 amode, int flags,
+afs_access(OSI_VC_DECL(avc), afs_int32 amode, int flags,
           afs_ucred_t *acred)
 #else
 int
-afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
+afs_access(OSI_VC_DECL(avc), afs_int32 amode,
           afs_ucred_t *acred)
 #endif
 {
-    register afs_int32 code;
+    afs_int32 code;
     struct vrequest treq;
     struct afs_fakestat_state fakestate;
     OSI_VC_CONVERT(avc);
@@ -251,7 +250,7 @@ afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
     if ((amode & VWRITE) && (AFS_IS_DISCONNECTED && !AFS_IS_DISCON_RW)) {
         afs_PutFakeStat(&fakestate);
        AFS_DISCON_UNLOCK();
-       printf("Network is down in afs_vnop_access\n");
+       /* printf("Network is down in afs_vnop_access\n"); */
         return ENETDOWN;
     }
     
@@ -295,18 +294,6 @@ afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
            if (amode & VEXEC) {
                code = afs_AccessOK(avc, PRSFS_READ, &treq, CHECK_MODE_BITS);
                if (code) {
-#ifdef AFS_OSF_ENV
-                   /*
-                    * The nfs server in read operations for non-owner of a file
-                    * will also check the access with the VEXEC (along with VREAD)
-                    * because for them exec is the same as read over the net because of
-                    * demand loading. But this means if the mode bit is '-rw' the call
-                    * will fail below; so for this particular case where both modes are
-                    * specified (only in rfs_read so far) and from the xlator requests
-                    * we return succes.
-                    */
-                   if (!((amode & VREAD) && AFS_NFSXLATORREQ(acred)))
-#endif
                        if ((avc->f.m.Mode & 0100) == 0)
                            code = 0;
                } else if (avc->f.m.Mode & 0100)
@@ -344,16 +331,16 @@ afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
     }
 }
 
-#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
+#if defined(UKERNEL)
 /*
  * afs_getRights
  * This function is just an interface to afs_GetAccessBits
  */
 int
-afs_getRights(OSI_VC_DECL(avc), register afs_int32 arights,
+afs_getRights(OSI_VC_DECL(avc), afs_int32 arights,
              afs_ucred_t *acred)
 {
-    register afs_int32 code;
+    afs_int32 code;
     struct vrequest treq;
     OSI_VC_CONVERT(avc);
 
@@ -368,4 +355,4 @@ afs_getRights(OSI_VC_DECL(avc), register afs_int32 arights,
 
     return afs_GetAccessBits(avc, arights, &treq);
 }
-#endif /* defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS) */
+#endif /* defined(UKERNEL) */