]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winplink.c
Merge branch 'master' of ssh://tartarus.org/putty
[PuTTY.git] / windows / winplink.c
index 78311b59ed7fa5c424905f87dd1fbcbe0de6e053..a0458b39a878b0ad8af99d9a7294e2129b3bf787 100644 (file)
@@ -11,6 +11,7 @@
 #include "putty.h"
 #include "storage.h"
 #include "tree234.h"
+#include "winsecur.h"
 
 #define WM_AGENT_CALLBACK (WM_APP + 4)
 
@@ -212,6 +213,9 @@ static void usage(void)
     printf("  -N        don't start a shell/command (SSH-2 only)\n");
     printf("  -nc host:port\n");
     printf("            open tunnel in place of session (SSH-2 only)\n");
+    printf("  -sshlog file\n");
+    printf("  -sshrawlog file\n");
+    printf("            log protocol details to a file\n");
     printf("  -shareexists\n");
     printf("            test whether a connection-sharing upstream exists\n");
     exit(1);
@@ -494,6 +498,22 @@ int main(int argc, char **argv)
        }
     }
 
+#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);
+            logevent(NULL, message);
+            sfree(message);
+            sfree(error);
+        }
+    }
+#endif
+
     if (errors)
        return 1;