Author: ekohl
Date: Sun Jan 1 13:12:03 2017
New Revision: 73494
URL:
http://svn.reactos.org/svn/reactos?rev=73494&view=rev
Log:
[ADVAPI32]
- Implement LsaEnumerateTrustedDomains and LsaEnumerateTrustedDomainsEx.
- Mark LsaGetRemoteUserName and LsaLookupPrivilegeDisplayName as implemented.
Modified:
trunk/reactos/dll/win32/advapi32/sec/lsa.c
Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/lsa…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] Sun Jan 1 13:12:03 2017
@@ -596,7 +596,7 @@
/*
- * @unimplemented
+ * @implemented
*/
NTSTATUS
WINAPI
@@ -606,19 +606,45 @@
IN ULONG PreferedMaximumLength,
OUT PULONG CountReturned)
{
- FIXME("LsaEnumerateTrustedDomains(%p %p %p %lu %p) stub\n",
+ LSAPR_TRUSTED_ENUM_BUFFER TrustedEnumBuffer;
+ NTSTATUS Status;
+
+ TRACE("LsaEnumerateTrustedDomains(%p %p %p %lu %p)\n",
PolicyHandle, EnumerationContext, Buffer,
PreferedMaximumLength, CountReturned);
- if (CountReturned)
- *CountReturned = 0;
-
- return STATUS_SUCCESS;
-}
-
-
-/*
- * @unimplemented
+ if (Buffer == NULL)
+ return STATUS_INVALID_PARAMETER;
+
+ TrustedEnumBuffer.EntriesRead = 0;
+ TrustedEnumBuffer.Information = NULL;
+
+ RpcTryExcept
+ {
+ Status = LsarEnumerateTrustedDomains((LSAPR_HANDLE)PolicyHandle,
+ EnumerationContext,
+ &TrustedEnumBuffer,
+ PreferedMaximumLength);
+
+ *Buffer = TrustedEnumBuffer.Information;
+ *CountReturned = TrustedEnumBuffer.EntriesRead;
+
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ if (TrustedEnumBuffer.Information != NULL)
+ MIDL_user_free(TrustedEnumBuffer.Information);
+
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return Status;
+}
+
+
+/*
+ * @implemented
*/
NTSTATUS
WINAPI
@@ -628,14 +654,40 @@
IN ULONG PreferedMaximumLength,
OUT PULONG CountReturned)
{
- FIXME("LsaEnumerateTrustedDomainsEx(%p %p %p %lu %p) stub\n",
+ LSAPR_TRUSTED_ENUM_BUFFER_EX TrustedEnumBuffer;
+ NTSTATUS Status;
+
+ TRACE("LsaEnumerateTrustedDomainsEx(%p %p %p %lu %p)\n",
PolicyHandle, EnumerationContext, Buffer,
PreferedMaximumLength, CountReturned);
- if (CountReturned)
- *CountReturned = 0;
-
- return STATUS_SUCCESS;
+ if (Buffer == NULL)
+ return STATUS_INVALID_PARAMETER;
+
+ TrustedEnumBuffer.EntriesRead = 0;
+ TrustedEnumBuffer.EnumerationBuffer = NULL;
+
+ RpcTryExcept
+ {
+ Status = LsarEnumerateTrustedDomainsEx((LSAPR_HANDLE)PolicyHandle,
+ EnumerationContext,
+ &TrustedEnumBuffer,
+ PreferedMaximumLength);
+
+ *Buffer = TrustedEnumBuffer.EnumerationBuffer;
+ *CountReturned = TrustedEnumBuffer.EntriesRead;
+
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ if (TrustedEnumBuffer.EnumerationBuffer != NULL)
+ MIDL_user_free(TrustedEnumBuffer.EnumerationBuffer);
+
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return Status;
}
@@ -680,7 +732,7 @@
/*
- * @unimplemented
+ * @implemented
*/
NTSTATUS
WINAPI
@@ -899,7 +951,7 @@
/*
- * @unimplemented
+ * @implemented
*/
NTSTATUS
WINAPI