In the case where an explicit mount point to a .backup volume is
resolved from a .backup volume the cache manager refuses to evaluate
the mount point target. This is meant to address unwanted recursion
in the directory tree searches.
Change the error code to ERROR_TOO_MANY_SYMLINKS and propagate that
error to the AFS redirector. That will result in the application
receiving STATUS_ACCESS_DENIED instead of
STATUS_REPARSE_POINT_NOT_RESOLVED.
The STATUS_REPARSE_POINT_NOT_RESOLVED error causes cmd.exe and
powershell.exe to terminate recursive directory searches.
Change-Id: I5dfdd835e8696b823af45a8e5c33a5ca6320cf31
Reviewed-on: http://gerrit.openafs.org/11693
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
if (targetType == BACKVOL
&& (scp->flags & (CM_SCACHEFLAG_RO | CM_SCACHEFLAG_PURERO))
== CM_SCACHEFLAG_RO) {
- code = CM_ERROR_NOSUCHVOLUME;
+ code = CM_ERROR_TOO_MANY_SYMLINKS;
goto done;
}
} else {
osi_Log2(afsd_logp, "RDR_PopulateCurrentEntry cm_FollowMountPoint failed scp=0x%p code=0x%x",
scp, code2);
+ if (code2 == CM_ERROR_TOO_MANY_SYMLINKS)
+ code = CM_ERROR_TOO_MANY_SYMLINKS;
}
}
} else {