36#define NTFS_MAX_NAME_LENGTH 255
89 DPRINT(
"Getting position %I64x\n",
255 DPRINT(
"NtfsGetNetworkOpenInformation(%p, %p, %p, %p)\n",
Fcb, DeviceExt, NetworkInfo,
BufferLength);
291 FileRecord = ExAllocateFromNPagedLookasideList(&DeviceExt->FileRecLookasideList);
292 if (FileRecord ==
NULL)
294 DPRINT1(
"Not enough memory!\n");
301 DPRINT1(
"Can't find record!\n");
302 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
327 if (Previous !=
NULL)
331 Previous = CurrentInfo;
340 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
348 const PCSTR fileInfoClassNames[] = {
"???????",
349 "FileDirectoryInformation",
350 "FileFullDirectoryInformation",
351 "FileBothDirectoryInformation",
352 "FileBasicInformation",
353 "FileStandardInformation",
354 "FileInternalInformation",
356 "FileAccessInformation",
357 "FileNameInformation",
358 "FileRenameInformation",
359 "FileLinkInformation",
360 "FileNamesInformation",
361 "FileDispositionInformation",
362 "FilePositionInformation",
363 "FileFullEaInformation",
364 "FileModeInformation",
365 "FileAlignmentInformation",
366 "FileAllInformation",
367 "FileAllocationInformation",
368 "FileEndOfFileInformation",
369 "FileAlternateNameInformation",
370 "FileStreamInformation",
371 "FilePipeInformation",
372 "FilePipeLocalInformation",
373 "FilePipeRemoteInformation",
374 "FileMailslotQueryInformation",
375 "FileMailslotSetInformation",
376 "FileCompressionInformation",
377 "FileObjectIdInformation",
378 "FileCompletionInformation",
379 "FileMoveClusterInformation",
380 "FileQuotaInformation",
381 "FileReparsePointInformation",
382 "FileNetworkOpenInformation",
383 "FileAttributeTagInformation",
384 "FileTrackingInformation",
385 "FileIdBothDirectoryInformation",
386 "FileIdFullDirectoryInformation",
387 "FileValidDataLengthInformation",
388 "FileShortNameInformation",
389 "FileIoCompletionNotificationInformation",
390 "FileIoStatusBlockRangeInformation",
391 "FileIoPriorityHintInformation",
392 "FileSfioReserveInformation",
393 "FileSfioVolumeInformation",
394 "FileHardLinkInformation",
395 "FileProcessIdsUsingFileInformation",
396 "FileNormalizedNameInformation",
397 "FileNetworkPhysicalNameInformation",
398 "FileIdGlobalTxDirectoryInformation",
399 "FileIsRemoteDeviceInformation",
400 "FileAttributeCacheInformation",
401 "FileNumaNodeInformation",
402 "FileStandardLinkInformation",
403 "FileRemoteProtocolInformation",
404 "FileReplaceCompletionInformation",
405 "FileMaximumInformation",
406 "FileDirectoryInformation",
407 "FileFullDirectoryInformation",
408 "FileBothDirectoryInformation",
409 "FileBasicInformation",
410 "FileStandardInformation",
411 "FileInternalInformation",
413 "FileAccessInformation",
414 "FileNameInformation",
415 "FileRenameInformation",
416 "FileLinkInformation",
417 "FileNamesInformation",
418 "FileDispositionInformation",
419 "FilePositionInformation",
420 "FileFullEaInformation",
421 "FileModeInformation",
422 "FileAlignmentInformation",
423 "FileAllInformation",
424 "FileAllocationInformation",
425 "FileEndOfFileInformation",
426 "FileAlternateNameInformation",
427 "FileStreamInformation",
428 "FilePipeInformation",
429 "FilePipeLocalInformation",
430 "FilePipeRemoteInformation",
431 "FileMailslotQueryInformation",
432 "FileMailslotSetInformation",
433 "FileCompressionInformation",
434 "FileObjectIdInformation",
435 "FileCompletionInformation",
436 "FileMoveClusterInformation",
437 "FileQuotaInformation",
438 "FileReparsePointInformation",
439 "FileNetworkOpenInformation",
440 "FileAttributeTagInformation",
441 "FileTrackingInformation",
442 "FileIdBothDirectoryInformation",
443 "FileIdFullDirectoryInformation",
444 "FileValidDataLengthInformation",
445 "FileShortNameInformation",
446 "FileIoCompletionNotificationInformation",
447 "FileIoStatusBlockRangeInformation",
448 "FileIoPriorityHintInformation",
449 "FileSfioReserveInformation",
450 "FileSfioVolumeInformation",
451 "FileHardLinkInformation",
452 "FileProcessIdsUsingFileInformation",
453 "FileNormalizedNameInformation",
454 "FileNetworkPhysicalNameInformation",
455 "FileIdGlobalTxDirectoryInformation",
456 "FileIsRemoteDeviceInformation",
457 "FileAttributeCacheInformation",
458 "FileNumaNodeInformation",
459 "FileStandardLinkInformation",
460 "FileRemoteProtocolInformation",
461 "FileReplaceCompletionInformation",
462 "FileMaximumInformation" };
463 return fileInfoClassNames[infoClass];
482 DPRINT(
"NtfsQueryInformation(%p)\n", IrpContext);
491 SystemBuffer =
Irp->AssociatedIrp.SystemBuffer;
577 Irp->IoStatus.Information =
580 Irp->IoStatus.Information = 0;
635 ULONG AttributeOffset;
641 FileRecord = ExAllocateFromNPagedLookasideList(&DeviceExt->FileRecLookasideList);
642 if (FileRecord ==
NULL)
644 DPRINT1(
"Couldn't allocate memory for file record!");
649 DPRINT(
"Reading file record...\n");
655 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
670 DPRINT1(
"Couldn't decrease file size!\n");
671 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
677 DPRINT(
"Finding Data Attribute...\n");
690 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
706 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
716 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
723 if (FileNameAttribute ==
NULL)
725 DPRINT1(
"Unable to find FileName attribute associated with file!\n");
727 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
738 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
839 DPRINT(
"NtfsSetBasicInformation(%p, %p, %p)\n", DeviceExt,
Fcb, BasicInfo);
841 FileRecord = ExAllocateFromNPagedLookasideList(&DeviceExt->FileRecLookasideList);
842 if (FileRecord ==
NULL)
844 DPRINT1(
"Not enough memory!\n");
852 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
860 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
900 DPRINT1(
"Failed to refresh the duplicated information for %wS (Status %lx)\n",
904 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
947 DPRINT(
"NtfsSetDispositionInformation(%p, %p, %p, %s, %p)\n",
948 DeviceExt,
Fcb,
FileObject, CaseSensitive ?
"TRUE" :
"FALSE", DispositionInfo);
959 DPRINT1(
"NTFS write-support is EXPERIMENTAL and is disabled by default!\n");
1012 if (
Name->Length == 0 ||
1019 if ((
Name->Length ==
sizeof(
WCHAR) &&
Name->Buffer[0] ==
L'.') ||
1020 (
Name->Length == 2 *
sizeof(
WCHAR) &&
Name->Buffer[0] ==
L'.' &&
Name->Buffer[1] ==
L'.'))
1029 if (Char < 0x20 ||
wcschr(
L"\\/:*?\"<>|", Char) !=
NULL)
1054 ULONG RecordSize = DeviceExt->NtfsInfo.BytesPerFileRecord;
1061 ULONG DestOffset = FileRecord->AttributeOffset;
1065 NewRecord = ExAllocateFromNPagedLookasideList(&DeviceExt->FileRecLookasideList);
1066 if (NewRecord ==
NULL)
1112 if (DestOffset +
Source->Length + 2 *
sizeof(
ULONG) > RecordSize)
1119 DestOffset +=
Source->Length;
1131 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, NewRecord);
1155 OldLength =
wcslen(OldPath);
1159 for (
Entry = DeviceExt->FcbListHead.Flink;
Entry != &DeviceExt->FcbListHead;
Entry =
Entry->Flink)
1170 wcscpy(Rebuilt, NewPath);
1199 for (
Entry = DeviceExt->FcbListHead.Flink;
Entry != &DeviceExt->FcbListHead;
Entry =
Entry->Flink)
1234 while (
Count != 0 &&
Offset +
sizeof(
ULONG) <= DeviceExt->NtfsInfo.BytesPerFileRecord)
1250 DPRINT1(
"Couldn't restore '%.*S' in directory %I64u\n",
1285 if (TargetFileObject !=
NULL)
1287 PNTFS_FCB TargetFcb = TargetFileObject->FsContext;
1289 *
NewName = TargetFileObject->FileName;
1290 *TargetDirMft = TargetFcb->
MFTIndex;
1291 TargetDirPath = TargetFcb->
PathName;
1316 if (TargetDirLength + 1 + NameLength >=
MAX_PATH)
1324 if (TargetDirLength >= OldLength &&
1326 (TargetDirLength == OldLength || TargetDirPath[OldLength] ==
L'\\'))
1333 NewPath[TargetDirLength] =
L'\\';
1335 NewPath[TargetDirLength + 1 + NameLength] =
UNICODE_NULL;
1362 while (
Offset +
sizeof(
ULONG) <= DeviceExt->NtfsInfo.BytesPerFileRecord)
1373 if (SeenName &&
Parent != *ParentMft)
1420 ULONG FirstEntry = 0;
1434 if (!ReplaceIfExists)
1446 if (ExistingFcb !=
NULL)
1481 *NewValueLength = 0;
1494 Value->DirectoryFileReferenceNumber = TargetDirMft | ((
ULONGLONG)Scratch->SequenceNumber << 48);
1506 *NewValueLength =
Length;
1531 while (
Offset +
sizeof(
ULONG) <= DeviceExt->NtfsInfo.BytesPerFileRecord)
1594 RecordChanged =
TRUE;
1668 ULONG NewValueLength;
1689 FileRecord = ExAllocateFromNPagedLookasideList(&DeviceExt->FileRecLookasideList);
1690 Original = ExAllocateFromNPagedLookasideList(&DeviceExt->FileRecLookasideList);
1691 if (FileRecord ==
NULL || Original ==
NULL)
1705 if (TargetFileObject ==
NULL)
1706 TargetDirMft = OldParentMft;
1717 RtlCopyMemory(Original, FileRecord, DeviceExt->NtfsInfo.BytesPerFileRecord);
1737 if (NewValue !=
NULL)
1739 if (Original !=
NULL)
1740 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, Original);
1741 if (FileRecord !=
NULL)
1742 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, FileRecord);
1761 DPRINT(
"NtfsSetInformation(%p)\n", IrpContext);
1771 SystemBuffer =
Irp->AssociatedIrp.SystemBuffer;
1866 Stack->Parameters.SetFile.ReplaceIfExists,
1885 Irp->IoStatus.Information =
1888 Irp->IoStatus.Information = 0;
static USHORT USHORT * NewLength
#define ALIGN_UP_BY(size, align)
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
struct NTFS_ATTR_RECORD * PNTFS_ATTR_RECORD
#define NTFS_FILE_NAME_DOS
#define NTFS_FILE_NAME_WIN32
#define NTFS_FILE_NAME_POSIX
#define NTFS_FILE_NAME_WIN32_AND_DOS
static BOOLEAN NtfsFindMftRecord(_In_ PNTFS_VOLUME_INFO Volume, _In_ ULONGLONG MFTIndex, _In_ PCSTR FileName, _Out_ PULONGLONG OutMFTIndex, _Out_ PULONG FileAttributes)
#define STATUS_NOT_IMPLEMENTED
_In_ ULONG AllocationSize
#define NT_SUCCESS(StatCode)
#define FILE_ATTRIBUTE_NORMAL
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t)
PSTANDARD_INFORMATION GetStandardInformationFromRecord(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord)
NTSTATUS FindFirstAttribute(PFIND_ATTR_CONTXT Context, PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord, BOOLEAN OnlyResident, PNTFS_ATTR_RECORD *Attribute)
VOID FindCloseAttribute(PFIND_ATTR_CONTXT Context)
NTSTATUS FindNextAttribute(PFIND_ATTR_CONTXT Context, PNTFS_ATTR_RECORD *Attribute)
PFILENAME_ATTRIBUTE GetBestFileNameFromRecord(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord)
VOID NtfsFileFlagsToAttributes(ULONG NtfsAttributes, PULONG FileAttributes)
PNTFS_GLOBAL_DATA NtfsGlobalData
FORCEINLINE NTSTATUS NtfsMarkIrpContextForQueue(PNTFS_IRP_CONTEXT IrpContext)
struct FILENAME_ATTRIBUTE * PFILENAME_ATTRIBUTE
#define NTFS_FILENAME_UPDATE_SIZES
#define NTFS_FILENAME_UPDATE_ATTRS
#define NTFS_FILE_TYPE_READ_ONLY
#define NTFS_FILE_TYPE_DIRECTORY
#define IRPCONTEXT_CANWAIT
#define NTFS_FILENAME_UPDATE_TIMES
#define FCB_IS_VOLUME_STREAM
#define ATTR_RECORD_ALIGNMENT
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeReleaseSpinLock(sl, irql)
#define KeAcquireSpinLock(sl, irql)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExAcquireResourceSharedLite(res, wait)
#define ROUND_UP(n, align)
#define FCB_DELETE_PENDING
#define BooleanFlagOn(F, SF)
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ HANDLE _In_ ULONG FileNameLength
@ FilePositionInformation
@ FileEndOfFileInformation
@ FileInternalInformation
@ FileAttributeTagInformation
@ FileAlternateNameInformation
@ FileAllocationInformation
@ FileNetworkOpenInformation
@ FileDispositionInformation
struct _FILE_NETWORK_OPEN_INFORMATION FILE_NETWORK_OPEN_INFORMATION
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
struct _FILE_INTERNAL_INFORMATION FILE_INTERNAL_INFORMATION
_In_ ULONGLONG _In_ PUNICODE_STRING _In_ PUNICODE_STRING LongName
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING StreamName
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define KeLeaveCriticalRegion()
#define KeEnterCriticalRegion()
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
NTSTATUS ReadFileRecord(PDEVICE_EXTENSION Vcb, ULONGLONG index, PFILE_RECORD_HEADER file)
NTSTATUS UpdateFileRecord(PDEVICE_EXTENSION Vcb, ULONGLONG MftIndex, PFILE_RECORD_HEADER FileRecord)
NTSTATUS NtfsUpdateDuplicatedInformation(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord, ULONGLONG MFTIndex, ULONG Flags, BOOLEAN CaseSensitive)
VOID ReleaseAttributeContext(PNTFS_ATTR_CONTEXT Context)
NTSTATUS NtfsIsDirectoryEmpty(_In_ PDEVICE_EXTENSION Vcb, _In_ ULONGLONG MftIndex, _Out_ PBOOLEAN Empty)
NTSTATUS NtfsRemoveFilenameFromDirectory(PDEVICE_EXTENSION DeviceExt, ULONGLONG DirectoryMftIndex, PFILENAME_ATTRIBUTE FilenameAttribute, BOOLEAN CaseSensitive)
NTSTATUS NtfsDeleteFileRecord(PDEVICE_EXTENSION DeviceExt, ULONGLONG MftIndex, BOOLEAN CaseSensitive)
ULONGLONG AttributeDataLength(PNTFS_ATTR_RECORD AttrRecord)
NTSTATUS FindAttribute(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER MftRecord, ULONG Type, PCWSTR Name, ULONG NameLength, PNTFS_ATTR_CONTEXT *AttrCtx, PULONG Offset)
VOID SetFileRecordEnd(PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttrEnd, ULONG EndMarker)
NTSTATUS NtfsAddFilenameToDirectory(PDEVICE_EXTENSION DeviceExt, ULONGLONG DirectoryMftIndex, ULONGLONG FileReferenceNumber, PFILENAME_ATTRIBUTE FilenameAttribute, BOOLEAN CaseSensitive)
NTSTATUS NtfsResizeAllocation(_In_ PNTFS_FCB Fcb, _In_ PFILE_OBJECT FileObject, _In_ BOOLEAN CaseSensitive, _In_ ULONGLONG AllocationSize)
ULONGLONG AttributeAllocatedLength(PNTFS_ATTR_RECORD AttrRecord)
NTSTATUS SetAttributeDataLength(PFILE_OBJECT FileObject, PNTFS_FCB Fcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, PLARGE_INTEGER DataSize)
#define ExFreePoolWithTag(_P, _T)
#define FILE_STANDARD_INFORMATION
#define FILE_BASIC_INFORMATION
_In_ UINT _In_ UINT BytesToCopy
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
#define _Out_writes_z_(s)
struct _FILE_POSITION_INFORMATION FILE_POSITION_INFORMATION
struct _FILE_END_OF_FILE_INFORMATION * PFILE_END_OF_FILE_INFORMATION
#define FILE_ATTRIBUTE_DIRECTORY
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG IN FILE_INFORMATION_CLASS FileInformationClass
ULONGLONG NtfsGetFileSize(PDEVICE_EXTENSION DeviceExt, PFILE_RECORD_HEADER FileRecord, PCWSTR Stream, ULONG StreamLength, PULONGLONG AllocatedSize)
BOOLEAN NtfsFCBIsDirectory(PNTFS_FCB Fcb)
PNTFS_FCB NtfsGrabFCBFromTable(PNTFS_VCB Vcb, PCWSTR FileName)
BOOLEAN NtfsFCBIsRoot(PNTFS_FCB Fcb)
VOID NtfsReleaseFCB(PNTFS_VCB Vcb, PNTFS_FCB Fcb)
static NTSTATUS NtfsGetAttributeTagInformation(PNTFS_FCB Fcb, PFILE_ATTRIBUTE_TAG_INFORMATION AttributeTagInfo, PULONG BufferLength)
static VOID NtfsRelinkFileNames(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PFILE_RECORD_HEADER FileRecord, _In_ ULONGLONG FileReference, _In_ ULONG Count, _In_ BOOLEAN CaseSensitive)
static NTSTATUS NtfsBuildRenamedFileName(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PFILENAME_ATTRIBUTE OldName, _In_ ULONGLONG TargetDirMft, _In_ PUNICODE_STRING NewName, _In_ BOOLEAN CaseSensitive, _Out_ PFILE_RECORD_HEADER Scratch, _Outptr_ PFILENAME_ATTRIBUTE *NewValue, _Out_ PULONG NewValueLength)
static NTSTATUS NtfsGetNameInformation(PFILE_OBJECT FileObject, PNTFS_FCB Fcb, PDEVICE_OBJECT DeviceObject, PFILE_NAME_INFORMATION NameInfo, PULONG BufferLength)
static BOOLEAN NtfsIsValidFileName(_In_ PCUNICODE_STRING Name)
static NTSTATUS NtfsGetStreamInformation(PNTFS_FCB Fcb, PDEVICE_EXTENSION DeviceExt, PFILE_STREAM_INFORMATION StreamInfo, PULONG BufferLength)
static VOID NtfsRenameFcbs(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PNTFS_FCB Fcb, _In_ PCWSTR NewPath)
static NTSTATUS NtfsSetBasicInformation(PDEVICE_EXTENSION DeviceExt, PNTFS_FCB Fcb, BOOLEAN CaseSensitive, PFILE_BASIC_INFORMATION BasicInfo)
NTSTATUS NtfsSetEndOfFile(PNTFS_FCB Fcb, PFILE_OBJECT FileObject, PDEVICE_EXTENSION DeviceExt, ULONG IrpFlags, BOOLEAN CaseSensitive, PLARGE_INTEGER NewFileSize)
static NTSTATUS NTAPI NtfsSetAllocationInformation(_In_ PNTFS_FCB Fcb, _In_ PFILE_OBJECT FileObject, _In_ PDEVICE_EXTENSION DeviceExt, _In_ ULONG IrpFlags, _In_ BOOLEAN CaseSensitive, _In_ PLARGE_INTEGER AllocationSize)
NTSTATUS NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext)
static NTSTATUS NtfsGetPositionInformation(PFILE_OBJECT FileObject, PFILE_POSITION_INFORMATION PositionInfo, PULONG BufferLength)
static NTSTATUS NtfsCommitRename(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PNTFS_FCB Fcb, _Inout_ PFILE_RECORD_HEADER FileRecord, _In_ PFILE_RECORD_HEADER Original, _In_ ULONGLONG OldParentMft, _In_ ULONGLONG TargetDirMft, _In_ PFILENAME_ATTRIBUTE NewValue, _In_ ULONG NewValueLength, _In_ BOOLEAN CaseSensitive)
static NTSTATUS NtfsSetRenameInformation(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PNTFS_FCB Fcb, _In_opt_ PFILE_OBJECT TargetFileObject, _In_ BOOLEAN ReplaceIfExists, _In_ BOOLEAN CaseSensitive, _In_ PFILE_RENAME_INFORMATION RenameInfo, _In_ ULONG BufferLength)
static NTSTATUS NtfsFindLongFileName(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PFILE_RECORD_HEADER FileRecord, _Outptr_ PFILENAME_ATTRIBUTE *LongName, _Out_ PULONGLONG ParentMft)
static NTSTATUS NtfsUnlinkFileNames(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PFILE_RECORD_HEADER FileRecord, _In_ ULONGLONG ParentMft, _In_ BOOLEAN CaseSensitive, _Out_ PULONG Removed)
const PCSTR GetInfoClassName(FILE_INFORMATION_CLASS infoClass)
static NTSTATUS NtfsBuildRenamePath(_In_ PNTFS_FCB Fcb, _In_opt_ PFILE_OBJECT TargetFileObject, _In_ PFILE_RENAME_INFORMATION RenameInfo, _In_ ULONG BufferLength, _Out_ PUNICODE_STRING NewName, _Out_writes_z_(MAX_PATH) PWSTR NewPath, _Out_ PULONGLONG TargetDirMft)
static NTSTATUS NtfsCheckRenamePaths(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PNTFS_FCB Fcb, _In_ PCWSTR NewPath)
static NTSTATUS NtfsClearRenameTarget(_In_ PDEVICE_EXTENSION DeviceExt, _In_ PNTFS_FCB Fcb, _In_ ULONGLONG TargetDirMft, _In_ PUNICODE_STRING NewName, _In_z_ PCWSTR NewPath, _In_ BOOLEAN ReplaceIfExists, _In_ BOOLEAN CaseSensitive, _Out_ PFILE_RECORD_HEADER Scratch)
static NTSTATUS NtfsGetStandardInformation(PNTFS_FCB Fcb, PDEVICE_OBJECT DeviceObject, PFILE_STANDARD_INFORMATION StandardInfo, PULONG BufferLength)
static NTSTATUS NtfsGetNetworkOpenInformation(PNTFS_FCB Fcb, PDEVICE_EXTENSION DeviceExt, PFILE_NETWORK_OPEN_INFORMATION NetworkInfo, PULONG BufferLength)
static NTSTATUS NtfsGetInternalInformation(PNTFS_FCB Fcb, PFILE_INTERNAL_INFORMATION InternalInfo, PULONG BufferLength)
NTSTATUS NtfsSetInformation(PNTFS_IRP_CONTEXT IrpContext)
static NTSTATUS NtfsSetFileNameAttribute(_In_ PDEVICE_EXTENSION DeviceExt, _Inout_ PFILE_RECORD_HEADER FileRecord, _In_ PFILENAME_ATTRIBUTE Value, _In_ ULONG ValueLength)
static NTSTATUS NtfsGetBasicInformation(PFILE_OBJECT FileObject, PNTFS_FCB Fcb, PDEVICE_OBJECT DeviceObject, PFILE_BASIC_INFORMATION BasicInfo, PULONG BufferLength)
static NTSTATUS NtfsSetDispositionInformation(PDEVICE_EXTENSION DeviceExt, PNTFS_FCB Fcb, PFILE_OBJECT FileObject, BOOLEAN CaseSensitive, PFILE_DISPOSITION_INFORMATION DispositionInfo)
#define NTFS_MAX_NAME_LENGTH
static NTSTATUS NtfsGetEaInformation(PNTFS_FCB Fcb, PFILE_EA_INFORMATION EaInfo, PULONG BufferLength)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
#define STATUS_USER_MAPPED_FILE
#define STATUS_NAME_TOO_LONG
BOOLEAN NTAPI RtlIsNameLegalDOS8Dot3(_In_ PUNICODE_STRING Name, _Inout_opt_ POEM_STRING OemName, _Inout_opt_ PBOOLEAN NameContainsSpaces)
BOOLEAN NTAPI MmCanFileBeTruncated(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER NewFileSize)
BOOLEAN NTAPI MmFlushImageSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN MMFLUSH_TYPE FlushType)
#define FileStandardInformation
#define STATUS_CANNOT_DELETE
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
struct NTFS_ATTR_RECORD::@170::@172 Resident
BOOLEAN EnableWriteSupport
PDEVICE_OBJECT DeviceObject
FSRTL_COMMON_FCB_HEADER RFCB
SECTION_OBJECT_POINTERS SectionObjectPointers
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_DIRECTORY_NOT_EMPTY
#define STATUS_ACCESS_DENIED
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_FILE_CORRUPT_ERROR
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_OBJECT_NAME_NOT_FOUND
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_Must_inspect_result_ _In_ WDFMEMORY _In_ size_t SourceOffset
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
struct _FILE_ATTRIBUTE_TAG_INFORMATION FILE_ATTRIBUTE_TAG_INFORMATION
struct _FILE_STREAM_INFORMATION * PFILE_STREAM_INFORMATION
struct _FILE_EA_INFORMATION FILE_EA_INFORMATION
#define SL_CASE_SENSITIVE
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
_In_opt_ PLARGE_INTEGER NewFileSize
_In_ PUNICODE_STRING NewName