mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 12:04:51 +00:00
- Fix a typo in RegGetKeySecurity().
- Set missing error values. svn path=/trunk/; revision=10838
This commit is contained in:
parent
14f00f3aeb
commit
f34a907c7a
1 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: reg.c,v 1.55 2004/09/13 08:51:40 ekohl Exp $
|
/* $Id: reg.c,v 1.56 2004/09/13 11:41:26 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -1521,6 +1521,7 @@ RegGetKeySecurity(HKEY hKey,
|
||||||
|
|
||||||
if (hKey == HKEY_PERFORMANCE_DATA)
|
if (hKey == HKEY_PERFORMANCE_DATA)
|
||||||
{
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1528,18 +1529,20 @@ RegGetKeySecurity(HKEY hKey,
|
||||||
hKey);
|
hKey);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
DPRINT("MapDefaultKey() failed (Status %lx)\n", Status);
|
||||||
ErrorCode = RtlNtStatusToDosError(Status);
|
ErrorCode = RtlNtStatusToDosError(Status);
|
||||||
SetLastError(ErrorCode);
|
SetLastError(ErrorCode);
|
||||||
return ErrorCode;
|
return ErrorCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = NtQuerySecurityObject(hKey,
|
Status = NtQuerySecurityObject(KeyHandle,
|
||||||
SecurityInformation,
|
SecurityInformation,
|
||||||
pSecurityDescriptor,
|
pSecurityDescriptor,
|
||||||
*lpcbSecurityDescriptor,
|
*lpcbSecurityDescriptor,
|
||||||
lpcbSecurityDescriptor);
|
lpcbSecurityDescriptor);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
DPRINT("NtQuerySecurityObject() failed (Status %lx)\n", Status);
|
||||||
ErrorCode = RtlNtStatusToDosError(Status);
|
ErrorCode = RtlNtStatusToDosError(Status);
|
||||||
SetLastError(ErrorCode);
|
SetLastError(ErrorCode);
|
||||||
return ErrorCode;
|
return ErrorCode;
|
||||||
|
@ -1599,6 +1602,7 @@ RegLoadKeyW (HKEY hKey,
|
||||||
|
|
||||||
if (hKey == HKEY_PERFORMANCE_DATA)
|
if (hKey == HKEY_PERFORMANCE_DATA)
|
||||||
{
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2991,6 +2995,7 @@ RegSetKeySecurity (HKEY hKey,
|
||||||
|
|
||||||
if (hKey == HKEY_PERFORMANCE_DATA)
|
if (hKey == HKEY_PERFORMANCE_DATA)
|
||||||
{
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3329,7 +3334,10 @@ RegUnLoadKeyW (HKEY hKey,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
if (hKey == HKEY_PERFORMANCE_DATA)
|
if (hKey == HKEY_PERFORMANCE_DATA)
|
||||||
return ERROR_INVALID_HANDLE;
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return ERROR_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
Status = MapDefaultKey (&KeyHandle, hKey);
|
Status = MapDefaultKey (&KeyHandle, hKey);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Reference in a new issue