scp: do not spawn ssh with two -s flags for remote-to-remote copies
authornaddy <naddy@openbsd.org>
Wed, 11 Aug 2021 14:05:19 +0000 (14:05 +0000)
committernaddy <naddy@openbsd.org>
Wed, 11 Aug 2021 14:05:19 +0000 (14:05 +0000)
commitfce974b6a71da7e0b0906cc84906e35e2daef1ac
treeceb3c77f50709b447f91811c703c17fcb3f88b82
parentc96a7dff4ba90249e8f182d23d74225bc3f74572
scp: do not spawn ssh with two -s flags for remote-to-remote copies

Do not add another "-s" to the argument vector every time an SFTP
connection is initiated.  Instead, introduce a subsystem flag to
do_cmd() and add "-s" when the flag is set.

ok djm@
usr.bin/ssh/scp.c