advapi32: Implement RegGetKeySecurity with NtQuerySecurityObject.
This commit is contained in:
parent
01199072dd
commit
81e7d69dfd
|
@ -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)) {
|
return RtlNtStatusToDosError( NtQuerySecurityObject( hkey,
|
||||||
*lpcbSecurityDescriptor = sizeof(SECURITY_DESCRIPTOR);
|
SecurityInformation, pSecurityDescriptor,
|
||||||
return ERROR_INSUFFICIENT_BUFFER;
|
*lpcbSecurityDescriptor, lpcbSecurityDescriptor ) );
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue