Windows: AFSParseRelatedName always use related name
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 11 Aug 2014 05:41:52 +0000 (01:41 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Aug 2014 16:49:59 +0000 (12:49 -0400)
When parsing a RelatedFileObject always refer to the RelatedFileObject
FileName and not the IrpSp->FileObject.

Set the output FileName to pRelatedCcb->FullFileName

Test pRelatedCcb->FullFileName for wild cards

Change-Id: I86f5bb7fc05eddc0d3d1ca9fbb069248af23be98
Reviewed-on: http://gerrit.openafs.org/11396
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

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

index 69a61a5..70b341b 100644 (file)
@@ -3118,7 +3118,7 @@ AFSParseRelatedName( IN PIRP Irp,
         // On error, FileName indicates the path on which the failure occurred.
         //
 
-        *FileName = pIrpSp->FileObject->FileName;
+        *FileName = pRelatedCcb->FullFileName;
 
         //
         // No wild cards in the name
@@ -3126,23 +3126,23 @@ AFSParseRelatedName( IN PIRP Irp,
 
         AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
                       AFS_TRACE_LEVEL_VERBOSE_2,
-                      "AFSParseNameRelated (%p) Relative open for %wZ FID %08lX-%08lX-%08lX-%08lX component %wZ\n",
+                      "AFSParseRelatedName (%p) %wZ FID %08lX-%08lX-%08lX-%08lX %wZ\n",
                       Irp,
                       &pRelatedCcb->DirectoryCB->NameInformation.FileName,
                       pRelatedFcb->ObjectInformation->FileId.Cell,
                       pRelatedFcb->ObjectInformation->FileId.Volume,
                       pRelatedFcb->ObjectInformation->FileId.Vnode,
                       pRelatedFcb->ObjectInformation->FileId.Unique,
-                      &uniFullName));
+                      &pRelatedCcb->FullFileName));
 
-        if( FsRtlDoesNameContainWildCards( &uniFullName))
+        if( FsRtlDoesNameContainWildCards( &pRelatedCcb->FullFileName))
         {
 
             AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
                           AFS_TRACE_LEVEL_ERROR,
                           "AFSParseNameRelated (%p) Component %wZ contains wild cards\n",
                           Irp,
-                          &uniFullName));
+                          &pRelatedCcb->FullFileName));
 
             try_return( ntStatus = STATUS_OBJECT_NAME_INVALID);
         }