X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=cmdline.c;h=f288ed629ee837272998ec554cb45e3bbfbc3552;hb=7a0a404eb8e79d8e5de740a06a08824cc918d4c8;hp=fbf1e5c9e69710fce26e19320f076a314d921e27;hpb=009ab4a20cfd685ff20b8f922068ffa6900b92c7;p=PuTTY.git diff --git a/cmdline.c b/cmdline.c index fbf1e5c9..f288ed62 100644 --- 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 */ }