Author: ekohl Date: Sat Jan 14 18:10:42 2017 New Revision: 73548
URL: http://svn.reactos.org/svn/reactos?rev=73548&view=rev Log: [ADVAPI32] Implement LsaQueryInfoTrustedDomain() and LsaQueryTrustedDomainInfo().
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] Sat Jan 14 18:10:42 2017 @@ -1423,7 +1423,7 @@
/* - * @unimplemented + * @implemented */ NTSTATUS WINAPI @@ -1431,9 +1431,35 @@ IN TRUSTED_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer) { - FIXME("LsaQueryInfoTrustedDomain(%p %d %p) stub\n", + PLSAPR_TRUSTED_DOMAIN_INFO TrustedDomainInformation = NULL; + NTSTATUS Status; + + TRACE("LsaQueryInfoTrustedDomain(%p %d %p) stub\n", TrustedDomainHandle, InformationClass, Buffer); - return STATUS_NOT_IMPLEMENTED; + + if (InformationClass == TrustedDomainAuthInformationInternal || + InformationClass == TrustedDomainFullInformationInternal) + return STATUS_INVALID_INFO_CLASS; + + RpcTryExcept + { + Status = LsarQueryInfoTrustedDomain((LSAPR_HANDLE)TrustedDomainHandle, + InformationClass, + &TrustedDomainInformation); + *Buffer = TrustedDomainInformation; + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + if (TrustedDomainInformation != NULL) + MIDL_user_free(TrustedDomainInformation); + + Status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + TRACE("Done (Status: 0x%08x)\n", Status); + + return Status; }
@@ -1643,7 +1669,7 @@
/* - * @unimplemented + * @implemented */ NTSTATUS WINAPI @@ -1652,9 +1678,29 @@ IN TRUSTED_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer) { - FIXME("LsaQueryTrustedDomainInfo(%p %p %d %p) stub\n", + NTSTATUS Status; + + TRACE("LsaQueryTrustedDomainInfo(%p %p %d %p) stub\n", PolicyHandle, TrustedDomainSid, InformationClass, Buffer); - return STATUS_OBJECT_NAME_NOT_FOUND; + + if (InformationClass == TrustedDomainAuthInformationInternal || + InformationClass == TrustedDomainFullInformationInternal) + return STATUS_INVALID_INFO_CLASS; + + RpcTryExcept + { + Status = LsarQueryTrustedDomainInfo((LSAPR_HANDLE)PolicyHandle, + (PRPC_SID)TrustedDomainSid, + InformationClass, + (PLSAPR_TRUSTED_DOMAIN_INFO *)Buffer); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + Status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return Status; }