Windows: Pass name array to AFSRetrieveFileInformation
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 2 Apr 2012 21:32:39 +0000 (17:32 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 3 Apr 2012 03:21:22 +0000 (20:21 -0700)
AFSRetrieveFileInformation does not parse the complete path.
That information is available in the Ccb->NameArray.  If the
object on which AFSRetrieveFileInformation is called is a
relative symlink containing ".." references, the full contents
of the evaluated path is required for context.  Pass the
Ccb->NameArray so that it is available.

Change-Id: Id02d3fb47df74c0a0de849eb10550be76150ce8b
Reviewed-on: http://gerrit.openafs.org/7020
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

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

index 64b8ea4..790606f 100644 (file)
@@ -814,7 +814,7 @@ AFSQueryBasicInfo( IN PIRP Irp,
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
-                                                       NULL,
+                                                       pCcb->NameArray,
                                                        &pCcb->AuthGroup,
                                                        &stFileInfo)))
             {
@@ -921,7 +921,7 @@ AFSQueryStandardInfo( IN PIRP Irp,
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
-                                                       NULL,
+                                                       pCcb->NameArray,
                                                        &pCcb->AuthGroup,
                                                        &stFileInfo)))
             {
@@ -1404,7 +1404,7 @@ AFSQueryNetworkInfo( IN PIRP Irp,
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
-                                                       NULL,
+                                                       pCcb->NameArray,
                                                        &pCcb->AuthGroup,
                                                        &stFileInfo)))
             {
@@ -1581,7 +1581,7 @@ AFSQueryAttribTagInfo( IN PIRP Irp,
             if( NT_SUCCESS( AFSRetrieveFileAttributes( pParentDirectoryCB,
                                                        DirectoryCB,
                                                        &uniParentPath,
-                                                       NULL,
+                                                       pCcb->NameArray,
                                                        &pCcb->AuthGroup,
                                                        &stFileInfo)))
             {