Changeset 78350 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Apr 29, 2019 1:40:31 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.cpp
r78339 r78350 964 964 /** 965 965 * Handle NtQueryInformationFile and similar requests. 966 * 967 * The RDBSS code has done various things before we get here wrt locking and 968 * request pre-processing. 966 969 */ 967 970 NTSTATUS VBoxMRxQueryFileInfo(IN PRX_CONTEXT RxContext) … … 974 977 ULONG cbToCopy = 0; 975 978 976 Log(("VBOXSF: MrxQueryFileInfo: InfoBuffer = %p, Size = %dbytes, FileInformationClass = %d\n",977 RxContext->Info.Buffer, RxContext->Info.Length, RxContext->Info. FileInformationClass));979 Log(("VBOXSF: MrxQueryFileInfo: Buffer = %p, Length = %x (%d) bytes, FileInformationClass = %d\n", 980 RxContext->Info.Buffer, RxContext->Info.Length, RxContext->Info.Length, RxContext->Info.FileInformationClass)); 978 981 979 982 AssertReturn(pVBoxFobx, STATUS_INVALID_PARAMETER); … … 1541 1544 1542 1545 1546 /** 1547 * Handle NtSetInformationFile and similar requests. 1548 * 1549 * The RDBSS code has done various things before we get here wrt locking and 1550 * request pre-processing. 1551 */ 1543 1552 NTSTATUS VBoxMRxSetFileInfo(IN PRX_CONTEXT RxContext) 1544 1553 { … … 1549 1558 NTSTATUS Status = STATUS_SUCCESS; 1550 1559 1551 Log(("VBOXSF: MrxSetFileInfo: Buffer=%p Length=%#x\n", 1552 RxContext->Info.Buffer, RxContext->Info.Length)); 1560 Log(("VBOXSF: MrxSetFileInfo: Buffer = %p, Length = %#x (%d), FileInformationClass = %d\n", 1561 RxContext->Info.Buffer, RxContext->Info.Length, RxContext->Info.Length, RxContext->Info.FileInformationClass)); 1562 1563 /* 1564 * The essence of the size validation table for NtSetInformationFile from w10 build 17763: 1565 * UCHAR IoCheckQuerySetFileInformation[77]: 1566 * db 28h ; 4 FileBasicInformation, 1567 * db 18h ; 10 FileRenameInformation, 1568 * db 18h ; 11 FileLinkInformation, 1569 * db 1 ; 13 FileDispositionInformation, 1570 * db 8 ; 14 FilePositionInformation, 1571 * db 4 ; 16 FileModeInformation, 1572 * db 8 ; 19 FileAllocationInformation, 1573 * db 8 ; 20 FileEndOfFileInformation, 1574 * db 8 ; 23 FilePipeInformation, 1575 * db 10h ; 25 FilePipeRemoteInformation, 1576 * db 8 ; 27 FileMailslotSetInformation, 1577 * db 48h ; 29 FileObjectIdInformation, 1578 * db 10h ; 30 FileCompletionInformation, - "reserved for system use" 1579 * db 18h ; 31 FileMoveClusterInformation, - "reserved for system use" 1580 * db 38h ; 32 FileQuotaInformation, 1581 * db 10h ; 36 FileTrackingInformation, - "reserved for system use" 1582 * db 8 ; 39 FileValidDataLengthInformation, 1583 * db 8 ; 40 FileShortNameInformation, 1584 * db 4 ; 41 FileIoCompletionNotificationInformation, - "reserved for system use" 1585 * db 10h ; 42 FileIoStatusBlockRangeInformation, - "reserved for system use" 1586 * db 4 ; 43 FileIoPriorityHintInformation, 1587 * db 14h ; 44 FileSfioReserveInformation, - "reserved for system use" 1588 * db 10h ; 61 FileReplaceCompletionInformation, 1589 * db 4 ; 64 FileDispositionInformationEx, - Adds posix semantics and stuff. 1590 * db 18h ; 65 FileRenameInformationEx, - Adds posix semantics and stuff. 1591 * db 8 ; 67 FileDesiredStorageClassInformation, 1592 * db 10h ; 69 FileMemoryPartitionInformation, - "reserved for system use", W10-1709 1593 * db 4 ; 71 FileCaseSensitiveInformation, - Per dir case sensitivity. (For linux?) 1594 * db 18h ; 72 FileLinkInformationEx, - Adds posix semantics and stuff. 1595 * db 4 ; 74 FileStorageReserveIdInformation, 1596 * db 4 ; 75 FileCaseSensitiveInformationForceAccessCheck, - for the i/o manager, w10-1809. 1597 */ 1553 1598 1554 1599 switch (RxContext->Info.FileInformationClass) 1555 1600 { 1601 /* 1602 * This is used to modify timestamps and attributes. 1603 */ 1556 1604 case FileBasicInformation: 1557 1605 { … … 1561 1609 } 1562 1610 1611 /* 1612 * This is used to rename a file. 1613 */ 1614 case FileRenameInformation: 1615 { 1616 #ifdef LOG_ENABLED 1617 PFILE_RENAME_INFORMATION pInfo = (PFILE_RENAME_INFORMATION)RxContext->Info.Buffer; 1618 Log(("VBOXSF: MrxSetFileInfo: FileRenameInformation: ReplaceIfExists = %d, RootDirectory = 0x%x = [%.*ls]\n", 1619 pInfo->ReplaceIfExists, pInfo->RootDirectory, pInfo->FileNameLength / sizeof(WCHAR), pInfo->FileName)); 1620 #endif 1621 1622 Status = vbsfNtRename(RxContext, FileRenameInformation, RxContext->Info.Buffer, RxContext->Info.Length); 1623 break; 1624 } 1625 1626 /* 1627 * This is presumably used for hardlinking purposes. We don't support that. 1628 */ 1629 case FileLinkInformation: 1630 { 1631 #ifdef LOG_ENABLED 1632 PFILE_LINK_INFORMATION pInfo = (PFILE_LINK_INFORMATION )RxContext->Info.Buffer; 1633 Log(("VBOXSF: MrxSetFileInfo: FileLinkInformation: ReplaceIfExists = %d, RootDirectory = 0x%x = [%.*ls]. Not implemented!\n", 1634 pInfo->ReplaceIfExists, pInfo->RootDirectory, pInfo->FileNameLength / sizeof(WCHAR), pInfo->FileName)); 1635 #endif 1636 1637 Status = STATUS_NOT_IMPLEMENTED; 1638 break; 1639 } 1640 1641 /* 1642 * This is used to delete file. 1643 */ 1563 1644 case FileDispositionInformation: 1564 1645 { … … 1573 1654 break; 1574 1655 } 1656 1657 /* 1658 * The file position is handled by the RDBSS library (RxSetPositionInfo) 1659 * and we should never see this request. 1660 */ 1661 case FilePositionInformation: 1662 AssertMsgFailed(("VBOXSF: MrxSetFileInfo: FilePositionInformation: CurrentByteOffset = 0x%RX64. Unsupported!\n", 1663 ((PFILE_POSITION_INFORMATION)RxContext->Info.Buffer)->CurrentByteOffset.QuadPart)); 1664 Status = STATUS_INTERNAL_ERROR; 1665 break; 1575 1666 1576 1667 /* … … 1622 1713 } 1623 1714 1624 case FileLinkInformation: 1625 { 1626 #ifdef LOG_ENABLED 1627 PFILE_LINK_INFORMATION pInfo = (PFILE_LINK_INFORMATION )RxContext->Info.Buffer; 1628 Log(("VBOXSF: MrxSetFileInfo: FileLinkInformation: ReplaceIfExists = %d, RootDirectory = 0x%x = [%.*ls]. Not implemented!\n", 1629 pInfo->ReplaceIfExists, pInfo->RootDirectory, pInfo->FileNameLength / sizeof(WCHAR), pInfo->FileName)); 1630 #endif 1631 1632 Status = STATUS_NOT_IMPLEMENTED; 1633 break; 1634 } 1635 1636 case FileRenameInformation: 1637 { 1638 #ifdef LOG_ENABLED 1639 PFILE_RENAME_INFORMATION pInfo = (PFILE_RENAME_INFORMATION)RxContext->Info.Buffer; 1640 Log(("VBOXSF: MrxSetFileInfo: FileRenameInformation: ReplaceIfExists = %d, RootDirectory = 0x%x = [%.*ls]\n", 1641 pInfo->ReplaceIfExists, pInfo->RootDirectory, pInfo->FileNameLength / sizeof(WCHAR), pInfo->FileName)); 1642 #endif 1643 1644 Status = vbsfNtRename(RxContext, FileRenameInformation, RxContext->Info.Buffer, RxContext->Info.Length); 1645 break; 1646 } 1647 1648 /* The file position is handled by the RDBSS library (RxSetPositionInfo) 1649 and we should never see this request. */ 1650 case FilePositionInformation: 1651 AssertMsgFailed(("VBOXSF: MrxSetFileInfo: FilePositionInformation: CurrentByteOffset = 0x%RX64. Unsupported!\n", 1652 ((PFILE_POSITION_INFORMATION)RxContext->Info.Buffer)->CurrentByteOffset.QuadPart)); 1653 Status = STATUS_INVALID_PARAMETER; 1654 break; 1715 /// @todo FileModeInformation ? 1716 /// @todo return access denied or something for FileValidDataLengthInformation? 1655 1717 1656 1718 default:
Note:
See TracChangeset
for help on using the changeset viewer.