]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - cmdline.c
Remove spurious -shareexists reference in Plink docs.
[PuTTY.git] / cmdline.c
index 0c7ef4c91c98ad721403b186d818881587600a16..9f3360b2bea67e009cafbdd3f70842a1ac1b554d 100644 (file)
--- a/cmdline.c
+++ b/cmdline.c
@@ -236,6 +236,21 @@ int cmdline_process_param(char *p, char *value, int need_save, Conf *conf)
        SAVEABLE(0);
        conf_set_str(conf, CONF_loghost, value);
     }
+    if (!strcmp(p, "-hostkey")) {
+        char *dup;
+       RETURN(2);
+       UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
+       SAVEABLE(0);
+        dup = dupstr(value);
+        if (!validate_manual_hostkey(dup)) {
+            cmdline_error("'%s' is not a valid format for a manual host "
+                          "key specification", value);
+            sfree(dup);
+            return ret;
+        }
+       conf_set_str_str(conf, CONF_ssh_manual_hostkeys, dup, "");
+        sfree(dup);
+    }
     if ((!strcmp(p, "-L") || !strcmp(p, "-R") || !strcmp(p, "-D"))) {
        char type, *q, *qq, *key, *val;
        RETURN(2);
@@ -557,6 +572,33 @@ int cmdline_process_param(char *p, char *value, int need_save, Conf *conf)
            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);
+    }
+
     return ret;                               /* unrecognised */
 }