Windows: More specific error values
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSNameSupport.cpp
index 258e671..7ce548e 100644 (file)
@@ -154,7 +154,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                               pCurrentObject->FileId.Volume,
                               pCurrentObject->FileId.Vnode,
                               pCurrentObject->FileId.Unique,
-                              ntStatus);
+                              STATUS_FILE_DELETED);
 
                 try_return( ntStatus = STATUS_FILE_DELETED);
             }
@@ -171,7 +171,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                               pCurrentObject->FileId.Volume,
                               pCurrentObject->FileId.Vnode,
                               pCurrentObject->FileId.Unique,
-                              ntStatus);
+                              STATUS_DELETE_PENDING);
 
                 try_return( ntStatus = STATUS_DELETE_PENDING);
             }
@@ -361,7 +361,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                     if( pDirEntry->NameInformation.TargetName.Length == 0)
                     {
 
-                        ntStatus = STATUS_ACCESS_DENIED;
+                        ntStatus = STATUS_REPARSE_POINT_NOT_RESOLVED;
 
                         AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                                       AFS_TRACE_LEVEL_ERROR,
@@ -845,7 +845,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
 
                         bReleaseCurrentVolume = FALSE;
 
-                        try_return( ntStatus = STATUS_ACCESS_DENIED);
+                        try_return( ntStatus);
                     }
 
                     ASSERT( pCurrentVolume->VolumeReferenceCount > 1);
@@ -1557,7 +1557,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
 
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_ERROR,
-                              "AFSLocateNameEntry (FO: %08lX) Deleted parent %wZ FID %08lX-%08lX-%08lX-%08lX\n",
+                              "AFSLocateNameEntry (FO: %08lX) Deleted entry %wZ FID %08lX-%08lX-%08lX-%08lX\n",
                               FileObject,
                               &pDirEntry->NameInformation.FileName,
                               pCurrentObject->FileId.Cell,
@@ -1581,7 +1581,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                 if( InterlockedDecrement( &pDirEntry->OpenReferenceCount) == 0)
                 {
 
-                    AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
+                    AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING|AFS_SUBSYSTEM_CLEANUP_PROCESSING,
                                   AFS_TRACE_LEVEL_VERBOSE,
                                   "AFSLocateNameEntry Deleting dir entry %08lX (%08lX) for %wZ\n",
                                   pDirEntry,
@@ -3581,7 +3581,6 @@ AFSCheckCellName( IN GUID *AuthGroup,
 
     NTSTATUS ntStatus = STATUS_SUCCESS;
     UNICODE_STRING uniName;
-    AFSFileID stFileID;
     AFSDirEnumEntry *pDirEnumEntry = NULL;
     AFSDeviceExt *pDevExt = (AFSDeviceExt *)AFSRDRDeviceObject->DeviceExtension;
     AFSDirHdr *pDirHdr = &AFSGlobalRoot->ObjectInformation.Specific.Directory.DirectoryNodeHdr;
@@ -3644,10 +3643,8 @@ AFSCheckCellName( IN GUID *AuthGroup,
         // OK, ask the CM about this component name
         //
 
-        stFileID = AFSGlobalRoot->ObjectInformation.FileId;
-
         ntStatus = AFSEvaluateTargetByName( AuthGroup,
-                                            &stFileID,
+                                            &AFSGlobalRoot->ObjectInformation,
                                             CellName,
                                             &pDirEnumEntry);
 
@@ -3918,7 +3915,7 @@ AFSBuildMountPointTarget( IN GUID *AuthGroup,
                               DirectoryCB->ObjectInformation->FileId.Vnode,
                               DirectoryCB->ObjectInformation->FileId.Unique);
 
-                try_return( ntStatus = STATUS_ACCESS_DENIED);
+                try_return( ntStatus = STATUS_REPARSE_POINT_NOT_RESOLVED);
             }
 
             AFSAcquireExcl( &DirectoryCB->NonPaged->Lock,
@@ -4301,7 +4298,7 @@ AFSProcessDFSLink( IN AFSDirectoryCB *DirEntry,
                 if( NT_SUCCESS( ntStatus))
                 {
 
-                    ntStatus = STATUS_ACCESS_DENIED;
+                    ntStatus = STATUS_REPARSE_POINT_NOT_RESOLVED;
                 }
 
                 try_return( ntStatus);