If the cm_scache_t.dataVersion is set to CM_SCACHE_VERSION_BAD,
invalidate the redirector notion of status so that we do not
leak info to users that do not have permission.
If the dataVersion is CM_SCACHE_VERSION_BAD and is updated
with real status info, invalidate the redirector so it attempts
to read the directory contents.
Change-Id: Iaa15b37f7f1863169ffe93ae9bc3d24086a3b734
Reviewed-on: http://gerrit.openafs.org/6159
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
scp->parentVnode = 0;
scp->parentUnique = 0;
}
- goto done;
+
+ if (RDR_Initialized)
+ rdr_invalidate = 1;
} else {
_InterlockedAnd(&scp->flags, ~CM_SCACHEFLAG_EACCESS);
}
scp->bufDataVersionLow == 0)
scp->bufDataVersionLow = dataVersion;
- if (RDR_Initialized && scp->dataVersion != CM_SCACHE_VERSION_BAD) {
- if ( ( !(reqp->flags & CM_REQ_SOURCE_REDIR) || !(flags & (CM_MERGEFLAG_DIROP|CM_MERGEFLAG_STOREDATA))) &&
+ if (RDR_Initialized) {
+ if (scp->dataVersion != CM_SCACHE_VERSION_BAD) {
+ rdr_invalidate = 1;
+ } else if ( ( !(reqp->flags & CM_REQ_SOURCE_REDIR) || !(flags & (CM_MERGEFLAG_DIROP|CM_MERGEFLAG_STOREDATA))) &&
scp->dataVersion != dataVersion && (dataVersion - scp->dataVersion > activeRPCs - 1)) {
rdr_invalidate = 1;
} else if ( (reqp->flags & CM_REQ_SOURCE_REDIR) && (flags & (CM_MERGEFLAG_DIROP|CM_MERGEFLAG_STOREDATA)) &&