- LsarSetInformationPolicy: Add stubs for all missing case.
- Implement LsarSetAuditLog and LsarSetDefaultQuota.

svn path=/trunk/; revision=57753
This commit is contained in:
Eric Kohl 2012-11-24 00:13:10 +00:00
parent 3f75d10725
commit ba30f8c018
3 changed files with 175 additions and 42 deletions

View file

@ -278,7 +278,7 @@ NTSTATUS WINAPI LsarQueryInformationPolicy(
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 @@ NTSTATUS WINAPI LsarQueryInformationPolicy(
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 @@ NTSTATUS WINAPI LsarSetInformationPolicy(
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 @@ NTSTATUS WINAPI LsarSetInformationPolicy(
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:

View file

@ -201,6 +201,14 @@ NTSTATUS
LsarQueryLocalAccountDomain(PLSA_DB_OBJECT PolicyObject,
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);
@ -209,10 +217,38 @@ NTSTATUS
LsarSetAccountDomain(PLSA_DB_OBJECT PolicyObject,
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
LsarpLookupPrivilegeName(PLUID Value,

View file

@ -422,6 +422,16 @@ LsarQueryServerRole(PLSA_DB_OBJECT PolicyObject,
}
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)
@ -454,16 +464,6 @@ LsarQueryDefaultQuota(PLSA_DB_OBJECT PolicyObject,
}
NTSTATUS
LsarQueryReplicaSource(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_INFORMATION *PolicyInformation)
{
FIXME("\n");
*PolicyInformation = NULL;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
LsarQueryModification(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_INFORMATION *PolicyInformation)
@ -765,6 +765,28 @@ LsarQueryLocalAccountDomain(PLSA_DB_OBJECT PolicyObject,
}
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 @@ LsarSetAccountDomain(PLSA_DB_OBJECT PolicyObject,
NTSTATUS
LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
PLSAPR_POLICY_DNS_DOMAIN_INFO Info)
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)
{
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 */