Author: ekohl
Date: Wed Jul 10 23:04:49 2013
New Revision: 59456
URL:
http://svn.reactos.org/svn/reactos?rev=59456&view=rev
Log:
[SAMSRV]
SamrChangePasswordUser: Update the PasswordLastSet time after a new password has been
set.
Modified:
trunk/reactos/dll/win32/samsrv/samrpc.c
Modified: trunk/reactos/dll/win32/samsrv/samrpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Wed Jul 10 23:04:49 2013
@@ -7477,6 +7477,7 @@
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 @@
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;