X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/a673e21051a4563311299e7fbff709e1115d2f4d..d6dcf6c6407692f1f138f6151e6b24681e103807:/scp.c?ds=sidebyside diff --git a/scp.c b/scp.c index 7a8cebde..8237f902 100644 --- a/scp.c +++ b/scp.c @@ -91,7 +91,7 @@ void logevent(char *string) { } -void ldisc_send(char *buf, int len) +void ldisc_send(char *buf, int len, int interactive) { /* * This is only here because of the calls to ldisc_send(NULL, @@ -375,8 +375,6 @@ int from_backend(int is_stderr, char *data, int datalen) return 0; } - inbuf_head = 0; - /* * If this is before the real session begins, just return. */ @@ -604,6 +602,15 @@ static void do_cmd(char *host, char *user, char *cmd) cfg.port = portnumber; /* + * Disable scary things which shouldn't be enabled for simple + * things like SCP and SFTP: agent forwarding, port forwarding, + * X forwarding. + */ + cfg.x11_forward = 0; + cfg.agentfwd = 0; + cfg.portfwd[0] = cfg.portfwd[1] = '\0'; + + /* * Attempt to start the SFTP subsystem as a first choice, * falling back to the provided scp command if that fails. */