]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winpgnt.c
Turn off Windows process ACL restriction by default.
[PuTTY.git] / windows / winpgnt.c
index 604d092f1119740447ea4b7d483f3bf7b22faa35..fe0822e4889f4f10706cbe7b63cae9d53e783252 100644 (file)
@@ -1159,6 +1159,10 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
        if (!strcmp(argv[i], "-pgpfp")) {
            pgp_fingerprints();
            return 1;
+        } else if (!strcmp(argv[i], "-restrict-acl") ||
+                   !strcmp(argv[i], "-restrict_acl") ||
+                   !strcmp(argv[i], "-restrictacl")) {
+            restrict_process_acl();
        } else if (!strcmp(argv[i], "-c")) {
            /*
             * If we see `-c', then the rest of the
@@ -1178,23 +1182,6 @@ 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.