summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2022-09-11.Li -> .Vt where appropriate;Jason McIntyre
from josiah frentsos, tweaked by schwarze ok schwarze
2022-09-10Use correct option name.Nicholas Marriott
2022-09-10top(1): remove last vestiges of "last pid" supportScott Soule Cheloha
millert@ removed most of the "last pid" support from top(1) in 1997. See, e.g. top/machine.c,v1.7: http://cvsweb.openbsd.org/src/usr.bin/top/machine.c?rev=1.7&content-type=text/x-cvsweb-markup Let's remove the rest of it: - Eliminate system_info.last_pid. - Remove mpid parameter and "last pid" printing code from i_loadave(). Link: https://marc.info/?l=openbsd-tech&m=166277253606823&w=2 ok millert@
2022-09-10fix repeated wordsJonathan Gray
ok miod@ jmc@
2022-09-09Add message-line option to control where message and prompt go, fromNicholas Marriott
Varun Kumar E in GitHub issue 3324.
2022-09-09notifier_complete(NULL, ...) is a noop, so no need to testDamien Miller
that ctx!=NULL; from Corinna Vinschen
2022-09-08Support the sendmmsg and recvmmsg system calls.Moritz Buhl
Input guenther@ OK bluhm@
2022-09-08Remove useless -tKlemens Nanni
"Make if.c kvm free by fetching the interface stats via sysctl ..." if.c r1.56 in 2008 neutered the -d and -t flags. -d functionality was eventually restored with if.c r1.76 in 2015. -t has been printing zeroes for over fourteen now; this cannot have been useful to anyone and noone complained about a wrong watchdog timer values. Remove -t entirely without printing a warning; `netstat -t ...' now fails. Feedback jsg OK jsg bluhm
2022-09-08Adjust HTTP header parsing to follow RFC more closely.Claudio Jeker
RFC9112 allows any amount of space/tabs between the ':' and the value. Until now this code required exactly one space which works most of the time but is not RFC compliant. OK djm@
2022-09-07remove history of when each du(1) flag was addedJonathan Gray
ok jmc@ schwarze@
2022-09-03Remove -lncurses from LDADD. It is not used. Also add DPADD line.Claudio Jeker
OK deraadt@
2022-09-03use past tense for history;Jason McIntyre
2022-09-02wc(1): accelerate word countingScott Soule Cheloha
wc(1) counts a word whenever a whitespace byte is followed by a non-whitespace byte. Because the state machine transition occurs within the space of a single byte we don't need to use getline(3). Counting words in a big buffer with read(2) is much faster. The overhead varies with the length of a line, but for files with 60-100 byte lines, word counting is about twice as fast when we avoid getline(3). In the pathological case where each line is a single byte, word counting is about ten times as fast when we avoid getline(3). Link1: https://marc.info/?l=openbsd-tech&m=163715995626532&w=2 Link2: https://marc.info/?l=openbsd-tech&m=165956826103639&w=2 "Seems reasonable." deraadt@
2022-09-02sk-usbhid: fix key_lookup() on tokens with built-in UVDamien Miller
explicitly test whether the token performs built-in UV (e.g. biometric tokens) and enable UV in that case. From Pedro Martelletto via GHPR#388
2022-09-01Update awk to Aug 30, 2022 version.Todd C. Miller
Various leaks and use-after-free issues plugged/fixed.
2022-09-01ts(1): parse user format string only onceScott Soule Cheloha
Currently, ts(1) reparses the user format string every time it prints a timestamp. This is wasteful. If we isolate the parsing loop in fmtfmt() and move the rest of the work into a new function, fmtprint(), we can cut some overhead out of the hot loop. We still need to update any microsecond substrings in the parsed format string every time we print a timestamp. So during parsing in fmtfmt() we build a list of pointers to locations in the parsed buffer where the microsecond substring needs to be copied during fmtprint(). With input from deraadt@. Link1: https://marc.info/?l=openbsd-tech&m=165769139318084&w=2 Link2: https://marc.info/?l=openbsd-tech&m=165910022501353&w=2 OK job@
2022-08-31Avoid division by zero if no connection was made.Theo Buehler
CID 184043
2022-08-31Fix window size report, from Vincent Bernat.Nicholas Marriott
2022-08-31Check return values in ssl_print_tmp_key()Theo Buehler
Use EVP_PKEY_get0_EC_KEY() instead of the get1 version to avoid an EVP_PKEY_free(). Check return values: if either EVP_PKEY_get0_EC_KEY() or EC_KEY_get0_group() fail, a NULL dereference occurs. CID 43289 ok jsing
2022-08-31whitespaceDamien Miller
2022-08-30Check HMAC() return value to avoid a later use of uninitializedTheo Buehler
CID 25421
2022-08-30Use BUFSIZ instead of PATH_MAX. Since it doesn't anything with a fileYASUOKA Masahiko
system path. input from claudio ok tb claudio
2022-08-30Give a string which length is multiple of 4 to b64_pton() since theYASUOKA Masahiko
function assumes that the input ends at end of 24-bit group. ok tb claudio
2022-08-29Fix growth check in compress(1)/gzip(1)Theo Buehler
If a compressed file is larger than its expanded version, compress(1) and gzip(1) don't compress unless -f is given. As found by gkoehler, the check is not quite correct for very small files or files with sufficiently random data. Fix the check so that slight growth still triggers the check. ok millert
2022-08-28Stop skipping vertical space after boxed tables.Ingo Schwarze
Skipping such space used to be a bug in GNU tbl(1), and a kludge was added to mandoc to produce identical output. The bug was fixed in groff commit 8818c07c Jul 30 2022 gbranden@ https://savannah.gnu.org/bugs/index.php?49390 Consequently, now is the time to get rid of the kludge.
2022-08-28Stop unconditionally emitting vertical space before .TS (table start).Ingo Schwarze
Same change as in groff commit 7ec36dc9 Jul 30 2022 gbranden@ For more details, see https://savannah.gnu.org/bugs/index.php?62841 This change makes sense because: * It improves the formatting of more pages than it degrades. * Existing manual pages are wildly inconsistent in which behaviour they expect: apparently few manual page authors understood the old rules. * It simplifies the rules of how .TS behaves in man(7) and makes them more similar to how it behaves in mdoc(7). * It improves flexibility, making it possible for a table to immediately follow preceding text without a blank line, which some existing pages want to use, for example XCreateWindow(3).
2022-08-26Remove stale comment about nonexistent ifnetaddrKlemens Nanni
Obsolete since if.c r1.56 (2008) "Make if.c kvm free by fetching the interface stats via sysctl [...]".
2022-08-26whitespaceDamien Miller
2022-08-26whitespaceDamien Miller
2022-08-26Move (unused) variables under !VERIFYONLYKlemens Nanni
install media does not use any of -cns, so move their handling out under !VERIFYONLY to silence -Wunused-but-set-variable warnings in distrib/special/signify. OK deraadt
2022-08-24Check for NULL returns from bufferevent_new.Nicholas Marriott
2022-08-23Add scroll-middle copy mode command to make cursor line in the middle,Nicholas Marriott
from Varun Kumar E in GitHub issue 3307.
2022-08-19Up to version 1.22.4, groff_mdoc(7) only considered the first wordIngo Schwarze
when comparing section headers. For example, ".Sh SEE ELSEWHERE" and ".Sh SEE Em ALSO" were considered instances of a SEE ALSO section. In groff-current, exact matches with no sub-macros are required. Adjust mandoc behaviour. While here, also fix a very minor mandoc bug, even though no detrimental effect of the bug on formatting is known. While using sub-macros in the .Sh HEAD is bad style, the parsers accept it, so setting the section attribute on the HEAD needs to act recursively.
2022-08-19attemp FIDO key signing without PIN and use the error code returnedDamien Miller
to fall back only if necessary. Avoids PIN prompts for FIDO tokens that don't require them; part of GHPR#302
2022-08-19remove incorrect check that can break enrolling a resident keyDamien Miller
(introduced in r1.40)
2022-08-19Strictly enforce the maximum allowed SSH2 banner size in ssh-keyscanDarren Tucker
and prevent a one-byte buffer overflow. Patch from Qualys, ok djm@
2022-08-19double free() in error path; from Eusgor via GHPR333Damien Miller
2022-08-17add an extra flag to sk_probe() to indicate whether we'reDamien Miller
probing for a FIDO resident key or not. Unused here, but will make like easier for portable
2022-08-16Restore the traditional behaviour of the man(7) single-fontIngo Schwarze
macros .B, .I, .SM, and .SB that the next-line scope extends to the end of the next logical input line and is not extended if that line ends with a \c (no-space) escape sequence. While improving a loosely related feature in the man(7) .TP macro, a regression entered the groff codebase in groff commit 3549fd9f (28-Apr-2017) caused by the usual sloppiness of Bjarni Ingi Gislason. Since that time, groff wrongly had \c extend next-line scope to a second line for these macros. In man.c rev. 1.127 (25-Aug-2018) i synched mandoc behaviour with groff in this respect, unfortunately failing to notice the recent regression in groff. The groff regression was finally fixed by gbranden@ in commit 09c028f3 (07-Jun-2022). With the present commit, mandoc is back in sync with both GNU and Heirloom roff regarding the interaction of single-font macros with \c.
2022-08-16use .Cm for "sign"; from josiah frentsosJason McIntyre
2022-08-16When starting a new input line, even when continuing the same outputIngo Schwarze
line, use the current output position as the reference position for tabs on that input line. This brings mandoc in line with the behaviour of GNU, Heirloom, and Plan 9 roff.
2022-08-16Even though the constant ASCII_ESC is only used in the roff pre-parser roff.c,Ingo Schwarze
move it to the top level include file mandoc.h to reduce the risk of causing clashes when introducing new ASCII_* constants in the future.
2022-08-15Simplify handling of no-fill mode in man(7) by inspecting NODE_NOFILLIngo Schwarze
at the beginning of the node handler, in the same way as it is done in the mdoc(7) node handler. As a side effect, this also fixes a bug: if an input line contained nothing but an escape sequence producing no output whatsoever (for example, \fR), the old code incorrectly emitted a blank line anyway, whereas the new code only emits such a blank link if the input line actually produces output (even invisible zero-width output). To make the distinction, the ASCII_NBRZW -> lastcol -> term_newln() mechanism established in term.c rev. 1.149 is used.
2022-08-15Distinguish between escape sequences that produce no outputIngo Schwarze
whatsoever (for example \fR) and escape sequences that produce invisible zero-width output (for example \&). No, i'm not joking, groff does make that distinction, and it has consequences in some situations, for example for vertical spacing in no-fill mode. Heirloom and Plan 9 behaviour is subtly different, but in case of doubt, we want to follow groff. While this fixes the behaviour for the majority of escape sequences, in particular for those most likely to occur in practice, it is not perfect yet because some of the more exotic ESCAPE_IGNORE sequences are actually of the "no output whatsoever" type but treated as "invisible zero-width" for now. With the new ASCII_NBRZW mechanism in place, switching them over one by one when the need arises will no longer be very difficult.
2022-08-15In GNU, Heirloom, and Plan 9 roff, tab positions apply to *input* lines,Ingo Schwarze
not to *output* lines. In particular, if an input line gets broken in fill mode and a tab occurs in the second output line, it advances to a position of at least (width of the first output line) + (width of a space character even though this is never printed) + (width of the part of the second output line that precedes the tab). Implement the same logic in mandoc. Again, do not use tabs in filled text: they have surprising effects, including this one.
2022-08-15In GNU, Heirloom, and Plan 9 roff, literal tab characters areIngo Schwarze
non-breakable in exactly the same way as "\ ". That is, the preceding word, the tab character, and the following word are always kept together on the same output line. If filling is enabled and an output line break is required before the end of the following word, the break occurs before the beginning of the preceding word. Make mandoc behave in the same way. Of course, using literal tab characters in filled text remains a bad idea, and the "WARNING: tab in filled text" remains unchanged.
2022-08-15Notify when a paste buffer is deleted, GitHub issue 3302 from GeorgeNicholas Marriott
Nachman.
2022-08-15Use TCP_INFO instead of kvm magic to extract information about the tcp streams.Claudio Jeker
Variable names listed by -l change and there is no more need to change kern.allowkmem. To get all possible values tcpbench still needs to be run as root. OK bluhm@ djm@
2022-08-15Add a Nobr terminfo capability to tell tmux the terminal does not useNicholas Marriott
bright colours for bold (makes a difference to how tmux applies palette differences). From Damien Tardy-Panis in GitHub issue 3301.
2022-08-15Add some const, from Markus F X J Oberhumer.Nicholas Marriott