mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +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;
|
||||
PSAM_DB_OBJECT UserObject;
|
||||
ULONG Length;
|
||||
SAM_USER_FIXED_DATA FixedUserData;
|
||||
NTSTATUS Status;
|
||||
|
||||
TRACE("(%p %u %p %p %u %p %p %u %p %u %p)\n",
|
||||
|
@ -7585,6 +7586,28 @@ SamrChangePasswordUser(IN SAMPR_HANDLE UserHandle,
|
|||
NtPresent,
|
||||
NewLmPassword,
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue