]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: Fix directory to service null mask lookups
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 9 Mar 2013 20:43:14 +0000 (15:43 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 11 Mar 2013 14:04:48 +0000 (07:04 -0700)
The direct to service for non-wildcard lookups, commit
b7ba97ad537bd0e9a241f052ddd1c3a50c74745b, introduced a bug when the search
mask is left unspecified.   Do not set bNonWildcardMatch to TRUE
when the mask is NULL.

Change-Id: I6c4846b443acc7e5e42d4e83e75ef383fc400db9
Reviewed-on: http://gerrit.openafs.org/9542
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSDirControl.cpp

index c2354d02ceb0defd8f1458014f60443216a15e3d..eda3fe5d5a4c411c429c83f98a2d01446561cce7 100644 (file)
@@ -207,6 +207,7 @@ AFSQueryDirectory( IN PIRP Irp)
         if( bInitialQuery &&
             BooleanFlagOn( pCcb->Flags, CCB_FLAG_DIRECTORY_QUERY_DIRECT_QUERY))
         {
+
             bInitialQuery = FALSE;
         }
         else if( bRestartScan)
@@ -217,12 +218,19 @@ AFSQueryDirectory( IN PIRP Irp)
 
             ClearFlag( pCcb->Flags, CCB_FLAG_DIRECTORY_QUERY_DIRECT_QUERY);
 
-            if( !FsRtlDoesNameContainWildCards( &pCcb->MaskName))
+            AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+                          AFS_TRACE_LEVEL_VERBOSE,
+                          "AFSQueryDirectory Enumerating content for parent %wZ Mask %wZ Restart Query\n",
+                          &pCcb->DirectoryCB->NameInformation.FileName,
+                          &pCcb->MaskName);
+
+            if( pCcb->MaskName.Length > 0 &&
+                !FsRtlDoesNameContainWildCards( &pCcb->MaskName))
             {
 
                 if( RtlCompareUnicodeString( &AFSPIOCtlName,
-                                                &pCcb->MaskName,
-                                                TRUE) != 0)
+                                             &pCcb->MaskName,
+                                             TRUE) != 0)
                 {
                     bNonWildcardMatch = TRUE;
                 }
@@ -341,6 +349,12 @@ AFSQueryDirectory( IN PIRP Irp)
                 else
                 {
 
+                    AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                  AFS_TRACE_LEVEL_VERBOSE,
+                                  "AFSQueryDirectory FsRtlDoesNameContainWildCards == FALSE parent %wZ Mask %wZ\n",
+                                  &pCcb->DirectoryCB->NameInformation.FileName,
+                                  puniArgFileName);
+
                     RtlCopyMemory( pCcb->MaskName.Buffer,
                                    puniArgFileName->Buffer,
                                    pCcb->MaskName.Length);