MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / DOKAN_CALLBACK CryptSetFileSecurity

Function DOKAN_CALLBACK CryptSetFileSecurity

cppcryptfs/dokan/cryptdokan.cpp:1713–1736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711}
1712
1713static 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
1738static NTSTATUS DOKAN_CALLBACK CryptGetVolumeInformation(
1739 LPWSTR VolumeNameBuffer, DWORD VolumeNameSize, LPDWORD VolumeSerialNumber,

Callers

nothing calls this directly

Calls 1

DbgPrintFunction · 0.85

Tested by

no test coverage detected