Author: ekohl
Date: Tue Mar 12 21:27:35 2013
New Revision: 58478
URL:
http://svn.reactos.org/svn/reactos?rev=58478&view=rev
Log:
[SAMSRV]
Set MaxPasswordAge, LockoutDuration and LockoutObservationWindow for domains during
setup.
Modified:
trunk/reactos/dll/win32/samsrv/samsrv.h
trunk/reactos/dll/win32/samsrv/setup.c
Modified: trunk/reactos/dll/win32/samsrv/samsrv.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samsrv.h?…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/samsrv.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/samsrv.h [iso-8859-1] Tue Mar 12 21:27:35 2013
@@ -69,11 +69,11 @@
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;
Modified: trunk/reactos/dll/win32/samsrv/setup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/setup.c?r…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] Tue Mar 12 21:27:35 2013
@@ -13,9 +13,13 @@
WINE_DEFAULT_DEBUG_CHANNEL(samsrv);
+
/* GLOBALS *****************************************************************/
+#define TICKS_PER_SECOND 10000000LL
+
SID_IDENTIFIER_AUTHORITY SecurityNtAuthority = {SECURITY_NT_AUTHORITY};
+
/* FUNCTIONS ***************************************************************/
@@ -423,11 +427,11 @@
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;