Author: ekohl
Date: Sat Dec 8 23:12:30 2012
New Revision: 57832
URL:
http://svn.reactos.org/svn/reactos?rev=57832&view=rev
Log:
[LSASRV]
Implement LsarSetServerRole, LsarSetModification and LsarSetAuditFull.
Modified:
trunk/reactos/dll/win32/lsasrv/policy.c
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] Sat Dec 8 23:12:30 2012
@@ -238,7 +238,7 @@
Done:
if (!NT_SUCCESS(Status))
{
- if (p)
+ if (p != NULL)
{
if (p->Name.Buffer)
MIDL_user_free(p->Name.Buffer);
@@ -886,8 +886,12 @@
LsarSetServerRole(PLSA_DB_OBJECT PolicyObject,
PPOLICY_LSA_SERVER_ROLE_INFO Info)
{
- FIXME("\n");
- return STATUS_NOT_IMPLEMENTED;
+ TRACE("(%p %p)\n", PolicyObject, Info);
+
+ return LsapSetObjectAttribute(PolicyObject,
+ L"PolSrvRo",
+ Info,
+ sizeof(POLICY_LSA_SERVER_ROLE_INFO));
}
@@ -917,14 +921,64 @@
LsarSetModification(PLSA_DB_OBJECT PolicyObject,
PPOLICY_MODIFICATION_INFO Info)
{
+ TRACE("(%p %p)\n", PolicyObject, Info);
+
+ return LsapSetObjectAttribute(PolicyObject,
+ L"PolMod",
+ Info,
+ sizeof(POLICY_MODIFICATION_INFO));
+}
+
+
+NTSTATUS
+LsarSetAuditFull(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_AUDIT_FULL_QUERY_INFO Info)
+{
+ PPOLICY_AUDIT_FULL_QUERY_INFO AuditFullInfo = NULL;
+ ULONG AttributeSize;
+ NTSTATUS Status;
+
+ TRACE("(%p %p)\n", PolicyObject, Info);
+
+ AttributeSize = sizeof(POLICY_AUDIT_FULL_QUERY_INFO);
+ AuditFullInfo = MIDL_user_allocate(AttributeSize);
+ if (AuditFullInfo == NULL)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+ Status = LsapGetObjectAttribute(PolicyObject,
+ L"PolAdtFl",
+ AuditFullInfo,
+ &AttributeSize);
+ if (!NT_SUCCESS(Status))
+ goto done;
+
+ AuditFullInfo->ShutDownOnFull = Info->ShutDownOnFull;
+
+ Status = LsapSetObjectAttribute(PolicyObject,
+ L"PolAdtFl",
+ AuditFullInfo,
+ AttributeSize);
+
+done:
+ if (AuditFullInfo != NULL)
+ MIDL_user_free(AuditFullInfo);
+
+ return Status;
+}
+
+
+NTSTATUS
+LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_DNS_DOMAIN_INFO Info)
+{
FIXME("\n");
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
-LsarSetAuditFull(PLSA_DB_OBJECT PolicyObject,
- PPOLICY_AUDIT_FULL_QUERY_INFO Info)
+LsarSetDnsDomainInt(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_DNS_DOMAIN_INFO Info)
{
FIXME("\n");
return STATUS_NOT_IMPLEMENTED;
@@ -932,29 +986,11 @@
NTSTATUS
-LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
- PLSAPR_POLICY_DNS_DOMAIN_INFO Info)
+LsarSetLocalAccountDomain(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_ACCOUNT_DOM_INFO Info)
{
FIXME("\n");
return STATUS_NOT_IMPLEMENTED;
}
-
-NTSTATUS
-LsarSetDnsDomainInt(PLSA_DB_OBJECT PolicyObject,
- PLSAPR_POLICY_DNS_DOMAIN_INFO Info)
-{
- FIXME("\n");
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-NTSTATUS
-LsarSetLocalAccountDomain(PLSA_DB_OBJECT PolicyObject,
- PLSAPR_POLICY_ACCOUNT_DOM_INFO Info)
-{
- FIXME("\n");
- return STATUS_NOT_IMPLEMENTED;
-}
-
/* EOF */