| 1711 | } |
| 1712 | |
| 1713 | static NTSTATUS DOKAN_CALLBACK CryptSetFileSecurity( |
| 1714 | LPCWSTR FileName, PSECURITY_INFORMATION SecurityInformation, |
| 1715 | PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG SecurityDescriptorLength, |
| 1716 | PDOKAN_FILE_INFO DokanFileInfo) { |
| 1717 | HANDLE handle; |
| 1718 | FileNameEnc filePath(DokanFileInfo, FileName); |
| 1719 | |
| 1720 | UNREFERENCED_PARAMETER(SecurityDescriptorLength); |
| 1721 | |
| 1722 | DbgPrint(L"SetFileSecurity %s\n", FileName); |
| 1723 | |
| 1724 | handle = (HANDLE)DokanFileInfo->Context; |
| 1725 | if (!handle || handle == INVALID_HANDLE_VALUE) { |
| 1726 | DbgPrint(L"\tinvalid handle\n\n"); |
| 1727 | return STATUS_INVALID_HANDLE; |
| 1728 | } |
| 1729 | |
| 1730 | if (!SetUserObjectSecurity(handle, SecurityInformation, SecurityDescriptor)) { |
| 1731 | int error = GetLastError(); |
| 1732 | DbgPrint(L" SetUserObjectSecurity error: %d\n", error); |
| 1733 | return DokanNtStatusFromWin32(error); |
| 1734 | } |
| 1735 | return STATUS_SUCCESS; |
| 1736 | } |
| 1737 | |
| 1738 | static NTSTATUS DOKAN_CALLBACK CryptGetVolumeInformation( |
| 1739 | LPWSTR VolumeNameBuffer, DWORD VolumeNameSize, LPDWORD VolumeSerialNumber, |
nothing calls this directly
no test coverage detected