/* 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 */
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 {
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);
#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,
- struct AFS_UCRED *acred)
+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,
- struct AFS_UCRED *acred)
+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);
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;
}
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)
}
}
-#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,
- struct AFS_UCRED *acred)
+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);
return afs_GetAccessBits(avc, arights, &treq);
}
-#endif /* defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS) */
+#endif /* defined(UKERNEL) */