[SAMSRV] Simplify the initialization of the account expiration time

This commit is contained in:
Eric Kohl 2018-08-27 00:12:44 +02:00
parent 2fafcff3ef
commit a7b52d6a44

View file

@ -2512,10 +2512,10 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle,
/* Store the fixed domain attributes */ /* Store the fixed domain attributes */
Status = SampSetObjectAttribute(DomainObject, Status = SampSetObjectAttribute(DomainObject,
L"F", L"F",
REG_BINARY, REG_BINARY,
&FixedDomainData, &FixedDomainData,
ulSize); ulSize);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
TRACE("failed with status 0x%08lx\n", Status); TRACE("failed with status 0x%08lx\n", Status);
@ -2557,8 +2557,7 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle,
FixedUserData.LastLogon.QuadPart = 0; FixedUserData.LastLogon.QuadPart = 0;
FixedUserData.LastLogoff.QuadPart = 0; FixedUserData.LastLogoff.QuadPart = 0;
FixedUserData.PasswordLastSet.QuadPart = 0; FixedUserData.PasswordLastSet.QuadPart = 0;
FixedUserData.AccountExpires.LowPart = MAXULONG; FixedUserData.AccountExpires.QuadPart = MAXLONGLONG;
FixedUserData.AccountExpires.HighPart = MAXLONG;
FixedUserData.LastBadPasswordTime.QuadPart = 0; FixedUserData.LastBadPasswordTime.QuadPart = 0;
FixedUserData.UserId = ulRid; FixedUserData.UserId = ulRid;
FixedUserData.PrimaryGroupId = DOMAIN_GROUP_RID_USERS; FixedUserData.PrimaryGroupId = DOMAIN_GROUP_RID_USERS;