SIGALRM handler. It's no longer needed since the child will get terminated by
the SIGTERM to the process group that cleans up any auth helpers, it
simplifies the signal handler and removes the risk of a race when updating
the PID. Based on analysis by HerrSpace in github PR#289, ok djm@
OpenBSD-Commit-ID: 2be1ffa28b4051ad9e33bb4371e2ec8a31d6d663
a fd directly into the transport input buffer.
Use this in the client and server mainloops to avoid unnecessary
copying. It also lets us use a more greedy read size without penalty.
Yields a 2-3% performance gain on cipher-speed.sh (in a fairly
unscientific test tbf)
feedback dtucker@ ok markus@
OpenBSD-Commit-ID: df4112125bf79d8e38e79a77113e1b373078e632
buffer rather than into a stack buffer that needs to be copied again;
Improves performance by about 1% on cipher-speed.sh feedback dtucker@ ok
markus@
OpenBSD-Commit-ID: bf5e6e3c821ac3546dc8241d8a94e70d47716572
pfd[].revents is not cleared. There are subtle errors in various programs.
In this particular case, the program should error out. ok djm millert
OpenBSD-Commit-ID: 00f839b16861f7fb2adcf122e95e8a82fa6a375c
This portable-specific hack fixes a hang on exit for ttyful sessions
on Linux and some SysVish Unix variants. It was accidentally disabled
in commit 5c79952dfe (a precursor to the mainloop poll(2) conversion).
Spotted by John in bz3383
The Cygwin-specific pattern match code has a bug. It checks
the size_t value returned by mbstowcs for being < 0. The right
thing to do is to check against (size_t) -1. Fix that.
Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Dash (as used by the github runners) has some differences in its trap
builtin:
- it doesn't have -p (which is fine, that's not in posix).
- it doesn't work in a subshell (which turns out to be in compliance
with posix, which means bash isn't).
- it doesn't work in a pipeline, ie "trap|cat" produces no output.
When using Valgrind, we need to wait for all invoked programs to
complete before checking their valgrind logs. Some tests, notably
agent-restrict, set an EXIT trap handler to clean up things like
ssh-agent, but those do not get invoked until test-exec.sh exits.
This causes the Valgrind wait to deadlock, so if present invoke
the EXIT handler before checking the Valgrind logs.
Z_SYNC_FLUSH instead of Z_PARTIAL_FLUSH as the latter is not actually
specified as a valid mode for inflate(). There should be no practical change
in behaviour as the compression side ensures a flush that should make all
data available to the receiver in all cases.
repoted by lamm AT ibm.com via bz3372; ok markus
OpenBSD-Commit-ID: 67cfc1fa8261feae6d2cc0c554711c97867cc81b
destination directory if it doesn't already exist to match olde-scp(1)
behaviour. noticed by deraadt@ ok markus@
OpenBSD-Commit-ID: cf44dfa231d4112f697c24ff39d7ecf2e6311407
ssh-askpass will be used to request the PIN at authentication time.
From Pedro Martelletto, ok djm
OpenBSD-Commit-ID: de8189fcd35b45f632484864523c1655550e2950
resp is allocated by client_converse(), at which point we lose
the original pointer.
From Pedro Martelletto; ok dtucker & me
OpenBSD-Commit-ID: 1f1b5ea3282017d6584dfed4f8370dc1db1f44b1
the resulting fingerprint doesn't appear to be used for anything,
and we end up leaking it.
from Pedro Martelletto; ok dtucker & me
OpenBSD-Commit-ID: 5625cf6c68f082bc2cbbd348e69a3ed731d2f9b7
failures; provides better experience for scp in sftp mode, where ~user paths
are more likely to be used; spotted jsg, feedback jsg & deraadt ok jsg &
markus
(forgot to include this file in previous commit)
OpenBSD-Commit-ID: d37cc4c8c861ce48cd6ea9899e96aaac3476847b
Correct handling of select(2) exceptfds. These should only be consulted
for POLLPRI flagged pfds and not unconditionally converted to POLLERR.
with and ok dtucker@
Darwin's poll(2) implementation is broken. For character-special
devices like /dev/null, it returns POLLNVAL when polled with
POLLIN.
Apparently this is Apple bug 3710161, which is AFAIK not public,
but a websearch will find other OSS projects rediscovering it
periodically since it was first identified in 2005 (!!)
failures; provides better experience for scp in sftp mode, where ~user paths
are more likely to be used; spotted jsg, feedback jsg & deraadt ok jsg &
markus
OpenBSD-Commit-ID: fc610ce00ca0cdc2ecdabbd49ce7cb82033f905f