summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
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
2022-08-15Don't stop at first match when updating environment.Nicholas Marriott
2022-08-14Use size_t for the length parameters, not off_t.Todd C. Miller
Now that zlib uses unsigned long for its totals there is no reason to use off_t in ctfdump. This is similar to the changes in db_ctf.c. OK tb@
2022-08-14Use size_t, not off_t, for length parameters.Todd C. Miller
This matches how the functions are called and eliminates a few casts. OK tb@
2022-08-12There are some places in ip and ip6 input where operations fail dueAlexander Bluhm
to out of memory. Use a generic idropped counter for those. OK mvs@
2022-08-12sftp-server: support home-directory requestDamien Miller
Add support to the sftp-server for the home-directory extension defined in draft-ietf-secsh-filexfer-extensions-00. This overlaps a bit with the existing expand-path@openssh.com, but uses a more official protocol name, and so is a bit more likely to be implemented by non-OpenSSH clients. From Mike Frysinger, ok dtucker@
2022-08-12renice(8): don't succeed after 256 errorsScott Soule Cheloha
Set error instead of incrementing it. Link: https://marc.info/?l=openbsd-tech&m=166025831731506&w=2 ok millert@
2022-08-11vi(1) Home/End bindings, from Markus F X J Oberhumer.Nicholas Marriott
2022-08-11allow certificate validity intervals, sshsig verification times andDamien Miller
authorized_keys expiry-time options to accept dates in the UTC time zone in addition to the default of interpreting them in the system time zone. YYYYMMDD and YYMMDDHHMM[SS] dates/times will be interpreted as UTC if suffixed with a 'Z' character. Also allow certificate validity intervals to be specified in raw seconds-since-epoch as hex value, e.g. -V 0x1234:0x4567890. This is intended for use by regress tests and other tools that call ssh-keygen as part of a CA workflow. bz3468 ok dtucker
2022-08-10Fix check of home directory (&& not ||), from Markus F X J Oberhumer,Nicholas Marriott
GitHub issue 3297.
2022-08-10Fix two compiler warnings resulting from last zlib bumpTheo Buehler
total_out is now an unsigned long, so a format string warning is issued on all architectures. Fix this and also fix the format string for the off_t len, which is signed, not unsigned. Comparing an unsigned long to an off_t involves implementation-defined behavior for values > LONG_MAX on 64-bit architectures, so the compiler complains. Fix this by checking that len >= 0 and then casting both sides to a wider type. reported by and ok deraadt
2022-08-09prevent breakable hyphens in segment identifiersIngo Schwarze
from being turned into underscores; bug reported by <Eldred dot fr> Habert
2022-08-08top(1): display uptime with seconds, print uptime in fixed formatScott Soule Cheloha
1. It's sometimes useful to know the system uptime with more precision than one minute. So, this patch changes top(1) to print seconds of uptime in addition to minutes, hours, and days. 2. It's *always* annoying when the information you want on a realtime display is not shown in the same place in a consistent format. So, this patch also changes top(1) to always print the uptime like this: up D days HH:MM:SS This is much easier to read at a glance. In particular, it requires no additional thought on my part to figure out whether the machine has been up less than one day. Maybe of note is that these changes make top(1)'s output different from that of uptime(1). I don't think this matters very much. top(1) is a realtime display, so it isn't likely to be parsed. uptime(1) is a different story. Link: https://marc.info/?l=openbsd-tech&m=160046282400892&w=2 Positive feedback from kn@. ok gnezdo@ bluhm@ millert@
2022-08-06Use NI_MAXHOST and NI_MAXSERV constants to allocate temporary stringsAlexander Bluhm
for saddr_ntop() and inet_ntop(). This avoids truncation warnings and is better than arbitrary size values with 64 or 128 bytes. OK deraadt@
2022-08-05don't prompt for FIDO passphrase before attempting to enroll theDamien Miller
credential, just let the enroll operating fail and we'll attempt to get a PIN anyway. Might avoid some unneccessary PIN prompts. Part of GHPR#302 from Corinna Vinschen; ok dtucker@
2022-08-04Add HISTORY and AUTHORS.Ingo Schwarze
In https://minnie.tuhs.org/pipermail/tuhs/2020-January/019955.html , Brian Walden wrote (which looks like a reliable source to me): "GWRL stands for Gottfried W. R. Luderer, the author of cut(1) and paste(1), probably around 1978. Those came either from PWB or USG, as he worked with, or for, Berkley Tague. Thus they made their way into AT&T commercial UNIX, first into System III and the into System V, and that's why they are missing from early BSD releases as they didn't get into Research UNIX until the 8th Edition. [...] I knew Dr. Luderer [...] I also briefly worked for Berk when he was the department head for 45263 in Whippany Bell Labs before moving to Murray Hill." Omission pointed out by daniel@. Joint work with jsg@. OK jsg@ daniel@.
2022-08-04Change g and G to go to top and bottom of menu, GitHub issue 3286.Nicholas Marriott
2022-08-04For clarity and consistency, refer to ".Bx 4.0" rather than ".Bx 4".Ingo Schwarze
Also, mention /usr/ucb/man because /usr/bin/man did not provide -f in 4.0BSD.
2022-08-04change some 4.4BSD references to earlier releasesJonathan Gray
ok schwarze@
2022-08-04cu first appeared outside of Bell Labs in PWB/UNIX 1.0 before v7Jonathan Gray
mention tip in 4.1c while here with and ok schwarze@ ok nicm@
2022-08-03Add workarounds for some symbols that are hidden under !LIBRESSL_INTERNALTheo Buehler
until the next bump exposes new symbols that we can use.
2022-08-03Since ts(1) is line-based, always using line bufferingJob Snijders
makes sense millert@ yep deraadt@
2022-08-03Do not crash when searching for .* with extremely long lines. ReportedNicholas Marriott
by Torbjorn Lonnemark, GitHub issue 3272.
2022-08-03tail(1) first appeared outside of Bell Labs in PWB/UNIX 1.0Jonathan Gray
with and ok schwarze@
2022-08-03sed(1) first appeared outside of Bell Labs in PWB/UNIX 1.0Jonathan Gray
it did not start in the PWB group "The talk said that tools like grep and sed came from PWB, but that's not true. They were original" "The flow from PWB back to the main research line was a trickle at best. We had bad NIH in 1127." Rob Pike https://minnie.tuhs.org/pipermail/tuhs/2020-February/020329.html The 4.4BSD version was written by Diomidis Spinellis credited in csrg/admin/admin/contrib "In 1992, as a bored PhD student, I reimplemented sed(1) and contributed it the unencumbered BSD version that was then being put together" https://www.spinellis.gr/blog/FreeBSD.html with and ok schwarze@