]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - cmdline.c
first pass
[PuTTY.git] / cmdline.c
index fbf1e5c9e69710fce26e19320f076a314d921e27..f288ed629ee837272998ec554cb45e3bbfbc3552 100644 (file)
--- a/cmdline.c
+++ b/cmdline.c
@@ -575,8 +575,19 @@ int cmdline_process_param(const char *p, char *value,
        }
     }
 
-    if (!strcmp(p, "-sessionlog") ||
-        !strcmp(p, "-sshlog") ||
+    if (!strcmp(p, "-sessionlog")) {
+       Filename *fn;
+       RETURN(2);
+       UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER);
+       /* but available even in TOOLTYPE_NONNETWORK, cf pterm "-log" */
+       SAVEABLE(0);
+       fn = filename_from_str(value);
+       conf_set_filename(conf, CONF_logfilename, fn);
+       conf_set_int(conf, CONF_logtype, LGTYP_DEBUG);
+        filename_free(fn);
+    }
+
+    if (!strcmp(p, "-sshlog") ||
         !strcmp(p, "-sshrawlog")) {
        Filename *fn;
        RETURN(2);
@@ -585,12 +596,31 @@ int cmdline_process_param(const char *p, char *value,
        fn = filename_from_str(value);
        conf_set_filename(conf, CONF_logfilename, fn);
        conf_set_int(conf, CONF_logtype,
-                     !strcmp(p, "-sessionlog") ? LGTYP_DEBUG :
                      !strcmp(p, "-sshlog") ? LGTYP_PACKETS :
                      /* !strcmp(p, "-sshrawlog") ? */ LGTYP_SSHRAW);
         filename_free(fn);
     }
 
+    if (!strcmp(p, "-proxycmd")) {
+       RETURN(2);
+       UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
+       SAVEABLE(0);
+        conf_set_int(conf, CONF_proxy_type, PROXY_CMD);
+       conf_set_str(conf, CONF_proxy_telnet_command, value);
+    }
+
+#ifdef _WINDOWS
+    /*
+     * Cross-tool options only available on Windows.
+     */
+    if (!strcmp(p, "-restrict-acl") || !strcmp(p, "-restrict_acl") ||
+        !strcmp(p, "-restrictacl")) {
+       RETURN(1);
+        restrict_process_acl();
+        restricted_acl = TRUE;
+    }
+#endif
+
     return ret;                               /* unrecognised */
 }