Juan Lang : advapi32:
Implement RegGetKeySecurity with NtQuerySecurityObject.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Mar 17 14:35:20 CDT 2007
Module: wine
Branch: master
Commit: 81e7d69dfddbc7e88818acfde31c3ee7ed4aa616
URL: http://source.winehq.org/git/wine.git/?a=commit;h=81e7d69dfddbc7e88818acfde31c3ee7ed4aa616
Author: Juan Lang <juan_lang at yahoo.com>
Date: Fri Mar 16 12:21:03 2007 -0700
advapi32: Implement RegGetKeySecurity with NtQuerySecurityObject.
---
dlls/advapi32/registry.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 7f673c0..8a70f56 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -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 (*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);
+ if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
- *lpcbSecurityDescriptor = sizeof(SECURITY_DESCRIPTOR);
- return ERROR_SUCCESS;
+ return RtlNtStatusToDosError( NtQuerySecurityObject( hkey,
+ SecurityInformation, pSecurityDescriptor,
+ *lpcbSecurityDescriptor, lpcbSecurityDescriptor ) );
}
More information about the wine-cvs
mailing list