Преглед на файлове

Logging SSH authentication prompts responding

Source commit: 812f7060c5afd5eb6bbf7bb6b34060a8abfa1d7a
Martin Prikryl преди 4 години
родител
ревизия
7ec3560bb8
променени са 1 файла, в които са добавени 10 реда и са изтрити 1 реда
  1. 10 1
      source/core/SecureShell.cpp

+ 10 - 1
source/core/SecureShell.cpp

@@ -930,16 +930,25 @@ bool __fastcall TSecureShell::PromptUser(bool /*ToServer*/,
 
   if (!Result)
   {
+    LogEvent(L"Prompting user for the credentials.");
     Result = FUI->PromptUser(FSessionData,
       PromptKind, Name, Instructions, Prompts, Results);
 
-    if (Result)
+    if (!Result)
+    {
+      LogEvent(L"Prompt cancelled.");
+    }
+    else
     {
       if ((Prompts->Count >= 1) &&
           (FLAGSET(int(Prompts->Objects[0]), pupEcho) || Configuration->LogSensitive))
       {
         LogEvent(FORMAT(L"Response: \"%s\"", (Results->Strings[0])));
       }
+      else
+      {
+        LogEvent("Prompt responded.");
+      }
 
       if ((PromptKind == pkUserName) && (Prompts->Count == 1))
       {