windows-merge-eaccess-20070207

when merging status info that has an errorCode of EACCESS set,
merge the garbage we received.

When checking the access to the object return EACCESS if the
stat cache object has the EACCESS flag set.  This will be cleared
the next time a BulkStatus succeeds.
This commit is contained in:
Jeffrey Altman 2007-02-07 08:12:27 +00:00
parent 36233e1e31
commit e9fb99c770
2 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,12 @@ int cm_HaveAccessRights(struct cm_scache *scp, struct cm_user *userp, afs_uint32
cm_fid_t tfid; cm_fid_t tfid;
int didLock; int didLock;
long trights; long trights;
if (scp->flags & CM_SCACHEFLAG_EACCESS) {
*outRightsp = aclScp->anyAccess;
return CM_ERROR_NOACCESS;
}
didLock = 0; didLock = 0;
if (scp->fileType == CM_SCACHETYPE_DIRECTORY) { if (scp->fileType == CM_SCACHETYPE_DIRECTORY) {
aclScp = scp; aclScp = scp;

View File

@ -1313,7 +1313,6 @@ void cm_MergeStatus(cm_scache_t *scp, AFSFetchStatus *statusp, AFSVolSync *volp,
if (statusp->errorCode != 0) { if (statusp->errorCode != 0) {
scp->flags |= CM_SCACHEFLAG_EACCESS; scp->flags |= CM_SCACHEFLAG_EACCESS;
osi_Log2(afsd_logp, "Merge, Failure scp %x code 0x%x", scp, statusp->errorCode); osi_Log2(afsd_logp, "Merge, Failure scp %x code 0x%x", scp, statusp->errorCode);
return;
} else { } else {
scp->flags &= ~CM_SCACHEFLAG_EACCESS; scp->flags &= ~CM_SCACHEFLAG_EACCESS;
} }