Author: ekohl
Date: Sun Oct 7 09:18:23 2012
New Revision: 57508
URL:
http://svn.reactos.org/svn/reactos?rev=57508&view=rev
Log:
[LSASRV]
Implement LsaIOpenPolicyTrusted as described in
http://code.google.com/p/mimikatz/source/browse/trunk/librairies/sekurlsa/s….
Modified:
trunk/reactos/dll/win32/lsasrv/lsasrv.spec
trunk/reactos/dll/win32/lsasrv/policy.c
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 Oct 7 09:18:23 2012
@@ -22,7 +22,7 @@
@ stub LsaIGetSerialNumberPolicy2
@ stub LsaIHealthCheck
@ stub LsaIInitializeWellKnownSids
- @ stub LsaIOpenPolicyTrusted
+ @ stdcall LsaIOpenPolicyTrusted(ptr)
@ stub LsaIQueryInformationPolicyTrusted
@ stub LsaISetPrivateData
@ stub LsaISetSerialNumberPolicy
Modified: trunk/reactos/dll/win32/lsasrv/policy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/policy.c?…
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/policy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/lsasrv/policy.c [iso-8859-1] Sun Oct 7 09:18:23 2012
@@ -16,6 +16,29 @@
/* FUNCTIONS ***************************************************************/
NTSTATUS
+WINAPI
+LsaIOpenPolicyTrusted(OUT LSAPR_HANDLE *PolicyHandle)
+{
+ PLSA_DB_OBJECT PolicyObject;
+ NTSTATUS Status;
+
+ TRACE("(%p)\n", PolicyHandle);
+
+ Status = LsapOpenDbObject(NULL,
+ NULL,
+ L"Policy",
+ LsaDbPolicyObject,
+ POLICY_ALL_ACCESS,
+ &PolicyObject);
+
+ if (NT_SUCCESS(Status))
+ *PolicyHandle = (LSAPR_HANDLE)PolicyObject;
+
+ return Status;
+}
+
+
+NTSTATUS
LsarSetPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_PRIMARY_DOM_INFO Info)
{
@@ -24,7 +47,7 @@
NTSTATUS Status;
LPWSTR Ptr;
- TRACE("LsarSetPrimaryDomain(%p, %p)\n", PolicyObject, Info);
+ TRACE("(%p %p)\n", PolicyObject, Info);
Length = sizeof(UNICODE_STRING) + Info->Name.MaximumLength;
Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
@@ -71,7 +94,7 @@
NTSTATUS Status;
LPWSTR Ptr;
- TRACE("LsarSetAccountDomain(%p, %p)\n", PolicyObject, Info);
+ TRACE("(%p %p)\n", PolicyObject, Info);
Length = sizeof(UNICODE_STRING) + Info->DomainName.MaximumLength;
Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
@@ -538,6 +561,7 @@
LsarQueryReplicaSource(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
+ FIXME("\n");
*PolicyInformation = NULL;
return STATUS_NOT_IMPLEMENTED;
}
@@ -828,6 +852,7 @@
LsarQueryDnsDomainInt(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
+ FIXME("\n");
*PolicyInformation = NULL;
return STATUS_NOT_IMPLEMENTED;
}
@@ -837,6 +862,7 @@
LsarQueryLocalAccountDomain(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
+ FIXME("\n");
*PolicyInformation = NULL;
return STATUS_NOT_IMPLEMENTED;
}