]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Surround process protection with an #ifndef UNPROTECT
authorOwen Dunn <owen@greenend.org.uk>
Tue, 24 Nov 2015 23:12:33 +0000 (23:12 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 29 Feb 2016 19:59:34 +0000 (19:59 +0000)
(cherry picked from commit 8b65fef55c688d8a52bd56f426e345671fab0303)

windows/window.c

index ad100c53204b72e7338ea2aebc5665739106175f..ec7e17190a8fae28a88e1b2fcca30dd48ad5831a 100644 (file)
@@ -395,15 +395,14 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
      * Protect our process
      */
     {
-      char *error = NULL;
-
-      if (! setprocessacl(error)) {
-       /* FIXME: prepare to stuff this into event log somehow */
-       MessageBox(NULL, "Process protection",
-                  error, MB_OK | MB_ICONEXCLAMATION);
-      }
-      sfree(error);
-
+#ifndef UNPROTECT
+        char *error = NULL;
+        if (! setprocessacl(error)) {
+           logevent(NULL, "Could not restrict process ACL: %s",
+                    error);
+       }
+        sfree(error);
+#endif
     }
     /*
      * Process the command line.