summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2023-08-07Free title earlier, from Alexis Hildebrandt.Nicholas Marriott
2023-08-07Trim can generate strings longer than the original if there are many #s,Nicholas Marriott
so create a bigger buffer. Reported by Robert Morris.
2023-08-06Prefer the POSIX standard st_*tim struct timespec members over thePhilip Guenther
older BSD st_*timespec names. ok millert@
2023-08-06Apply rev 1.29 from NetBSD:Philip Guenther
----- Don't printf time_t with %d; fixes PR 44128 from yamt. With this change it successfully prints mtimes after 2038. ----- ok millert@
2023-08-04Apply ConnectTimeout to multiplexing local socket connections. If theDarren Tucker
multiplex socket exists but the connection times out, ssh will fall back to a direct connection the same way it would if the socket did not exist at all. ok djm@
2023-08-02CheckHostIP has defaulted to 'no' for a while; make the commented-Damien Miller
out config option match. From Ed Maste
2023-08-01remove unnecessary if statement. github PR#422 from eyalasulin999,Darren Tucker
ok djm@
2023-07-29Drop unused conf, pem, and x509 headers, add unistd for pledgeTheo Buehler
2023-07-28%C is a callable macro in mdoc(7) so, as we do for %D, escape it;Jason McIntyre
2023-07-27don't incorrectly truncate logged strings retrieved from PKCS#11Damien Miller
modules; based on GHPR406 by Jakub Jelen; ok markus
2023-07-27make sshd_config AuthorizedPrincipalsCommand and AuthorizedKeysCommandDamien Miller
accept the %D (routing domain) and a new %C (connection address/port 4-tuple) as expansion sequences; ok markus
2023-07-27increase default KDF work-factor for OpenSSH format private keys fromDamien Miller
16 to 24; { feedback ok } x { deraadt markus }
2023-07-27Remove antiquated options outputTheo Buehler
This is uninteresting and rather meaningless except for the implementer. No need to have several hundred lines of code backing half a dozen symbols in the public API for this. ok jsing
2023-07-26make ssh -f (fork after authentication) work properly in multiplexedDamien Miller
cases (inc. ControlPersist). bz3589 bz3589 Based on patches by Peter Chubb; ok dtucker@
2023-07-23man page typos; ok jmc@Christian Weisgerber
2023-07-23sprinkle some void between () in function definitionsTheo Buehler
2023-07-23Remove -stats option from openssl(1) errstr.Theo Buehler
This is the only consumer of ERR_get_string_table(), which will go away. ok jsing
2023-07-20tweak the allow-remote-pkcs11 text;Jason McIntyre
2023-07-19Separate ssh-pkcs11-helpers for each p11 moduleDamien Miller
Make ssh-pkcs11-client start an independent helper for each provider, providing better isolation between modules and reliability if a single module misbehaves. This also implements reference counting of PKCS#11-hosted keys, allowing ssh-pkcs11-helper subprocesses to be automatically reaped when no remaining keys reference them. This fixes some bugs we have that make PKCS11 keys unusable after they have been deleted, e.g. https://bugzilla.mindrot.org/show_bug.cgi?id=3125 ok markus@
2023-07-19Ensure FIDO/PKCS11 libraries contain expected symbolsDamien Miller
This checks via nlist(3) that candidate provider libraries contain one of the symbols that we will require prior to dlopen(), which can cause a number of side effects, including execution of constructors. Feedback deraadt; ok markus
2023-07-19Disallow remote addition of FIDO/PKCS11 provider libraries toDamien Miller
ssh-agent by default. The old behaviour of allowing remote clients from loading providers can be restored using `ssh-agent -O allow-remote-pkcs11`. Detection of local/remote clients requires a ssh(1) that supports the `session-bind@openssh.com` extension. Forwarding access to a ssh-agent socket using non-OpenSSH tools may circumvent this control. ok markus@
2023-07-19terminate process if requested to load a PKCS#11 provider thatDamien Miller
isn't a PKCS#11 provider; from / ok markus@
2023-07-19Partially fix interactive mode in patchTheo Buehler
If ask() can't open /dev/tty for reading, it assumes the default answer and carries on. Add missing unveil, so that ask() waits for an answer. This isn't a full fix since it won't allow giving paths outside the tree rooted at the current directory, but that's expected by the recent change. Questions are only asked outside of force or batch mode. fix suggested by op and semarie ok deraadt florian
2023-07-19Correct visited flag when the last window list is rebuilt by renumberingNicholas Marriott
windows, appears to fix hang reported by Mark Kelly.
2023-07-17missing match localnetwork negation checkDamien Miller
2023-07-17- add -P to usage()Jason McIntyre
- sync the arg name to -J in usage() with that in ssh.1 - reformat usage() to match what "man ssh" does on 80width
2023-07-17-P before -p in SYNOPSIS;Jason McIntyre
2023-07-17configuation -> configurationJonathan Gray
2023-07-17move other RCSIDs to before their respective license blocks tooDamien Miller
no code change
2023-07-17Move RCSID to before license block and away from #includes, whereDamien Miller
it caused merge conflict in -portable for each commit :(
2023-07-17return SSH_ERR_KRL_BAD_MAGIC when a KRL doesn't contain a validDamien Miller
magic number and not SSH_ERR_MESSAGE_INCOMPLETE; the former is needed to fall back to text revocation lists in some cases; fixes t-cert-hostkey.
2023-07-17Add support for configuration tags to ssh(1).Damien Miller
This adds a ssh_config(5) "Tag" directive and corresponding "Match tag" predicate that may be used to select blocks of configuration similar to the pf.conf(5) keywords of the same name. ok markus
2023-07-17add a "match localnetwork" predicate.Damien Miller
This allows matching on the addresses of available network interfaces and may be used to vary the effective client configuration based on network location (e.g. to use a ProxyJump when not on a particular network). ok markus@
2023-07-17remove vestigal support for KRL signaturesDamien Miller
When the KRL format was originally defined, it included support for signing of KRL objects. However, the code to sign KRLs and verify KRL signatues was never completed in OpenSSH. Now, some years later, we have SSHSIG support in ssh-keygen that is more general, well tested and actually works. So this removes the semi-finished KRL signing/verification support from OpenSSH and refactors the remaining code to realise the benefit - primarily, we no longer need to perform multiple parsing passes over KRL objects. ok markus@
2023-07-17Support for KRL extensions.Damien Miller
This defines wire formats for optional KRL extensions and implements parsing of the new submessages. No actual extensions are supported at this point. ok markus
2023-07-16Make the mbstat preserve the same size which is actually used. AlsoYASUOKA Masahiko
revert the previous that the mbstat is located on the stack. ok claudio
2023-07-15Prevent patch(1) from scribbling all over the place.Florian Obser
Arguably the only sensible use of patch(1) is changing files in the current working directory and subdirectories. However, patch(1) has this anti-feature, or dare I say bug, where it will happily follow "../" upwards and outside of the current working directory to find files to change. All it takes is a line like +++ ../../../../home/florian/.ssh/authorized_keys in the patchfile. patch(1) operates on untrusted input and it already pledge(2)'ed to not execute arbitrary programs, but of course it needs to write files. A simple unveil(".", "rwc") restricts patch(1) to its current working directory. We also need to allow /tmp and potentially the output file and reject file if given on the command line. But those paths are safe. input op, deraadt OK millert, sthen
2023-07-14Set extended keys flag again after reset, from Eric T Johnson.Nicholas Marriott
2023-07-14Include stdint.h for SIZE_MAX. Fixes OPENSSL=no build.Darren Tucker
2023-07-14add defence-in-depth checks for some unreachable integer overflowsDamien Miller
reported by Yair Mizrahi @ JFrog; feedback/ok millert@
2023-07-13Use 8 for underscore colour defaults instead of 0 which is lessNicholas Marriott
confusing, and fix writing tge default colour. GitHub issue 3627.
2023-07-12Don't run off the end of path if it ends in /.Florian Obser
OK op, sthen
2023-07-12basename(3) can fail, prevent segfault in strlen(3).Florian Obser
OK tb, sthen
2023-07-12Use ssize_t instead of short for line lengthsTheo Buehler
sthen hit a binary patch containing a 'line' of length > 32kB. This made the short used for storing the line length wrap and resulted in a buffer underflow and segfault. This uses a larger type, which doesn't actually fix the problem, but makes it much less likely to be hit. ok florian otto sthen
2023-07-11Remove Ns and Li and change Nm to Ic, suggested by jmc.Nicholas Marriott
2023-07-11Add descriptions of copy mode commands, from Michael Bianco.Nicholas Marriott
2023-07-10It should no longer be necessary to ignore SIGCHLD because it is nowNicholas Marriott
blocked around daemon(), and doing so causes trouble with newer libevent (it cannot restore the original handler). Reported by Azat Khuzhin in GitHub issue 3626.
2023-07-10Loop around waitpid in client, from Azat Khuzhin.Nicholas Marriott
2023-07-10finish v5.36, UList was a bit more workMarc Espie
2023-07-10Use a stack for last panes line windows, from Thomas Bertschinger inNicholas Marriott
GitHub issue 3588.