Windows: log volume and authgroup for redir open
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 16 Dec 2011 23:24:50 +0000 (18:24 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 17 Dec 2011 17:15:00 +0000 (09:15 -0800)
If opening a volume root fails, log the authgroup and volume
to make it easier to debug the error.

Change-Id: I0c9ffc58ffaf7582a1b22043de2b5d096530de5b
Reviewed-on: http://gerrit.openafs.org/6352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

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

index c534890..13554ae 100644 (file)
@@ -926,7 +926,9 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject,
 
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_ERROR,
-                              "AFSCommonCreate Failed to open root (2) Status %08lX\n",
+                              "AFSCommonCreate Failed to open volume root %08lX-%08lX Status %08lX\n",
+                              pVolumeCB->ObjectInformation.FileId.Cell,
+                              pVolumeCB->ObjectInformation.FileId.Volume,
                               ntStatus);
 
                 InterlockedDecrement( &pDirectoryCB->OpenReferenceCount);
@@ -1465,12 +1467,32 @@ AFSOpenRoot( IN PIRP Irp,
         if( !NT_SUCCESS( ntStatus))
         {
 
+            UNICODE_STRING uniGUID;
+
+            uniGUID.Length = 0;
+            uniGUID.MaximumLength = 0;
+            uniGUID.Buffer = NULL;
+
+            if( AuthGroup != NULL)
+            {
+                RtlStringFromGUID( *AuthGroup,
+                                   &uniGUID);
+            }       
+
             AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                           AFS_TRACE_LEVEL_ERROR,
-                          "AFSOpenRoot (%08lX) Failed open in service AFSRoot Status %08lX\n",
+                          "AFSOpenRoot (%08lX) Failed open in service volume %08lX-%08lX AuthGroup %wZ Status %08lX\n",
                           Irp,
+                          VolumeCB->ObjectInformation.FileId.Cell,
+                          VolumeCB->ObjectInformation.FileId.Volume,
+                          &uniGUID,
                           ntStatus);
 
+            if( AuthGroup != NULL)
+            {
+                RtlFreeUnicodeString( &uniGUID);
+            }
+
             try_return( ntStatus);
         }