summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2021-11-26followng -> followingJonathan Gray
2021-11-26definiton -> definitionJonathan Gray
2021-11-25debug("func: ...") -> debug_f("...")Damien Miller
2021-11-25We know how to print a size_t now. Drop a comment and a cast.Theo Buehler
ok bluhm inoguchi
2021-11-21Tweak for opaque EVP_MD: use EVP_MD_type(dgst) instead of dgst->type.Theo Buehler
2021-11-21Add the new `ipsec_exctdb' ipsec(4) counter to count and expose to theVitaliy Makkoveev
userland the TDBs which exceeded hard limit. Also the `ipsec_notdb' counter description in header doesn't math to netstat(1) description. We never count `ipsec_notdb' and the netstat(1) description looks more appropriate so it's used to avoid confusion with the new counter. ok bluhm@
2021-11-21tee(1): use idiomatic write loopScott Soule Cheloha
tee(1) handles partial writes correctly, but the more idiomatic write loop is shorter and easier to audit than this heterodox approach. ok millert@
2021-11-20Convert openssl(1) to using BN_GENCB on the heapTheo Buehler
This is three times the same thing while genrsa needs some extra steps to deal with opaque BIGNUMs. We can also garbage collect some Win 3.1 contortions and use the conversion routines directly instead of doing them manually. ok jsing
2021-11-20typo in commentTheo Buehler
2021-11-18less confusing debug message; bz#3365Damien Miller
2021-11-18avoid xmalloc(0) for PKCS#11 keyid for ECDSA keys (we already did thisDamien Miller
for RSA keys). Avoids fatal errors for PKCS#11 libraries that return empty keyid, e.g. Microchip ATECC608B "cryptoauthlib"; bz#3364
2021-11-18ssh-keygen -Y find-principals was verifying key validity when usingDamien Miller
ca certs but not with simple key lifetimes within the allowed signers file. Since it returns the first keys principal it finds this could result in a principal with an expired key even though a valid one is just below. patch from Fabian Stelzer; feedback/ok djm markus
2021-11-18check for POLLHUP wherever we check for POLLINDamien Miller
2021-11-18fd leak in sshd listen loop error path; from Gleb SmirnoffDamien Miller
2021-11-18check for POLLHUP as well as POLLIN in sshd listen loop;Damien Miller
ok deraadt millert
2021-11-18check for POLLHUP as well as POLLIN, handle transient IO errors as wellDamien Miller
as half-close on the output side; ok deraadt millert
2021-11-17uniq(1): ignore trailing newlines when comparing linesScott Soule Cheloha
POSIX.1-2008 tweaked the uniq definition in light of AGI 1003.1-2001 #133. uniq must now *ignore* the trailing newline when comparing lines from the input. In practice this means that if the last line in the input is missing a trailing newline it isn't necessarily different from the line preceding it. So, uniq(1) now stubs the trailing newline before doing any line comparisons. For sake of simplicity, this patch introduces a second change: if the last line in the input is missing a trailing newline and we choose to print the line, a newline is appended when we print it. Adopting the newline change aligns our implementation with with POSIX.1-2008 (which we already claim in the manpage). Adopting both changes aligns our behavior with that of FreeBSD and GNU uniq. For better or worse, OpenBSD's uniq no longer behaves like NetBSD's uniq in this corner case. References: POSIX.1-2001 uniq: https://pubs.opengroup.org/onlinepubs/009695399/utilities/uniq.html Austin Group Interpretation 1003.1-2001 #133: https://collaboration.opengroup.org/austin/interps/documents/14355/AI-133.txt POSIX.1-2008 uniq: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/uniq.html -- Discussed with millert@. With input from schwarze@. Positive feedback from bcallah@. Thread: https://marc.info/?l=openbsd-tech&m=163581613829524&w=2 ok millert@
2021-11-17set num_listen_socks to 0 on close-all instead of -1, whichDamien Miller
interferes with the new poll()-based listen loop; spotted and debugged by anton@+deraadt@
2021-11-16wc(1): fix NULL pointer dereference in cnt()Scott Soule Cheloha
If the "file" argument to cnt() is NULL and we call warn(3) we will get a NULL dereference. Change the name of the argument to "path" and make "file" a local variable. Ensure that we set "file" to a valid C-string, even if "path" is NULL. While we're here, const the file name pointers, too. Thread: https://marc.info/?l=openbsd-tech&m=163708784422157&w=2 ok millert@
2021-11-15Leave the hardware cursor at the position of the selected line in chooseNicholas Marriott
modes and current editing position and at the command prompt. It is invisible but this is helpful for people using screen readers. GitHub issue 2970.
2021-11-14use ppoll() instead of pselect()Theo de Raadt
with djm
2021-11-14match .events with .fd betterTheo de Raadt
2021-11-14convert select() to poll()Theo de Raadt
ok djm
2021-11-13replace select() with ppoll(), including converting timeval's to timespec'sTheo de Raadt
to make things easier. back and forth and ok; djm
2021-11-13It really looks like pledge "stdio dns" is possible earlier.Theo de Raadt
Discussed with mestre
2021-11-12Update awk to Nov 03, 2021 version.Todd C. Miller
We already had the fix so no actual code changes.
2021-11-12aggressively pre-fill the pollfd array with fd=-1Theo de Raadt
2021-11-11add some missing Ns; from leon fischerJason McIntyre
2021-11-11Convert from select() to ppoll(). Along the way, I observed that theTheo de Raadt
select() code was using exceptfds incorrectly.. ok millert
2021-11-11If automatic-rename is off, allow the escape sequence to set an emptyNicholas Marriott
window name, GitHub issue 2964.
2021-11-11If trimming menu item text, show key if it would take up less than aNicholas Marriott
quarter of the space; from Alexis Hildebrandt. Also new sentence, new line in tmux.1, from jmc.
2021-11-11remove whitespaceRicardo Mestre
2021-11-11There's no need to call pledge(2) so many times, or on many places, with theRicardo Mestre
same promises, just call it once before the switch case while at the same time hoisting one unveil(2) so they are all grouped. The call to pledge(2) on file() can also be simplified since "stdio rpath getpw" will already be activated when we reach it. OK deraadt@
2021-11-10remove a pointless call of setlocale(3);Ingo Schwarze
patch from Jan Stary <hans at stare dot cz>; OK martijn@
2021-11-10Revert previousKlemens Nanni
I overlooked the autoinstall case where "Requesting ..." is used, but those messages that got fixed where omitted in ftp's SMALL version. Noticed the hard way by anton
2021-11-10add the sntrup761x25519-sha512@openssh.com hybrid ECDH/x25519 +Damien Miller
Streamlined NTRU Prime post-quantum KEX to the default KEXAlgorithms list (after the ECDH methods but before the prime-group DH ones). ok markus@
2021-11-10fix ssh-keysign for KEX algorithms that use SHA384/512 exchange hashes;Damien Miller
feedback/ok markus@
2021-11-10Move two BIGNUMs in printnumber() from the stack to the heap toTheo Buehler
prepare bc(1) and dc(1) for opaque BIGNUMs. "looks sane" otto
2021-11-09-i may not be specified multiple times; from josh grosseJason McIntyre
ok millert
2021-11-09Print actually requested URLsKlemens Nanni
Encoding URL paths changes the requested URL and therefore may yield different responses (opposed to an unencoded URL), solely depending on how the server implements de/encoding. Always print the encoded URL which actually gets requested in output like "Requesting ..." and erors likes "Error retrieving ....: 404 Not Found" and don't use the original URL provided on the command line. This matches exactly what is seen on the wire, e.g. with tshark(1) and helps debugging URL de/encoding related (server) issues. Feedback OK sthen
2021-11-08improve error message when trying to expand a ~user path for aDamien Miller
user that doesn't exist; better matches what the shell does ok deraadt@
2021-11-08missing full stop;Jason McIntyre
2021-11-07nm: add some .text.* support for symbolsSebastien Marie
.text.* are generated when using -ffunction-sections. makes nm(1) to correctly identify the function symbols as N_TEXT. found while debugging librsvg build error, where some symbols where not found by libtool(1) (which is using nm(1)). ok gkoehler@
2021-11-06Stop URL encoding the tilde characterKlemens Nanni
RFC 1738 Uniform Resource Locators (URL) lists tilde as unsafe character. RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax updates it to The tilde "~" character was added to those in the "unreserved" set, since it is extensively used on the Internet in spite of the difficulty to transcribe it with some keyboards. In theory, this shouldn't make a difference, but some servers do not decode "%7e" and thus erroneously serve a 404. RFC 2396 2.4.2. When to Escape and Unescape says: In some cases, data that could be represented by an unreserved character may appear escaped; for example, some of the unreserved "mark" characters are automatically escaped by some systems. If the given URI scheme defines a canonicalization algorithm, then unreserved characters may be unescaped according to that algorithm. For example, "%7e" is sometimes used instead of "~" in an http URL path, but the two are equivalent for an http URL. Update ftp(1) to RFC 2396 by no longer treating "~" as unsafe character. This is effectively a one-character diff; update comments accordingly as well as the order of characters to ease code-to-standard comparison. This matches curl(1) and wget(1) behaviour wrt. encoding of "~". OK sthen
2021-11-06Plug a couple of minor mem leaks. From beldmit at gmail.com via githubDarren Tucker
PR#283, ok markus@
2021-11-05Make sure that the configuration file is always read, even whenIngo Schwarze
running with the -M option or with a MANPATH environment variable that has neither a leading or trailing ":" nor any "::". If -M or MANPATH override the configuration file rather than adding to it, just ignore any "manpath" directives while processing the configuration file. This fixes a bug reported by Jan Stary <hans at stare dot cz> on misc@.
2021-11-05move cert_filter_principals() to earlier in the file for reuse;Damien Miller
no code change
2021-11-04Fix mandoc HTML rendering for command aliasesKlemens Nanni
Replace hand-rolled parentheses with the proper mdoc(7) macro, otherwise the closing ")" ends up inside the command description. Reported by Josh Rickmar, thanks!
2021-11-03Many downstreams expect ssh to compile as non-C99...Theo de Raadt
2021-11-03whitespace observed during a read-throughTheo de Raadt