Author: ekohl
Date: Tue Jul  9 21:47:55 2013
New Revision: 59453

URL: http://svn.reactos.org/svn/reactos?rev=59453&view=rev
Log:
[SAMSRV]
SamrChangePasswordUser: Use SampSetUserPassword to set the password hashes and 
update the password history.

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?rev=59453&r1=59452&r2=59453&view=diff
==============================================================================
--- trunk/reactos/dll/win32/samsrv/samrpc.c     [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/samrpc.c     [iso-8859-1] Tue Jul  9 
21:47:55 2013
@@ -7577,41 +7577,16 @@
         }
     }
 
-    /* Store the new LM password */
+    /* Store the new password hashes */
     if (NT_SUCCESS(Status))
     {
-        if (LmPresent)
-        {
-            Length = sizeof(ENCRYPTED_LM_OWF_PASSWORD);
-            Status = SampSetObjectAttribute(UserObject,
-                                            L"LMPwd",
-                                            REG_BINARY,
-                                            NewLmPassword,
-                                            Length);
-            if (!NT_SUCCESS(Status))
-            {
-                goto done;
-            }
-        }
-
-        /* Store the new NT password */
-        if (NtPresent)
-        {
-            Length = sizeof(ENCRYPTED_NT_OWF_PASSWORD);
-            Status = SampSetObjectAttribute(UserObject,
-                                            L"NTPwd",
-                                            REG_BINARY,
-                                            NewNtPassword,
-                                            Length);
-            if (!NT_SUCCESS(Status))
-            {
-                goto done;
-            }
-        }
-    }
-
-
-done:
+        Status = SampSetUserPassword(UserObject,
+                                     NewNtPassword,
+                                     NtPresent,
+                                     NewLmPassword,
+                                     LmPresent);
+    }
+
     return Status;
 }
 


Reply via email to