[MSGINA] Always stop the automatic login after the first try
authorEric Kohl <eric.kohl@reactos.org>
Tue, 22 May 2018 19:19:58 +0000 (21:19 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Tue, 22 May 2018 19:19:58 +0000 (21:19 +0200)
Fixes CORE-14643

dll/win32/msgina/gui.c

index 1e1069e..9069987 100644 (file)
@@ -400,7 +400,7 @@ DoChangePassword(
                   RequestBuffer->NewPassword.MaximumLength);
 
     /* Connect to the LSA server */
-    if (!ConnectToLsa(pgContext))
+    if (ConnectToLsa(pgContext) != ERROR_SUCCESS)
     {
         ERR("ConnectToLsa() failed\n");
         goto done;
@@ -882,11 +882,11 @@ DoLogon(
     ZeroMemory(pgContext->Password, sizeof(pgContext->Password));
     wcscpy(pgContext->Password, Password);
 
-    pgContext->bAutoAdminLogon = FALSE;
-
     result = TRUE;
 
 done:
+    pgContext->bAutoAdminLogon = FALSE;
+
     if (UserName != NULL)
         HeapFree(GetProcessHeap(), 0, UserName);