From: Jeffrey Altman Date: Fri, 23 Jan 2015 00:48:32 +0000 (-0500) Subject: Windows: foo.backup -> foo.backup too many symlinks X-Git-Tag: openafs-stable-1_8_0pre1~364 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=0008ca80a873975e042993b30cbdc47d8f8f116b Windows: foo.backup -> foo.backup too many symlinks 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 Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_vnodeops.c b/src/WINNT/afsd/cm_vnodeops.c index 4814188..b73f90b 100644 --- a/src/WINNT/afsd/cm_vnodeops.c +++ b/src/WINNT/afsd/cm_vnodeops.c @@ -980,7 +980,7 @@ long cm_FollowMountPoint(cm_scache_t *scp, cm_scache_t *dscp, cm_user_t *userp, 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; } diff --git a/src/WINNT/afsrdr/user/RDRFunction.c b/src/WINNT/afsrdr/user/RDRFunction.c index f1c6b59..c281817 100644 --- a/src/WINNT/afsrdr/user/RDRFunction.c +++ b/src/WINNT/afsrdr/user/RDRFunction.c @@ -625,6 +625,8 @@ RDR_PopulateCurrentEntry( IN AFSDirEnumEntry * pCurrentEntry, } 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 {