Author: ekohl
Date: Sat Nov 24 00:13:10 2012
New Revision: 57753
URL:
http://svn.reactos.org/svn/reactos?rev=57753&view=rev
Log:
[LSASRV]
- LsarSetInformationPolicy: Add stubs for all missing case.
- Implement LsarSetAuditLog and LsarSetDefaultQuota.
Modified:
trunk/reactos/dll/win32/lsasrv/lsarpc.c
trunk/reactos/dll/win32/lsasrv/lsasrv.h
trunk/reactos/dll/win32/lsasrv/policy.c
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] Sat Nov 24 00:13:10 2012
@@ -278,7 +278,7 @@
POLICY_INFORMATION_CLASS InformationClass,
PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
- PLSA_DB_OBJECT DbObject;
+ PLSA_DB_OBJECT PolicyObject;
ACCESS_MASK DesiredAccess = 0;
NTSTATUS Status;
@@ -322,74 +322,74 @@
Status = LsapValidateDbObject(PolicyHandle,
LsaDbPolicyObject,
DesiredAccess,
- &DbObject);
+ &PolicyObject);
if (!NT_SUCCESS(Status))
return Status;
switch (InformationClass)
{
case PolicyAuditLogInformation: /* 1 */
- Status = LsarQueryAuditLog(PolicyHandle,
+ Status = LsarQueryAuditLog(PolicyObject,
PolicyInformation);
break;
case PolicyAuditEventsInformation: /* 2 */
- Status = LsarQueryAuditEvents(PolicyHandle,
+ Status = LsarQueryAuditEvents(PolicyObject,
PolicyInformation);
break;
case PolicyPrimaryDomainInformation: /* 3 */
- Status = LsarQueryPrimaryDomain(PolicyHandle,
+ Status = LsarQueryPrimaryDomain(PolicyObject,
PolicyInformation);
break;
case PolicyPdAccountInformation: /* 4 */
- Status = LsarQueryPdAccount(PolicyHandle,
+ Status = LsarQueryPdAccount(PolicyObject,
PolicyInformation);
break;
case PolicyAccountDomainInformation: /* 5 */
- Status = LsarQueryAccountDomain(PolicyHandle,
+ Status = LsarQueryAccountDomain(PolicyObject,
PolicyInformation);
break;
case PolicyLsaServerRoleInformation: /* 6 */
- Status = LsarQueryServerRole(PolicyHandle,
+ Status = LsarQueryServerRole(PolicyObject,
PolicyInformation);
break;
case PolicyReplicaSourceInformation: /* 7 */
- Status = LsarQueryReplicaSource(PolicyHandle,
+ Status = LsarQueryReplicaSource(PolicyObject,
PolicyInformation);
break;
case PolicyDefaultQuotaInformation: /* 8 */
- Status = LsarQueryDefaultQuota(PolicyHandle,
+ Status = LsarQueryDefaultQuota(PolicyObject,
PolicyInformation);
break;
case PolicyModificationInformation: /* 9 */
- Status = LsarQueryModification(PolicyHandle,
+ Status = LsarQueryModification(PolicyObject,
PolicyInformation);
break;
case PolicyAuditFullQueryInformation: /* 11 (0xB) */
- Status = LsarQueryAuditFull(PolicyHandle,
+ Status = LsarQueryAuditFull(PolicyObject,
PolicyInformation);
break;
case PolicyDnsDomainInformation: /* 12 (0xC) */
- Status = LsarQueryDnsDomain(PolicyHandle,
+ Status = LsarQueryDnsDomain(PolicyObject,
PolicyInformation);
break;
case PolicyDnsDomainInformationInt: /* 13 (0xD) */
- Status = LsarQueryDnsDomainInt(PolicyHandle,
+ Status = LsarQueryDnsDomainInt(PolicyObject,
PolicyInformation);
break;
case PolicyLocalAccountDomainInformation: /* 14 (0xE) */
- Status = LsarQueryLocalAccountDomain(PolicyHandle,
+ Status = LsarQueryLocalAccountDomain(PolicyObject,
PolicyInformation);
break;
@@ -408,7 +408,7 @@
POLICY_INFORMATION_CLASS InformationClass,
PLSAPR_POLICY_INFORMATION PolicyInformation)
{
- PLSA_DB_OBJECT DbObject;
+ PLSA_DB_OBJECT PolicyObject;
ACCESS_MASK DesiredAccess = 0;
NTSTATUS Status;
@@ -456,61 +456,70 @@
Status = LsapValidateDbObject(PolicyHandle,
LsaDbPolicyObject,
DesiredAccess,
- &DbObject);
+ &PolicyObject);
if (!NT_SUCCESS(Status))
return Status;
switch (InformationClass)
{
case PolicyAuditLogInformation: /* 1 */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetAuditLog(PolicyObject,
+ (PPOLICY_AUDIT_LOG_INFO)PolicyInformation);
break;
case PolicyAuditEventsInformation: /* 2 */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetAuditEvents(PolicyObject,
+
(PLSAPR_POLICY_AUDIT_EVENTS_INFO)PolicyInformation);
break;
case PolicyPrimaryDomainInformation: /* 3 */
- Status = LsarSetPrimaryDomain(PolicyHandle,
+ Status = LsarSetPrimaryDomain(PolicyObject,
(PLSAPR_POLICY_PRIMARY_DOM_INFO)PolicyInformation);
break;
case PolicyAccountDomainInformation: /* 5 */
- Status = LsarSetAccountDomain(PolicyHandle,
+ Status = LsarSetAccountDomain(PolicyObject,
(PLSAPR_POLICY_ACCOUNT_DOM_INFO)PolicyInformation);
break;
case PolicyLsaServerRoleInformation: /* 6 */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetServerRole(PolicyObject,
+ (PPOLICY_LSA_SERVER_ROLE_INFO)PolicyInformation);
break;
case PolicyReplicaSourceInformation: /* 7 */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetReplicaSource(PolicyObject,
+
(PPOLICY_LSA_REPLICA_SRCE_INFO)PolicyInformation);
break;
case PolicyDefaultQuotaInformation: /* 8 */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetDefaultQuota(PolicyObject,
+ (PPOLICY_DEFAULT_QUOTA_INFO)PolicyInformation);
break;
case PolicyModificationInformation: /* 9 */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetModification(PolicyObject,
+ (PPOLICY_MODIFICATION_INFO)PolicyInformation);
break;
case PolicyAuditFullSetInformation: /* 10 (0xA) */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetAuditFull(PolicyObject,
+ (PPOLICY_AUDIT_FULL_QUERY_INFO)PolicyInformation);
break;
case PolicyDnsDomainInformation: /* 12 (0xC) */
- Status = LsarSetDnsDomain(PolicyHandle,
+ Status = LsarSetDnsDomain(PolicyObject,
(PLSAPR_POLICY_DNS_DOMAIN_INFO)PolicyInformation);
break;
case PolicyDnsDomainInformationInt: /* 13 (0xD) */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetDnsDomainInt(PolicyObject,
+
(PLSAPR_POLICY_DNS_DOMAIN_INFO)PolicyInformation);
break;
case PolicyLocalAccountDomainInformation: /* 14 (0xE) */
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = LsarSetLocalAccountDomain(PolicyObject,
+
(PLSAPR_POLICY_ACCOUNT_DOM_INFO)PolicyInformation);
break;
default:
Modified: trunk/reactos/dll/win32/lsasrv/lsasrv.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsasrv.h?…
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/lsasrv.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/lsasrv/lsasrv.h [iso-8859-1] Sat Nov 24 00:13:10 2012
@@ -202,6 +202,14 @@
PLSAPR_POLICY_INFORMATION *PolicyInformation);
NTSTATUS
+LsarSetAuditLog(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_AUDIT_LOG_INFO Info);
+
+NTSTATUS
+LsarSetAuditEvents(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_AUDIT_EVENTS_INFO Info);
+
+NTSTATUS
LsarSetPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_PRIMARY_DOM_INFO Info);
@@ -210,8 +218,36 @@
PLSAPR_POLICY_ACCOUNT_DOM_INFO Info);
NTSTATUS
+LsarSetServerRole(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_LSA_SERVER_ROLE_INFO Info);
+
+NTSTATUS
+LsarSetReplicaSource(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_LSA_REPLICA_SRCE_INFO Info);
+
+NTSTATUS
+LsarSetDefaultQuota(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_DEFAULT_QUOTA_INFO Info);
+
+NTSTATUS
+LsarSetModification(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_MODIFICATION_INFO Info);
+
+NTSTATUS
+LsarSetAuditFull(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_AUDIT_FULL_QUERY_INFO Info);
+
+NTSTATUS
LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_DNS_DOMAIN_INFO Info);
+
+NTSTATUS
+LsarSetDnsDomainInt(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_DNS_DOMAIN_INFO Info);
+
+NTSTATUS
+LsarSetLocalAccountDomain(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_ACCOUNT_DOM_INFO Info);
/* privileges.c */
NTSTATUS
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 Nov 24 00:13:10 2012
@@ -423,6 +423,16 @@
NTSTATUS
+LsarQueryReplicaSource(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_INFORMATION *PolicyInformation)
+{
+ FIXME("\n");
+ *PolicyInformation = NULL;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+NTSTATUS
LsarQueryDefaultQuota(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
@@ -451,16 +461,6 @@
}
return Status;
-}
-
-
-NTSTATUS
-LsarQueryReplicaSource(PLSA_DB_OBJECT PolicyObject,
- PLSAPR_POLICY_INFORMATION *PolicyInformation)
-{
- FIXME("\n");
- *PolicyInformation = NULL;
- return STATUS_NOT_IMPLEMENTED;
}
@@ -766,6 +766,28 @@
NTSTATUS
+LsarSetAuditLog(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_AUDIT_LOG_INFO Info)
+{
+ TRACE("(%p %p)\n", PolicyObject, Info);
+
+ return LsapSetObjectAttribute(PolicyObject,
+ L"PolAdtLg",
+ Info,
+ sizeof(POLICY_AUDIT_LOG_INFO));
+}
+
+
+NTSTATUS
+LsarSetAuditEvents(PLSA_DB_OBJECT PolicyObject,
+ PLSAPR_POLICY_AUDIT_EVENTS_INFO Info)
+{
+ FIXME("\n");
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+NTSTATUS
LsarSetPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_PRIMARY_DOM_INFO Info)
{
@@ -860,12 +882,78 @@
NTSTATUS
+LsarSetServerRole(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_LSA_SERVER_ROLE_INFO Info)
+{
+ FIXME("\n");
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+NTSTATUS
+LsarSetReplicaSource(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_LSA_REPLICA_SRCE_INFO Info)
+{
+ FIXME("\n");
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+NTSTATUS
+LsarSetDefaultQuota(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_DEFAULT_QUOTA_INFO Info)
+{
+ TRACE("(%p %p)\n", PolicyObject, Info);
+
+ return LsapSetObjectAttribute(PolicyObject,
+ L"DefQuota",
+ Info,
+ sizeof(POLICY_DEFAULT_QUOTA_INFO));
+}
+
+
+NTSTATUS
+LsarSetModification(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_MODIFICATION_INFO Info)
+{
+ FIXME("\n");
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+NTSTATUS
+LsarSetAuditFull(PLSA_DB_OBJECT PolicyObject,
+ PPOLICY_AUDIT_FULL_QUERY_INFO Info)
+{
+ FIXME("\n");
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+NTSTATUS
LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_DNS_DOMAIN_INFO Info)
{
-
- return STATUS_NOT_IMPLEMENTED;
-}
-
+ 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 */