[ADVAPI32]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 25 Oct 2014 16:08:39 +0000 (16:08 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 25 Oct 2014 16:08:39 +0000 (16:08 +0000)
* Update GetKernelObjectSecurity().
CORE-8540

svn path=/trunk/; revision=64987

reactos/dll/win32/advapi32/wine/security.c

index d6ce28a..ad8a0c0 100644 (file)
@@ -854,31 +854,21 @@ GetLengthSid(PSID pSid)
     return (DWORD)RtlLengthSid(pSid);
 }
 
-/*
- * @implemented
+/******************************************************************************
+ * GetKernelObjectSecurity [ADVAPI32.@]
  */
-BOOL
-WINAPI
-GetKernelObjectSecurity(HANDLE Handle,
-                        SECURITY_INFORMATION RequestedInformation,
-                        PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                        DWORD nLength,
-                        LPDWORD lpnLengthNeeded)
+BOOL WINAPI GetKernelObjectSecurity(
+        HANDLE Handle,
+        SECURITY_INFORMATION RequestedInformation,
+        PSECURITY_DESCRIPTOR pSecurityDescriptor,
+        DWORD nLength,
+        LPDWORD lpnLengthNeeded )
 {
-    NTSTATUS Status;
+    TRACE("(%p,0x%08x,%p,0x%08x,%p)\n", Handle, RequestedInformation,
+          pSecurityDescriptor, nLength, lpnLengthNeeded);
 
-    Status = NtQuerySecurityObject(Handle,
-                                   RequestedInformation,
-                                   pSecurityDescriptor,
-                                   nLength,
-                                   lpnLengthNeeded);
-    if (!NT_SUCCESS(Status))
-    {
-        SetLastError(RtlNtStatusToDosError(Status));
-        return FALSE;
-    }
-
-    return TRUE;
+    return set_ntstatus( NtQuerySecurityObject(Handle, RequestedInformation, pSecurityDescriptor,
+                                               nLength, lpnLengthNeeded ));
 }
 
 /*