Author: ekohl
Date: Sun Jan 10 10:27:46 2016
New Revision: 70566
URL:
http://svn.reactos.org/svn/reactos?rev=70566&view=rev
Log:
[ADVAPI32]
Implement LsaOpenPolicySce.
[LSASRV]
Update the LsarOpenPolicySce prototype.
Modified:
trunk/reactos/dll/win32/advapi32/sec/lsa.c
trunk/reactos/dll/win32/lsasrv/lsarpc.c
trunk/reactos/dll/win32/lsasrv/lsasrv.spec
trunk/reactos/include/reactos/idl/lsa.idl
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 10 10:27:46 2016
@@ -1164,7 +1164,7 @@
/*
- * @unimplemented
+ * @implemented
*/
NTSTATUS
WINAPI
@@ -1173,10 +1173,34 @@
IN ACCESS_MASK DesiredAccess,
OUT PLSA_HANDLE PolicyHandle)
{
- FIXME("LsaOpenPolicySce(%s %p 0x%08lx %p)\n",
+ NTSTATUS Status;
+
+ TRACE("LsaOpenPolicySce(%s %p 0x%08lx %p)\n",
SystemName ? debugstr_w(SystemName->Buffer) : "(null)",
ObjectAttributes, DesiredAccess, PolicyHandle);
- return STATUS_NOT_IMPLEMENTED;
+
+ /* FIXME: RPC should take care of this */
+ if (!LsapIsLocalComputer(SystemName))
+ return RPC_NT_SERVER_UNAVAILABLE;
+
+ RpcTryExcept
+ {
+ *PolicyHandle = NULL;
+
+ Status = LsarOpenPolicySce(SystemName ? SystemName->Buffer : NULL,
+ (PLSAPR_OBJECT_ATTRIBUTES)ObjectAttributes,
+ DesiredAccess,
+ PolicyHandle);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ TRACE("LsaOpenPolicySce() done (Status: 0x%08lx)\n", Status);
+
+ return Status;
}
Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsarpc.c?…
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] Sun Jan 10 10:27:46 2016
@@ -3153,7 +3153,10 @@
/* Function 78 */
NTSTATUS WINAPI LsarOpenPolicySce(
- handle_t hBinding)
+ LPWSTR SystemName,
+ PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes,
+ ACCESS_MASK DesiredAccess,
+ LSAPR_HANDLE *PolicyHandle)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
Modified: trunk/reactos/dll/win32/lsasrv/lsasrv.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsasrv.sp…
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/lsasrv.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/lsasrv/lsasrv.spec [iso-8859-1] Sun Jan 10 10:27:46 2016
@@ -51,7 +51,7 @@
@ stdcall LsarLookupSids2(ptr ptr ptr ptr long long long long)
@ stdcall LsarOpenAccount(ptr ptr long ptr)
@ stdcall LsarOpenPolicy(ptr ptr long ptr)
- @ stdcall LsarOpenPolicySce(ptr)
+ @ stdcall LsarOpenPolicySce(ptr ptr long ptr)
@ stdcall LsarOpenSecret(ptr ptr long ptr)
@ stdcall LsarOpenTrustedDomain(ptr ptr long ptr)
@ stdcall LsarOpenTrustedDomainByName(ptr ptr long ptr)
Modified: trunk/reactos/include/reactos/idl/lsa.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/lsa.id…
==============================================================================
--- trunk/reactos/include/reactos/idl/lsa.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/lsa.idl [iso-8859-1] Sun Jan 10 10:27:46 2016
@@ -1091,7 +1091,10 @@
/* Function 78 */
NTSTATUS __stdcall LsarOpenPolicySce(
- [in] handle_t hBinding); /* FIXME */
+ [in, unique] PLSAPR_SERVER_NAME SystemName,
+ [in] PLSAPR_OBJECT_ATTRIBUTES ObjectAttributes,
+ [in] ACCESS_MASK DesiredAccess,
+ [out] LSAPR_HANDLE *PolicyHandle);
/* Function 79 */
NTSTATUS __stdcall LsarAdtRegisterSecurityEventSource(