]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: AFSParseName always set FileName output
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 11 Aug 2014 05:38:54 +0000 (01:38 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Aug 2014 16:49:22 +0000 (12:49 -0400)
The FileName output parameter is used by the caller even when an
error occurs.  In case of error it indicates that path that failed
to parse. Not all of the error paths set FileName.

Start AFSParseName() with FileName referring to
IrpSp->FileObject->FileName.  It can be updated as required later.

Change-Id: I37c615aa815affec0c8f4dfef7d8c5777650c275
Reviewed-on: http://gerrit.openafs.org/11395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp

index ead1b2b17bd701f7c45b21ffd9eca96608b1df83..69a61a5434f09a72ec28c6c9636fb90665e33cc6 100644 (file)
@@ -3114,6 +3114,12 @@ AFSParseRelatedName( IN PIRP Irp,
 
         ASSERT( pRelatedFcb != NULL);
 
+        //
+        // On error, FileName indicates the path on which the failure occurred.
+        //
+
+        *FileName = pIrpSp->FileObject->FileName;
+
         //
         // No wild cards in the name
         //
@@ -3145,8 +3151,6 @@ AFSParseRelatedName( IN PIRP Irp,
 
         pDirEntry = pRelatedCcb->DirectoryCB;
 
-        *FileName = pIrpSp->FileObject->FileName;
-
         //
         // Grab the root node while checking state
         //
@@ -3510,9 +3514,15 @@ AFSParseName( IN PIRP Irp,
 
        *ParentDirectoryCB = NULL;
 
-        //
-        // No wild cards in the name
-        //
+       //
+       // On error, FileName indicates the path on which the failure occurred
+       //
+
+       *FileName = pIrpSp->FileObject->FileName;
+
+       //
+       // No wild cards in the name
+       //
 
         uniFullName = pIrpSp->FileObject->FileName;