X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=cmdline.c;h=f288ed629ee837272998ec554cb45e3bbfbc3552;hb=7e9cb921f6024a9de567cc509974bf7388230f0f;hp=ee1d31e7580fa30826cda3320eb3881fbbbf3215;hpb=89da2ddf564a93414ee9ab2df3f053608094e417;p=PuTTY.git diff --git a/cmdline.c b/cmdline.c index ee1d31e7..f288ed62 100644 --- a/cmdline.c +++ b/cmdline.c @@ -574,6 +574,53 @@ int cmdline_process_param(const char *p, char *value, nextitem += length + skip; } } + + 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); + UNAVAILABLE_IN(TOOLTYPE_NONNETWORK); + SAVEABLE(0); + fn = filename_from_str(value); + conf_set_filename(conf, CONF_logfilename, fn); + conf_set_int(conf, CONF_logtype, + !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 */ }