]> 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)
committerOwen Dunn <owen@greenend.org.uk>
Tue, 24 Nov 2015 23:12:33 +0000 (23:12 +0000)
windows/window.c

index db42634731f6258372752890bf6781f699ddbe08..2677145fef517b0f68f50333600b3e41a5315195 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.