[LSASRV]
[reactos.git] / reactos / dll / win32 / lsasrv / database.c
index b5d4fc7..de113c5 100644 (file)
@@ -231,7 +231,7 @@ LsapCreateDatabaseObjects(VOID)
     POLICY_MODIFICATION_INFO ModificationInfo;
     POLICY_AUDIT_FULL_QUERY_INFO AuditFullInfo = {FALSE, FALSE};
     POLICY_AUDIT_LOG_INFO AuditLogInfo;
-
+    GUID DnsDomainGuid;
     PLSA_DB_OBJECT PolicyObject = NULL;
     PSID AccountDomainSid = NULL;
     ULONG AuditEventsCount;
@@ -255,6 +255,7 @@ LsapCreateDatabaseObjects(VOID)
     AuditLogInfo.TimeToShutdown.QuadPart = 0;          // LARGE_INTEGER
     AuditLogInfo.NextAuditRecordId = 0;                        // DWORD
 
+    /* Initialize the Audit Events attribute */
     AuditEventsCount = AuditCategoryAccountLogon - AuditCategorySystem + 1;
     AuditEventsSize = sizeof(LSAP_POLICY_AUDIT_EVENTS_DATA) + AuditEventsCount * sizeof(DWORD);
     AuditEventsInfo = RtlAllocateHeap(RtlGetProcessHeap(),
@@ -268,6 +269,9 @@ LsapCreateDatabaseObjects(VOID)
     for (i = 0; i < AuditEventsCount; i++)
         AuditEventsInfo->AuditEvents[i] = 0;
 
+    /* Initialize the DNS Domain GUID attribute */
+    memset(&DnsDomainGuid, 0, sizeof(GUID));
+
     /* Initialize the modification attribute */
     ModificationInfo.ModifiedId.QuadPart = 0;
     NtQuerySystemTime(&ModificationInfo.DatabaseCreationTime);
@@ -336,6 +340,24 @@ LsapCreateDatabaseObjects(VOID)
                            &AuditEventsInfo,
                            AuditEventsSize);
 
+    /* Set the DNS Domain Name attribute */
+    LsapSetObjectAttribute(PolicyObject,
+                           L"PolDnDDN",
+                           NULL,
+                           0);
+
+    /* Set the DNS Forest Name attribute */
+    LsapSetObjectAttribute(PolicyObject,
+                           L"PolDnTrN",
+                           NULL,
+                           0);
+
+    /* Set the DNS Domain GUID attribute */
+    LsapSetObjectAttribute(PolicyObject,
+                           L"PolDnDmG",
+                           &DnsDomainGuid,
+                           sizeof(GUID));
+
 done:
     if (AuditEventsInfo != NULL)
         RtlFreeHeap(RtlGetProcessHeap(), 0, AuditEventsInfo);