Implement RegGetKeySecurity.

svn path=/trunk/; revision=10837
This commit is contained in:
Eric Kohl 2004-09-13 08:51:40 +00:00
parent b1958574f7
commit 14f00f3aeb

View file

@ -1,4 +1,4 @@
/* $Id: reg.c,v 1.54 2004/08/15 17:03:14 chorns Exp $ /* $Id: reg.c,v 1.55 2004/09/13 08:51:40 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
@ -20,7 +20,7 @@
#define MAX_DEFAULT_HANDLES 6 #define MAX_DEFAULT_HANDLES 6
#define REG_MAX_NAME_SIZE 256 #define REG_MAX_NAME_SIZE 256
#define REG_MAX_DATA_SIZE 2048 #define REG_MAX_DATA_SIZE 2048
/* GLOBALS ******************************************************************/ /* GLOBALS ******************************************************************/
@ -1507,47 +1507,45 @@ RegFlushKey(HKEY hKey)
/************************************************************************ /************************************************************************
* RegGetKeySecurity * RegGetKeySecurity
* *
* @unimplemented * @implemented
*/ */
LONG STDCALL LONG STDCALL
RegGetKeySecurity (HKEY hKey, RegGetKeySecurity(HKEY hKey,
SECURITY_INFORMATION SecurityInformation, SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPDWORD lpcbSecurityDescriptor) LPDWORD lpcbSecurityDescriptor)
{ {
#if 0 HANDLE KeyHandle;
HKEY KeyHandle;
LONG ErrorCode; LONG ErrorCode;
NTSTATUS Status; NTSTATUS Status;
if (hKey = HKEY_PERFORMANCE_DATA) if (hKey == HKEY_PERFORMANCE_DATA)
{ {
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
} }
Status = MapDefaultKey (&KeyHandle, Status = MapDefaultKey(&KeyHandle,
hKey); hKey);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
ErrorCode = RtlNtStatusToDosError (Status); ErrorCode = RtlNtStatusToDosError(Status);
SetLastError (ErrorCode); SetLastError(ErrorCode);
return ErrorCode; return ErrorCode;
} }
Status = NtQuerySecurityObject () Status = NtQuerySecurityObject(hKey,
SecurityInformation,
pSecurityDescriptor,
*lpcbSecurityDescriptor,
lpcbSecurityDescriptor);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
ErrorCode = RtlNtStatusToDosError (Status); ErrorCode = RtlNtStatusToDosError(Status);
SetLastError (ErrorCode); SetLastError(ErrorCode);
return ErrorCode; return ErrorCode;
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
#endif
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return ERROR_CALL_NOT_IMPLEMENTED;
} }