]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winpgnt.c
Document SSH IUTF8 mode.
[PuTTY.git] / windows / winpgnt.c
index ab0305246771851357be3196dfcb332385891cf8..86998a2bb49127c90e04ce8ce75c435335a23d5f 100644 (file)
@@ -49,7 +49,7 @@
 
 #define APPNAME "Pageant"
 
-extern char ver[];
+extern const char ver[];
 
 static HWND keylist;
 static HWND aboutbox;
@@ -1174,6 +1174,23 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
        }
     }
 
+#if !defined UNPROTECT && !defined NO_SECURITY
+    /*
+     * Protect our process.
+     */
+    {
+        char *error = NULL;
+        if (!setprocessacl(error)) {
+            char *message = dupprintf("Could not restrict process ACL: %s",
+                                      error);
+            MessageBox(NULL, message, "Pageant Warning",
+                       MB_ICONWARNING | MB_OK);
+            sfree(message);
+            sfree(error);
+        }
+    }
+#endif
+
     /*
      * Forget any passphrase that we retained while going over
      * command line keyfiles.