Author: ekohl
Date: Sat Mar 30 20:53:47 2013
New Revision: 58617
URL:
http://svn.reactos.org/svn/reactos?rev=58617&view=rev
Log:
[SAMSRV]
Add LogonHours attribute to new user accounts.
Modified:
trunk/reactos/dll/win32/samsrv/setup.c
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] Sat Mar 30 20:53:47 2013
@@ -229,6 +229,7 @@
ULONG UserAccountControl)
{
SAM_USER_FIXED_DATA FixedUserData;
+ UCHAR LogonHours[23];
LPWSTR lpEmptyString = L"";
DWORD dwDisposition;
WCHAR szAccountKeyName[32];
@@ -343,7 +344,17 @@
(LPVOID)lpEmptyString,
sizeof(WCHAR));
- /* FIXME: Set LogonHours attribute*/
+ /* Set LogonHours attribute */
+ *((PUSHORT)LogonHours) = 168;
+ memset(&(LogonHours[2]), 0xff, 21);
+
+ RegSetValueEx(hAccountKey,
+ L"LogonHours",
+ 0,
+ REG_BINARY,
+ (LPVOID)LogonHours,
+ sizeof(LogonHours));
+
/* FIXME: Set Groups attribute*/
/* Set LMPwd attribute*/