Windows: LocateName skip DFS Link only last component
authorpete scott <pscott@kerneldrivers.com>
Mon, 11 Aug 2014 17:18:16 +0000 (13:18 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Aug 2014 16:51:17 +0000 (12:51 -0400)
As with Mount Points and Symlinks, when AFSLocateName() is called to
process a CreateFile with Open_Reparse_Point enabled, DFS Link processing
must be disabled only for the last component in the path.  Failure to
do so results in the AFS Redirector succeeding IRP_MJ_CREATE calls that
should be given back to the IO Manager so the path can be evaluated by
another file system.

Change-Id: I1627e7c6582d3a80d99dd2acc5171135a6a7bc4b
Reviewed-on: http://gerrit.openafs.org/11398
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp

index 70b341b..bf78512 100644 (file)
@@ -1122,7 +1122,8 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                 case AFS_FILE_TYPE_DFSLINK:
                 {
 
-                    if( BooleanFlagOn( Flags, AFS_LOCATE_FLAGS_NO_DFS_LINK_EVAL))
+                   if( BooleanFlagOn( Flags, AFS_LOCATE_FLAGS_NO_DFS_LINK_EVAL) &&
+                       uniRemainingPath.Length == 0)
                     {
 
                         //