Set MaxPasswordAge, LockoutDuration and LockoutObservationWindow for domains during setup.

svn path=/trunk/; revision=58478
This commit is contained in:
Eric Kohl 2013-03-12 21:27:35 +00:00
parent 6993ef3cbb
commit 0a47615a92
2 changed files with 14 additions and 10 deletions

View file

@ -69,11 +69,11 @@ typedef struct _SAM_DOMAIN_FIXED_DATA
ULONG Reserved;
LARGE_INTEGER CreationTime;
LARGE_INTEGER DomainModifiedCount;
LARGE_INTEGER MaxPasswordAge;
LARGE_INTEGER MinPasswordAge;
LARGE_INTEGER ForceLogoff;
LARGE_INTEGER LockoutDuration;
LARGE_INTEGER LockoutObservationWindow;
LARGE_INTEGER MaxPasswordAge; /* relative Time */
LARGE_INTEGER MinPasswordAge; /* relative Time */
LARGE_INTEGER ForceLogoff; /* relative Time */
LARGE_INTEGER LockoutDuration; /* relative Time */
LARGE_INTEGER LockoutObservationWindow; /* relative Time */
LARGE_INTEGER ModifiedCountAtLastPromotion;
ULONG NextRid;
ULONG PasswordProperties;

View file

@ -13,10 +13,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(samsrv);
/* GLOBALS *****************************************************************/
#define TICKS_PER_SECOND 10000000LL
SID_IDENTIFIER_AUTHORITY SecurityNtAuthority = {SECURITY_NT_AUTHORITY};
/* FUNCTIONS ***************************************************************/
BOOL
@ -423,11 +427,11 @@ SampCreateDomain(IN HKEY hDomainsKey,
FixedData.Version = 1;
NtQuerySystemTime(&FixedData.CreationTime);
FixedData.DomainModifiedCount.QuadPart = 0;
// FixedData.MaxPasswordAge // 6 Weeks
FixedData.MinPasswordAge.QuadPart = 0; // Now
// FixedData.ForceLogoff
// FixedData.LockoutDuration // 30 minutes
// FixedData.LockoutObservationWindow // 30 minutes
FixedData.MaxPasswordAge.QuadPart = -(6LL * 7LL * 24LL * 60LL * 60LL * TICKS_PER_SECOND); /* 6 weeks */
FixedData.MinPasswordAge.QuadPart = 0; /* right now */
// FixedData.ForceLogoff.QuadPart = // very far in the future aka never
FixedData.LockoutDuration.QuadPart = -(30LL * 60LL * TICKS_PER_SECOND); /* 30 minutes */
FixedData.LockoutObservationWindow.QuadPart = -(30LL * 60LL * TICKS_PER_SECOND); /* 30 minutes */
FixedData.ModifiedCountAtLastPromotion.QuadPart = 0;
FixedData.NextRid = 1000;
FixedData.PasswordProperties = 0;