mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 03:46:38 +00:00
[SAMSRV]
SamrCreateUserInDomain: Set default logon hours. svn path=/trunk/; revision=58740
This commit is contained in:
parent
c2d5094a67
commit
8bcbe27e41
1 changed files with 6 additions and 2 deletions
|
@ -2096,6 +2096,7 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle,
|
||||||
SAM_USER_FIXED_DATA FixedUserData;
|
SAM_USER_FIXED_DATA FixedUserData;
|
||||||
PSAM_DB_OBJECT DomainObject;
|
PSAM_DB_OBJECT DomainObject;
|
||||||
PSAM_DB_OBJECT UserObject;
|
PSAM_DB_OBJECT UserObject;
|
||||||
|
UCHAR LogonHours[23];
|
||||||
ULONG ulSize;
|
ULONG ulSize;
|
||||||
ULONG ulRid;
|
ULONG ulRid;
|
||||||
WCHAR szRid[9];
|
WCHAR szRid[9];
|
||||||
|
@ -2350,11 +2351,14 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set LogonHours attribute*/
|
/* Set LogonHours attribute*/
|
||||||
|
*((PUSHORT)LogonHours) = 168;
|
||||||
|
memset(&(LogonHours[2]), 0xff, 21);
|
||||||
|
|
||||||
Status = SampSetObjectAttribute(UserObject,
|
Status = SampSetObjectAttribute(UserObject,
|
||||||
L"LogonHours",
|
L"LogonHours",
|
||||||
REG_BINARY,
|
REG_BINARY,
|
||||||
NULL,
|
&LogonHours,
|
||||||
0);
|
sizeof(LogonHours));
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
TRACE("failed with status 0x%08lx\n", Status);
|
TRACE("failed with status 0x%08lx\n", Status);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue