mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 03:46:38 +00:00
[SAMSRV]
SamrChangePasswordUser: Update the PasswordLastSet time after a new password has been set. svn path=/trunk/; revision=59456
This commit is contained in:
parent
eb7721d922
commit
b219de051f
1 changed files with 23 additions and 0 deletions
|
@ -7477,6 +7477,7 @@ SamrChangePasswordUser(IN SAMPR_HANDLE UserHandle,
|
||||||
PENCRYPTED_NT_OWF_PASSWORD NewNtPassword;
|
PENCRYPTED_NT_OWF_PASSWORD NewNtPassword;
|
||||||
PSAM_DB_OBJECT UserObject;
|
PSAM_DB_OBJECT UserObject;
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
|
SAM_USER_FIXED_DATA FixedUserData;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
TRACE("(%p %u %p %p %u %p %p %u %p %u %p)\n",
|
TRACE("(%p %u %p %p %u %p %p %u %p %u %p)\n",
|
||||||
|
@ -7585,6 +7586,28 @@ SamrChangePasswordUser(IN SAMPR_HANDLE UserHandle,
|
||||||
NtPresent,
|
NtPresent,
|
||||||
NewLmPassword,
|
NewLmPassword,
|
||||||
LmPresent);
|
LmPresent);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
/* Get the fixed size user data */
|
||||||
|
Length = sizeof(SAM_USER_FIXED_DATA);
|
||||||
|
Status = SampGetObjectAttribute(UserObject,
|
||||||
|
L"F",
|
||||||
|
NULL,
|
||||||
|
&FixedUserData,
|
||||||
|
&Length);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
/* Update PasswordLastSet */
|
||||||
|
NtQuerySystemTime(&FixedUserData.PasswordLastSet);
|
||||||
|
|
||||||
|
/* Set the fixed size user data */
|
||||||
|
Status = SampSetObjectAttribute(UserObject,
|
||||||
|
L"F",
|
||||||
|
REG_BINARY,
|
||||||
|
&FixedUserData,
|
||||||
|
Length);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue