dll, sys: WIP

This commit is contained in:
Bill Zissimopoulos
2015-11-29 11:00:22 -08:00
parent 76af18e4d0
commit 567cf3e8eb
4 changed files with 16 additions and 18 deletions

View File

@ -33,22 +33,20 @@ FSP_API NTSTATUS FspFsctlCreateVolume(PWSTR DevicePath,
GlobalDevicePath(DevicePathBuf, sizeof DevicePathBuf, DevicePath);
SecurityDescriptorSize = 0;
if (!MakeSelfRelativeSD(SecurityDescriptor, 0, &SecurityDescriptorSize))
MakeSelfRelativeSD(SecurityDescriptor, 0, &SecurityDescriptorSize);
ParamsBuf = malloc(sizeof *ParamsBuf + SecurityDescriptorSize);
if (0 == ParamsBuf)
{
ParamsBuf = malloc(sizeof *ParamsBuf + SecurityDescriptorSize);
if (0 == ParamsBuf)
{
Result = STATUS_INSUFFICIENT_RESOURCES;
goto exit;
}
SecurityDescriptorBuf = (PVOID)(ParamsBuf + 1);
if (!MakeSelfRelativeSD(SecurityDescriptor, SecurityDescriptorBuf, &SecurityDescriptorSize))
{
Result = FspNtStatusFromWin32(GetLastError());
goto exit;
}
*ParamsBuf = *Params;
Result = STATUS_INSUFFICIENT_RESOURCES;
goto exit;
}
SecurityDescriptorBuf = (PVOID)(ParamsBuf + 1);
if (!MakeSelfRelativeSD(SecurityDescriptor, SecurityDescriptorBuf, &SecurityDescriptorSize))
{
Result = FspNtStatusFromWin32(GetLastError());
goto exit;
}
*ParamsBuf = *Params;
DeviceHandle = CreateFileW(DevicePathBuf,
0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, 0, 0);