]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winsftp.c
Extend ACL-restriction to all Windows tools.
[PuTTY.git] / windows / winsftp.c
index 0776cba94bdc19f544814d26dd7e985611fcae42..a0341274f3637241d547278ff8a100606c470ec4 100644 (file)
@@ -733,6 +733,25 @@ char *ssh_sftp_get_cmdline(const char *prompt, int no_fds_ok)
     return ctx->line;
 }
 
+void platform_psftp_post_option_setup(void)
+{
+#ifndef UNPROTECT
+    /*
+     * Protect our process.
+     */
+    {
+        char *error = NULL;
+        if (!setprocessacl(error)) {
+            char *message = dupprintf("Could not restrict process ACL: %s",
+                                      error);
+            logevent(NULL, message);
+            sfree(message);
+            sfree(error);
+        }
+    }
+#endif
+}
+
 /* ----------------------------------------------------------------------
  * Main program. Parse arguments etc.
  */