advapi32: Implement RegGetKeySecurity with NtQuerySecurityObject.

This commit is contained in:
Juan Lang 2007-03-16 12:21:03 -07:00 committed by Alexandre Julliard
parent 01199072dd
commit 81e7d69dfd
1 changed files with 4 additions and 14 deletions

View File

@ -2232,21 +2232,11 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformati
TRACE("(%p,%d,%p,%d)\n",hkey,SecurityInformation,pSecurityDescriptor,
lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
/* FIXME: Check for valid SecurityInformation values */
if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR)) {
*lpcbSecurityDescriptor = sizeof(SECURITY_DESCRIPTOR);
return ERROR_INSUFFICIENT_BUFFER;
}
FIXME("(%p,%d,%p,%d): stub\n",hkey,SecurityInformation,
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
/* Do not leave security descriptor filled with garbage */
RtlCreateSecurityDescriptor(pSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION);
*lpcbSecurityDescriptor = sizeof(SECURITY_DESCRIPTOR);
return ERROR_SUCCESS;
return RtlNtStatusToDosError( NtQuerySecurityObject( hkey,
SecurityInformation, pSecurityDescriptor,
*lpcbSecurityDescriptor, lpcbSecurityDescriptor ) );
}