]>
git.ipfire.org Git - thirdparty/openssh-portable.git/log
Damien Miller [Sun, 26 Sep 2021 14:03:19 +0000 (00:03 +1000)]
initgroups needs grp.h
djm@openbsd.org [Sun, 26 Sep 2021 14:01:11 +0000 (14:01 +0000)]
upstream: openssh-8.8
OpenBSD-Commit-ID:
12357794602ac979eb7312a1fb190c453f492ec4
djm@openbsd.org [Sun, 26 Sep 2021 14:01:03 +0000 (14:01 +0000)]
upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID:
6aa003ee658b316960d94078f2a16edbc25087ce
Damien Miller [Sun, 26 Sep 2021 12:16:36 +0000 (22:16 +1000)]
update version numbers for release
kn@openbsd.org [Sat, 25 Sep 2021 09:40:33 +0000 (09:40 +0000)]
upstream: RSA/SHA-1 is not used by default anymore
OK dtucker deraadt djm
OpenBSD-Commit-ID:
055c51a221c3f099dd75c95362f902da1b8678c6
Darren Tucker [Fri, 24 Sep 2021 01:08:03 +0000 (11:08 +1000)]
Move the fgrep replacement to hostkey-rotate.sh.
The fgrep replacement for buggy greps doesn't work in the sftp-glob test
so move it to just where we know it's needed.
Darren Tucker [Thu, 23 Sep 2021 22:04:14 +0000 (08:04 +1000)]
Replacement function for buggy fgrep.
GNU (f)grep <=2.18, as shipped by FreeBSD<=12 and NetBSD<=9 will
occasionally fail to find ssh host keys in the hostkey-rotate test.
If we have those versions, use awk instead.
David Manouchehri [Thu, 23 Sep 2021 21:03:18 +0000 (17:03 -0400)]
Don't prompt for yes/no questions.
djm@openbsd.org [Mon, 20 Sep 2021 06:53:56 +0000 (06:53 +0000)]
upstream: fix missing -s in SYNOPSYS and usage() as well as a
capitalisation mistake; spotted by jmc@
OpenBSD-Commit-ID:
0ed8ee085c7503c60578941d8b45f3a61d4c9710
dtucker@openbsd.org [Mon, 20 Sep 2021 04:02:13 +0000 (04:02 +0000)]
upstream: Fix "Allocated port" debug message
for unix domain sockets. From peder.stray at gmail.com via github PR#272,
ok deraadt@
OpenBSD-Commit-ID:
8d5ef3fbdcdd29ebb0792b5022a4942db03f017e
djm@openbsd.org [Mon, 20 Sep 2021 01:55:42 +0000 (01:55 +0000)]
upstream: Switch scp back to use the old protocol by default, ahead of
release. We'll wait a little longer for people to pick up sftp-server(8) that
supports the extension that scp needs for ~user paths to continue working in
SFTP protocol mode. Discussed with deraadt@
OpenBSD-Commit-ID:
f281f603a705fba317ff076e7b11bcf2df941871
djm@openbsd.org [Sat, 18 Sep 2021 02:03:25 +0000 (02:03 +0000)]
upstream: better error message for ~user failures when the
sftp-server lacks the expand-path extension; ok deraadt@
OpenBSD-Commit-ID:
9c1d965d389411f7e86f0a445158bf09b8f9e4bc
djm@openbsd.org [Thu, 16 Sep 2021 15:22:22 +0000 (15:22 +0000)]
upstream: make some more scp-in-SFTP mode better match Unix idioms
suggested by deraadt@
OpenBSD-Commit-ID:
0f2439404ed4cf0b0be8bf49a1ee734836e1ac87
djm@openbsd.org [Thu, 16 Sep 2021 15:11:19 +0000 (15:11 +0000)]
upstream: allow log_stderr==2 to prefix log messages with argv[0]
use this to make scp's SFTP mode error messages more scp-like
prompted by and ok deraadt@
OpenBSD-Commit-ID:
0e821dbde423fc2280e47414bdc22aaa5b4e0733
Darren Tucker [Fri, 17 Sep 2021 03:03:31 +0000 (13:03 +1000)]
Test against LibreSSL 3.2.6, 3.3.4, 3.4.0.
djm@openbsd.org [Thu, 16 Sep 2021 05:36:03 +0000 (05:36 +0000)]
upstream: missing space character in ssh -G output broke the
t-sshcfgparse regression test; spotted by anton@
OpenBSD-Commit-ID:
bcc36fae2f233caac4baa8e58482da4aa350eed0
djm@openbsd.org [Wed, 15 Sep 2021 06:56:01 +0000 (06:56 +0000)]
upstream: allow CanonicalizePermittedCNAMEs=none in ssh_config; ok
markus@
OpenBSD-Commit-ID:
668a82ba8e56d731b26ffc5703213bfe071df623
mbuhl@openbsd.org [Tue, 14 Sep 2021 11:04:21 +0000 (11:04 +0000)]
upstream: put back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT
OK mfriedl@
OpenBSD-Commit-ID:
1aba1da828956cacaadb81a637338734697d9798
schwarze@openbsd.org [Sat, 11 Sep 2021 09:05:50 +0000 (09:05 +0000)]
upstream: Do not ignore SIGINT while waiting for input if editline(3)
is not used. Instead, in non-interactive mode, exit sftp(1), like for other
serious errors. As pointed out by dtucker@, when compiled without editline(3)
support in portable OpenSSH, the el == NULL branch is also used for
interactive mode. In that case, discard the input line and provide a fresh
prompt to the user just like in the case where editline(3) is used. OK djm@
OpenBSD-Commit-ID:
7d06f4d3ebba62115527fafacf38370d09dfb393
djm@openbsd.org [Sat, 11 Sep 2021 00:40:24 +0000 (00:40 +0000)]
upstream: when using SFTP protocol, continue transferring files after a
transfer error occurs. This matches original scp/rcp behaviour. ok dtucker@
OpenBSD-Commit-ID:
dfe4558d71dd09707e9b5d6e7d2e53b793da69fa
dtucker@openbsd.org [Fri, 10 Sep 2021 11:38:38 +0000 (11:38 +0000)]
upstream: Document that non-interactive commands are run via the user's
shell using the -c flag. ok jmc@
OpenBSD-Commit-ID:
4f0d912077732eead10423afd1acf4fc0ceec477
dtucker@openbsd.org [Fri, 10 Sep 2021 10:26:02 +0000 (10:26 +0000)]
upstream: Document behaviour of arguments following non-interactive
commands. Prompted by github PR#139 from EvanTheB, feedback & ok djm@ jmc@
OpenBSD-Commit-ID:
fc758d1fe0471dfab4304fcad6cd4ecc3d79162a
dtucker@openbsd.org [Fri, 10 Sep 2021 07:11:11 +0000 (07:11 +0000)]
upstream: Clarify which file's attributes -p preserves, and that
it's specifically the file mode bits. bz#3340 from calestyo at scientia.net,
ok djm@ jmc@
OpenBSD-Commit-ID:
f09e6098ed1c4be00c730873049825f8ee7cb884
djm@openbsd.org [Fri, 10 Sep 2021 05:46:09 +0000 (05:46 +0000)]
upstream: openssh-7.4 was incorrectly listed twice; spotted by
Dmitry Belyavskiy, ok dtucker@
OpenBSD-Commit-ID:
4b823ae448f6e899927ce7b04225ac9e489f58ef
jmc@openbsd.org [Thu, 9 Sep 2021 06:17:39 +0000 (06:17 +0000)]
upstream: - move CAVEATS to its correct order - use the term
"legacy" protocol rather than "original", as the latter made the text
misleading - uppercase SCP
ok djm
OpenBSD-Commit-ID:
8479255746d5fa76a358ee59e7340fecf4245ff0
David Carlier [Wed, 8 Sep 2021 18:49:54 +0000 (19:49 +0100)]
Disable tracing on FreeBSD using procctl.
Placed at the start of platform_disable_tracing() to prevent declaration
after code errors from strict C89 compilers (in the unlikely event that
more than one method is enabled).
djm@openbsd.org [Wed, 8 Sep 2021 23:31:39 +0000 (23:31 +0000)]
upstream: Use the SFTP protocol by default. The original scp/rcp
protocol remains available via the -O flag.
Note that ~user/ prefixed paths in SFTP mode require a protocol extension
that was first shipped in OpenSSH 8.7.
ok deraadt, after baking in snaps for a while without incident
OpenBSD-Commit-ID:
23588976e28c281ff5988da0848cb821fec9213c
Darren Tucker [Wed, 8 Sep 2021 11:09:49 +0000 (21:09 +1000)]
Really fix test on OpenSSL 1.1.1 stable.
Darren Tucker [Wed, 8 Sep 2021 08:51:39 +0000 (18:51 +1000)]
Correct OpenSSL 1.1.1 stable identifier.
Darren Tucker [Wed, 8 Sep 2021 08:39:44 +0000 (18:39 +1000)]
Increment nfds when coming from startup_pipe.
If we have to increase nfds because startup_pipe[0] is above any of the
descriptors passed in the fd_sets, we also need to add 1 to nfds since
select takes highest FD number plus one. bz#3345 from yaroslav.kuzmin
at vmssoftware.com.
Darren Tucker [Wed, 8 Sep 2021 03:45:10 +0000 (13:45 +1000)]
Tests for OpenSSL 3.0.0 release & 1.1.1 branch.
djm@openbsd.org [Wed, 8 Sep 2021 03:23:44 +0000 (03:23 +0000)]
upstream: correct my mistake in previous fix; spotted by halex
OpenBSD-Commit-ID:
3cc62d92e3f70006bf02468fc146bfc36fffa183
djm@openbsd.org [Tue, 7 Sep 2021 06:03:51 +0000 (06:03 +0000)]
upstream: avoid NULL deref in -Y find-principals. Report and fix
from Carlo Marcelo Arenas Belón
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
OpenBSD-Commit-ID:
6238486f8ecc888d6ccafcd9ad99e621bb41f1e0
millert@openbsd.org [Mon, 6 Sep 2021 00:36:01 +0000 (00:36 +0000)]
upstream: revision 1.381 neglected to remove
sChallengeResponseAuthentication from the enum. Noticed by
christos@zoulas.com. OK dtucker@
OpenBSD-Commit-ID:
b533283a4dd6d04a867da411a4c7a8fbc90e34ff
Darren Tucker [Sun, 5 Sep 2021 10:45:42 +0000 (20:45 +1000)]
Correct version_num for OpenSSL dev branch.
Darren Tucker [Sun, 5 Sep 2021 09:37:39 +0000 (19:37 +1000)]
Test against OpenSSL 3 branch as well as dev.
Now that OpenSSL development has moved to 3.1, test against the most
recent version of the openssl-3.0 branch too.
Darren Tucker [Sun, 5 Sep 2021 09:33:22 +0000 (19:33 +1000)]
OpenSSL development is now 3.1.*
dtucker@openbsd.org [Fri, 3 Sep 2021 07:43:23 +0000 (07:43 +0000)]
upstream: Use .Cm instead of .Dq in StrictHostKeyChecking list for
consistency. Patch from scop via github PR#257, ok jmc@
OpenBSD-Commit-ID:
3652a91564570779431802c31224fb4a9cf39872
dtucker@openbsd.org [Fri, 3 Sep 2021 07:27:03 +0000 (07:27 +0000)]
upstream: Mention using ssh -i for specifying the public key file
in the case where the private key is loaded into ssh-agent but is not present
locally. Based on patch from rafork via github PR#215, ok jmc@
OpenBSD-Commit-ID:
2282e83b0ff78d2efbe705883b67240745fa5bb2
dtucker@openbsd.org [Fri, 3 Sep 2021 05:25:50 +0000 (05:25 +0000)]
upstream: Refer to KEX "algorithms" instead of "methods" to match
other references and improve consistency. Patch from scop via github PR#241,
ok djm@
OpenBSD-Commit-ID:
840bc94ff6861b28d8603c8e8c16499bfb65e32c
dtucker@openbsd.org [Fri, 3 Sep 2021 05:12:25 +0000 (05:12 +0000)]
upstream: Remove redundant attrib_clear in upload_dir_internal.
The subsequent call to stat_to_attrib clears the struct as its first step
anyway. From pmeinhardt via github PR#220, ok djm@
OpenBSD-Commit-ID:
f5234fc6d7425b607e179acb3383f21716f3029e
dtucker@openbsd.org [Fri, 3 Sep 2021 04:11:13 +0000 (04:11 +0000)]
upstream: Add test for client termination status on signal.
Based on patch from Alexxz via github PR#235 with some tweaks, to
match patch in bz#3281.
OpenBSD-Regress-ID:
d87c7446fb8b5f8b45894fbbd6875df326e729e2
deraadt@openbsd.org [Thu, 2 Sep 2021 21:03:54 +0000 (21:03 +0000)]
upstream: sys/param.h is not needed for any visible reason
OpenBSD-Commit-ID:
8bdea2d0c75692e4c5777670ac039d4b01c1f368
Shchelkunov Artem [Wed, 11 Aug 2021 13:07:58 +0000 (18:07 +0500)]
Fix memory leak in error path.
*info is allocated via xstrdup but was leaked in the PAM_AUTH_ERR path.
From github PR#266.
dtucker@openbsd.org [Wed, 1 Sep 2021 03:16:06 +0000 (03:16 +0000)]
upstream: Fix ssh-rsa fallback for old PuTTY interop tests.
OpenBSD-Regress-ID:
a19ac929da604843a5b5f0f48d2c0eb6e0773d37
dtucker@openbsd.org [Wed, 1 Sep 2021 00:50:27 +0000 (00:50 +0000)]
upstream: Add a function to skip remaining tests.
Many tests skip tests for various reasons but not in a consistent way and
don't always clean up, so add that and switch the tests that do that over.
OpenBSD-Regress-ID:
72d2ec90a3ee8849486956a808811734281af735
dtucker@openbsd.org [Tue, 31 Aug 2021 07:13:59 +0000 (07:13 +0000)]
upstream: Specify path to PuTTY keys.
Portable needs this and it makes no difference on OpenBSD, so resync
them. (Id sync only, Portable already had this.)
OpenBSD-Regress-ID:
33f6f66744455886d148527af8368811e4264162
dtucker@openbsd.org [Tue, 31 Aug 2021 06:13:23 +0000 (06:13 +0000)]
upstream: Better compat tests with old PuTTY.
When running PuTTY interop tests and using a PuTTY version older than
0.76, re-enable the ssh-rsa host key algorithm (the 256 and 512 variants
of RSA were added some time between 0.73 and 0.76).
OpenBSD-Regress-ID:
e6138d6987aa705fa1e4f216db0bb386e1ff38e1
Darren Tucker [Tue, 31 Aug 2021 07:04:50 +0000 (17:04 +1000)]
Resync PuTTY interop tests.
Resync behaviour when REGRESS_INTEROP_PUTTY is not set with OpenBSD.
dtucker@openbsd.org [Tue, 31 Aug 2021 01:25:27 +0000 (01:25 +0000)]
upstream: Specify hostkeyalgorithms in SSHFP test.
Specify host key algorithms in sshd's default set for the SSHFP test,
from djm@. Make the reason for when the test is skipped a bit clearer.
OpenBSD-Regress-ID:
4f923dfc761480d5411de17ea6f0b30de3e32cea
djm@openbsd.org [Mon, 30 Aug 2021 01:15:45 +0000 (01:15 +0000)]
upstream: adapt to RSA/SHA1 deprectation
OpenBSD-Regress-ID:
952397c39a22722880e4de9d1c50bb1a14f907bb
djm@openbsd.org [Sun, 29 Aug 2021 23:53:10 +0000 (23:53 +0000)]
upstream: After years of forewarning, disable the RSA/SHA-1
signature algorithm by default. It is feasible to create colliding SHA1
hashes, so we need to deprecate its use.
RSA/SHA-256/512 remains available and will be transparently selected
instead of RSA/SHA1 for most SSH servers released in the last five+
years. There is no need to regenerate RSA keys.
The use of RSA/SHA1 can be re-enabled by adding "ssh-rsa" to the
PubkeyAcceptedAlgorithms directives on the client and server.
ok dtucker deraadt
OpenBSD-Commit-ID:
189bcc4789c7254e09e23734bdd5def8354ff1d5
djm@openbsd.org [Sun, 29 Aug 2021 23:44:07 +0000 (23:44 +0000)]
upstream: wrap at 80 columns
OpenBSD-Commit-ID:
47ca2286d6b52a9747f34da16d742879e1a37bf0
Darren Tucker [Fri, 20 Aug 2021 08:14:13 +0000 (18:14 +1000)]
Replace shell function with ssh-keygen -A.
Prevents the init script in the SysV package from trying (and failing)
to generate unsupported key types. Remove now-unused COMMENT_OUT_ECC.
ok tim@
Darren Tucker [Fri, 20 Aug 2021 05:39:05 +0000 (15:39 +1000)]
Remove obsolete Redhat PAM config and init script.
Damien Miller [Fri, 20 Aug 2021 04:03:49 +0000 (14:03 +1000)]
depend
Damien Miller [Fri, 20 Aug 2021 03:59:43 +0000 (13:59 +1000)]
update version numbers
djm@openbsd.org [Fri, 20 Aug 2021 03:22:55 +0000 (03:22 +0000)]
upstream: openssh-8.7
OpenBSD-Commit-ID:
8769dff0fd76ae3193d77bf83b439adee0f300cd
Darren Tucker [Fri, 20 Aug 2021 00:48:13 +0000 (10:48 +1000)]
Also check pid in pselect_notify_setup.
Spotted by djm@.
Darren Tucker [Thu, 19 Aug 2021 22:39:33 +0000 (08:39 +1000)]
Prefix pselect functions to clarify debug messages
Darren Tucker [Thu, 19 Aug 2021 22:30:42 +0000 (08:30 +1000)]
Fix race in pselect replacement code.
On the second and subsequent calls to pselect the notify_pipe was not
added to the select readset, opening up a race that om G. Christensen
discovered on multiprocessor Solaris <=9 systems.
Also reinitialize notify_pipe if the pid changes. This will prevent a
parent and child from using the same FD, although this is not an issue
in the current structure it might be in future.
Darren Tucker [Wed, 18 Aug 2021 02:51:30 +0000 (12:51 +1000)]
Check compiler for c99 declarations after code.
The sntrup761 reference code contains c99-style declarations after code
so don't try to build that if the compiler doesn't support it.
Darren Tucker [Tue, 17 Aug 2021 05:12:04 +0000 (15:12 +1000)]
Remove trailing backslash on regress-unit-binaries
Darren Tucker [Mon, 16 Aug 2021 21:59:27 +0000 (07:59 +1000)]
Put stdint.h inside HAVE_STDINT_H.
From Tom G. Christensen.
Darren Tucker [Mon, 16 Aug 2021 04:13:02 +0000 (14:13 +1000)]
Improve github test driver script.
- use a trap to always output any failed regress logs (since the script
sets -e, the existing log output is never invoked).
- pass LTESTS and SKIP_LTESTS when re-running with sshd options (eg.
UsePAM).
Darren Tucker [Mon, 16 Aug 2021 01:32:23 +0000 (11:32 +1000)]
Remove deprecated ubuntu-16.04 test targets.
Github has deprecated ubuntu-16.04 and it will be removed on 20
September.
Darren Tucker [Sun, 15 Aug 2021 13:25:26 +0000 (23:25 +1000)]
Skip agent ptrace test on hurd.
Darren Tucker [Sun, 15 Aug 2021 09:37:22 +0000 (19:37 +1000)]
Add hurd test target.
Darren Tucker [Sun, 15 Aug 2021 02:45:10 +0000 (12:45 +1000)]
Skip scp3 tests on all dfly58 and 60 configs.
Tim Rice [Sat, 14 Aug 2021 20:08:07 +0000 (13:08 -0700)]
openbsd-compat/openbsd-compat.h: put bsd-signal.h before bsd-misc.h
to get sigset_t from signal.h needed for the pselect replacement.
Darren Tucker [Fri, 13 Aug 2021 03:21:00 +0000 (13:21 +1000)]
Test OpenSSH from OpenBSD head on 6.8 and 6.9.
Darren Tucker [Fri, 13 Aug 2021 03:00:14 +0000 (13:00 +1000)]
Skip scp3 test on dragonfly 58 and 60.
The tests hang, so skip until we figure them out.
djm@openbsd.org [Thu, 12 Aug 2021 23:59:25 +0000 (23:59 +0000)]
upstream: mention that CASignatureAlgorithms accepts +/- similarly to
the other algorithm list directives; ok jmc bz#3335
OpenBSD-Commit-ID:
0d46b53995817052c78e2dce9dbd133963b073d9
schwarze@openbsd.org [Thu, 12 Aug 2021 09:59:00 +0000 (09:59 +0000)]
upstream: In the editline(3) branch of the sftp(1) event loop,
handle SIGINT rather than ignoring it, such that the user can use Ctrl-C to
discard the currently edited command line and get a fresh prompt, just like
in ftp(1), bc(1), and in shells.
It is critical to not use ssl_signal() for this particular case
because that function unconditionally sets SA_RESTART, but here we
need the signal to interrupt the read(2) in the el_gets(3) event loop.
OK dtucker@ deraadt@
OpenBSD-Commit-ID:
8025115a773f52e9bb562eaab37ea2e021cc7299
naddy@openbsd.org [Wed, 11 Aug 2021 14:07:54 +0000 (14:07 +0000)]
upstream: scp: tweak man page and error message for -3 by default
Now that the -3 option is enabled by default, flip the documentation
and error message logic from "requires -3" to "blocked by -R".
ok djm@
OpenBSD-Commit-ID:
a872592118444fb3acda5267b2a8c3d4c4252020
naddy@openbsd.org [Wed, 11 Aug 2021 14:05:19 +0000 (14:05 +0000)]
upstream: 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@
OpenBSD-Commit-ID:
25df69759f323661d31b2e1e790faa22e27966c1
djm@openbsd.org [Wed, 11 Aug 2021 08:55:04 +0000 (08:55 +0000)]
upstream: test -Oprint-pubkey
OpenBSD-Regress-ID:
3d51afb6d1f287975fb6fddd7a2c00a3bc5094e0
djm@openbsd.org [Wed, 11 Aug 2021 08:54:17 +0000 (08:54 +0000)]
upstream: when verifying sshsig signatures, support an option
(-Oprint-pubkey) to dump the full public key to stdout; based on patch from
Fabian Stelzer; ok markus@
OpenBSD-Commit-ID:
0598000e5b9adfb45d42afa76ff80daaa12fc3e2
djm@openbsd.org [Wed, 11 Aug 2021 05:21:32 +0000 (05:21 +0000)]
upstream: oops, missed one more %p
OpenBSD-Commit-ID:
e7e62818d1564cc5cd9086eaf7a51cbd1a9701eb
djm@openbsd.org [Wed, 11 Aug 2021 05:20:17 +0000 (05:20 +0000)]
upstream: remove a bunch of %p in format strings; leftovers of
debuggings past. prompted by Michael Forney, ok dtucker@
OpenBSD-Commit-ID:
4853a0d6c9cecaba9ecfcc19066e52d3a8dcb2ac
Darren Tucker [Tue, 10 Aug 2021 23:21:09 +0000 (09:21 +1000)]
Add includes.h to compat tests.
On platforms where closefrom returns void (eg glibc>=2.34) the prototype
for closefrom in its compat tests would cause compile errors. Remove
this and have the tests pull in the compat headers in the same way as
the main code. bz#3336.
djm@openbsd.org [Tue, 10 Aug 2021 03:35:45 +0000 (03:35 +0000)]
upstream: adapt to scp -M flag change; make scp3.sh test SFTP mode too
OpenBSD-Regress-ID:
43fea26704a0f0b962b53c1fabcb68179638f9c0
djm@openbsd.org [Tue, 10 Aug 2021 03:33:34 +0000 (03:33 +0000)]
upstream: Prepare for a future where scp(1) uses the SFTP protocol by
default. Replace recently added -M option to select the protocol with -O
(olde) and -s (SFTP) flags, and label the -s flag with a clear warning that
it will be removed in the near future (so no, don't use it in scripts!).
prompted by/feedback from deraadt@
OpenBSD-Commit-ID:
92ad72cc6f0023c9be9e316d8b30eb6d8d749cfc
djm@openbsd.org [Mon, 9 Aug 2021 23:56:36 +0000 (23:56 +0000)]
upstream: make scp -3 the default for remote-to-remote copies. It
provides a much better and more intuitive user experience and doesn't require
exposing credentials to the source host.
thanks naddy@ for catching the missing argument in usage()
"Yes please!" - markus@
"makes a lot of sense" - deraadt@
"the right thing to do" - dtucker@
OpenBSD-Commit-ID:
d0d2af5f0965c5192ba5b2fa461c9f9b130e5dd9
djm@openbsd.org [Mon, 9 Aug 2021 23:49:31 +0000 (23:49 +0000)]
upstream: make scp in SFTP mode try to use relative paths as much
as possible. Previosuly, it would try to make relative and ~/-rooted paths
absolute before requesting transfers.
prompted by and much discussion deraadt@
ok markus@
OpenBSD-Commit-ID:
46639d382ea99546a4914b545fa7b00fa1be5566
djm@openbsd.org [Mon, 9 Aug 2021 23:47:44 +0000 (23:47 +0000)]
upstream: SFTP protocol extension to allow the server to expand
~-prefixed paths, in particular ~user ones. Allows scp in sftp mode to accept
these paths, like scp in rcp mode does.
prompted by and much discussion deraadt@
ok markus@
OpenBSD-Commit-ID:
7d794def9e4de348e1e777f6030fc9bafdfff392
djm@openbsd.org [Mon, 9 Aug 2021 23:44:32 +0000 (23:44 +0000)]
upstream: when scp is in SFTP mode, try to deal better with ~
prefixed paths. ~user paths aren't supported, but ~/ paths will be accepted
and prefixed with the SFTP server starting directory (more to come)
prompted by and discussed with deraadt@
ok markus@
OpenBSD-Commit-ID:
263a071f14555c045fd03132a8fb6cbd983df00d
djm@openbsd.org [Mon, 9 Aug 2021 07:21:01 +0000 (07:21 +0000)]
upstream: on fatal errors, make scp wait for ssh connection before
exiting avoids LogLevel=verbose (or greater) messages from ssh appearing
after scp has returned exited and control has returned to the shell; ok
markus@
(this was originally committed as r1.223 along with unrelated stuff that
I rolled back in r1.224)
OpenBSD-Commit-ID:
1261fd667ad918484889ed3d7aec074f3956a74b
djm@openbsd.org [Mon, 9 Aug 2021 07:19:12 +0000 (07:19 +0000)]
upstream: rever r1.223 - I accidentally committed unrelated changes
OpenBSD-Commit-ID:
fb73f3865b2647a27dd94db73d6589506a9625f9
djm@openbsd.org [Mon, 9 Aug 2021 07:16:09 +0000 (07:16 +0000)]
upstream: show only the final path component in the progress meter;
more useful with long paths (that may truncate) and better matches
traditional scp behaviour; spotted by naddy@ ok deraadt@
OpenBSD-Commit-ID:
26b544d0074f03ebb8a3ebce42317d8d7ee291a3
djm@openbsd.org [Mon, 9 Aug 2021 07:13:54 +0000 (07:13 +0000)]
upstream: on fatal errors, make scp wait for ssh connection before
exiting avoids LogLevel=verbose (or greater) messages from ssh appearing
after scp has returned exited and control has returned to the shell; ok
markus@
OpenBSD-Commit-ID:
ef9dab5ef5ae54a6a4c3b15d380568e94263456c
dtucker@openbsd.org [Sun, 8 Aug 2021 08:49:09 +0000 (08:49 +0000)]
upstream: xstrdup environment variable used by ForwardAgent. bz#3328
from goetze at dovetail.com, ok djm@ deraadt@
OpenBSD-Commit-ID:
760320dac1c3b26904284ba417a7d63fccc5e742
dtucker@openbsd.org [Sun, 8 Aug 2021 08:27:28 +0000 (08:27 +0000)]
upstream: Although it's POSIX, not all shells used in Portable support
the implicit 'in "$@"' after 'for i'.
OpenBSD-Regress-ID:
3c9aec6bca4868f85d2742b6ba5223fce110bdbc
Darren Tucker [Sun, 8 Aug 2021 07:39:56 +0000 (17:39 +1000)]
Move portable specific settings down.
This brings the top hunk of the file back in sync with OpenBSD
so patches to the CVS Id should apply instead of always being
rejected.
dtucker@openbsd.org [Sun, 8 Aug 2021 07:27:52 +0000 (07:27 +0000)]
upstream: Move setting of USER further down the startup In portable
we have to change this and having it in the same hunk as the CVS Id string
means applying changes fails every. single. time.
OpenBSD-Regress-ID:
87cd603eb6db58c9b430bf90adacb7f90864429b
dtucker@openbsd.org [Sun, 8 Aug 2021 06:38:33 +0000 (06:38 +0000)]
upstream: Drop -q in ssh-log-wrapper.sh to preserve logs.
scp and sftp like to add -q to the command line passed to ssh which
overrides the LogLevel we set in the config files and suppresses output
to the debug logs so drop any "-q" from the invoked ssh. In the one
case where we actually want to use -q in the banner test, call the ssh
binary directly bypassing the logging wrapper.
OpenBSD-Regress-ID:
e2c97d3c964bda33a751374c56f65cdb29755b75
dtucker@openbsd.org [Sat, 7 Aug 2021 01:57:08 +0000 (01:57 +0000)]
upstream: Fix prototype mismatch for do_cmd. ok djm@
OpenBSD-Commit-ID:
1c1598bb5237a7ae0be99152f185e0071163714d
djm@openbsd.org [Sat, 7 Aug 2021 01:55:01 +0000 (01:55 +0000)]
upstream: sftp-client.c needs poll.h
remove unused variable
OpenBSD-Commit-ID:
233ac6c012cd23af62f237167a661db391055a16
Darren Tucker [Sat, 7 Aug 2021 01:30:57 +0000 (11:30 +1000)]
Include poll.h and friends for struct pollfd.
djm@openbsd.org [Sat, 7 Aug 2021 00:14:17 +0000 (00:14 +0000)]
upstream: do_upload() used a near-identical structure for
tracking expected status replies from the server to what do_download() was
using.
Refactor it to use the same structure and factor out some common
code into helper functions.
OpenBSD-Commit-ID:
0c167df8ab6df4a5292c32421922b0cf379e9054