diff --git a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp index bc1358f7ec..a9b9ac949a 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp @@ -145,6 +145,7 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject, ULONG ulParseFlags = 0; GUID stAuthGroup; ULONG ulNameProcessingFlags = 0; + BOOLEAN bOpenedReparsePoint = FALSE; __Enter { @@ -648,16 +649,22 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject, } if ( BooleanFlagOn( ulOptions, FILE_OPEN_REPARSE_POINT) && - pDirectoryCB != NULL && - !BooleanFlagOn( pDirectoryCB->ObjectInformation->FileAttributes, FILE_ATTRIBUTE_REPARSE_POINT)) + pDirectoryCB != NULL) { - AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING, - AFS_TRACE_LEVEL_VERBOSE, - "AFSCommonCreate (%08lX) Reparse open request but attribute not set for %wZ Type %08lX\n", - Irp, - &uniFileName, - pDirectoryCB->ObjectInformation->FileType); + if( !BooleanFlagOn( pDirectoryCB->ObjectInformation->FileAttributes, FILE_ATTRIBUTE_REPARSE_POINT)) + { + AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING, + AFS_TRACE_LEVEL_VERBOSE, + "AFSCommonCreate (%08lX) Reparse open request but attribute not set for %wZ Type %08lX\n", + Irp, + &uniFileName, + pDirectoryCB->ObjectInformation->FileType); + } + else + { + bOpenedReparsePoint = TRUE; + } } // @@ -1052,6 +1059,11 @@ try_exit: } } + if( bOpenedReparsePoint) + { + SetFlag( pCcb->Flags, CCB_FLAG_MASK_OPENED_REPARSE_POINT); + } + AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING, AFS_TRACE_LEVEL_VERBOSE, "AFSCreate Count on %wZ DE %p Ccb %p Cnt %d\n", diff --git a/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h b/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h index 8107ea7a82..8f070c1c1f 100644 --- a/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h +++ b/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h @@ -226,6 +226,7 @@ NTSTATUS #define CCB_FLAG_RETURN_RELATIVE_ENTRIES 0x00000010 #define CCB_FLAGS_DIRECTORY_QUERY_MAPPED 0x00000020 #define CCB_FLAG_MASK_PIOCTL_QUERY 0x00000040 +#define CCB_FLAG_MASK_OPENED_REPARSE_POINT 0x00000080 // // DirEntry flags