Commit 81e7d69d authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

advapi32: Implement RegGetKeySecurity with NtQuerySecurityObject.

parent 01199072
...@@ -2232,21 +2232,11 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformati ...@@ -2232,21 +2232,11 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformati
TRACE("(%p,%d,%p,%d)\n",hkey,SecurityInformation,pSecurityDescriptor, TRACE("(%p,%d,%p,%d)\n",hkey,SecurityInformation,pSecurityDescriptor,
lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); 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 RtlNtStatusToDosError( NtQuerySecurityObject( hkey,
return ERROR_SUCCESS; SecurityInformation, pSecurityDescriptor,
*lpcbSecurityDescriptor, lpcbSecurityDescriptor ) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment